<commit_before># -*- coding: utf-8 -*-
"""Defines views."""

import calendar
import locale
from flask import (
    url_for,
    redirect,
)
from flask.ext.mako import render_template
from mako.exceptions import TopLevelLookupException

from presence_analyzer.main import app
from presence_analyzer.utils import (
    jsonify,
    get_data,
    mean,
    group_by_weekday,
    group_by_start_end,
    get_users_data,
)

import logging
log = logging.getLogger(__name__)  # pylint: disable-msg=C0103

TEMPLATE_LIST = (
    'presence_weekday.html',
    'mean_time_weekday.html',
    'presence_start_end.html'
)

locale.setlocale(locale.LC_ALL, '')


@app.route('/')
def mainpage():
    """Redirects to front page."""
    return redirect(
        url_for('template_render', template_name="presence_weekday.html")
    )
<commit_msg>Update views.py<commit_after># -*- coding: utf-8 -*-
"""Defines views."""

import calendar
import locale
from flask import (
    url_for,
    redirect,
)
from flask.ext.mako import render_template
from mako.exceptions import TopLevelLookupException

from presence_analyzer.main import app
from presence_analyzer.utils import (
    jsonify,
    get_data,
    mean,
    group_by_weekday,
    group_by_start_end,
    get_users_data,
)

import logging
log = logging.getLogger(__name__)  # pylint: disable-msg=C0103

TEMPLATE_LIST = (
    'presence_weekday.html',
    'mean_time_weekday.html',
    'presence_start_end.html'
)

locale.setlocale(locale.LC_ALL, 'en_US')


@app.route('/')
def mainpage():
    """Redirects to front page."""
    return redirect(
        url_for('template_render', template_name="presence_weekday.html")
    )

{'fraction_non_alphanumeric': 0.11271850512356842, 'fraction_numerical': 0.006027727546714889, 'mean_word_length': 4.015105740181269, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '643313', 'n_tokens_mistral': 568, 'n_tokens_neox': 555, 'n_words': 116}