<commit_before>from werkzeug.wrappers import Response
from werkzeug.utils import redirect
from werkzeug.exceptions import NotFound
import sqlalchemy
import decimal
import os.path
import logging
import urllib
import datetime

version = "0.2"
api_version = "0"

TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'templates')

import cubes
import json

class InvalidRequestError(exception):
    """Raised by controllers and handled more gracefuly with JSON reply"""
    pass

class FixingEncoder(json.JSONEncoder):
    def default(self, o):
        if type(o) == decimal.Decimal:
            return float(o)
        if type(o) == datetime.date or type(o) == datetime.datetime:
            return o.isoformat()
        if type(o) == cubes.browser.AggregationResult:
            return o.as_dict()
        else:
            return json.JSONEncoder.default(self, o)

class ApplicationController(object):<commit_msg>fixed typo<commit_after>from werkzeug.wrappers import Response
from werkzeug.utils import redirect
from werkzeug.exceptions import NotFound
import sqlalchemy
import decimal
import os.path
import logging
import urllib
import datetime

version = "0.2"
api_version = "0"

TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'templates')

import cubes
import json

class InvalidRequestError(Exception):
    """Raised by controllers and handled more gracefuly with JSON reply"""
    pass

class FixingEncoder(json.JSONEncoder):
    def default(self, o):
        if type(o) == decimal.Decimal:
            return float(o)
        if type(o) == datetime.date or type(o) == datetime.datetime:
            return o.isoformat()
        if type(o) == cubes.browser.AggregationResult:
            return o.as_dict()
        else:
            return json.JSONEncoder.default(self, o)

class ApplicationController(object):
{'fraction_non_alphanumeric': 0.09195402298850575, 'fraction_numerical': 0.003284072249589491, 'mean_word_length': 3.5472636815920398, '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': '3799614', 'n_tokens_mistral': 533, 'n_tokens_neox': 530, 'n_words': 154}