<commit_before># -*- coding: utf-8 -*-

"""
flstats
~~~~~~~

This module allows you to monitor Flask requests execution time.
Statistics can be accessed by using the '/flstats/' route.
"""

import json

from flask import Blueprint, Flask, jsonify, make_response, request, Response
from functools import wraps
from Queue import Queue
from threading import Thread
from time import time as now

class _Stat(object):
    """The _Stat class, which stores statistics for a specific URL."""

    def __init__(self):
        # Number of requests for the URL
        self.count = 0

        # Execution time for all requests
        self.total_time = 0.

        # Shortest request execution time
        self.min_time = 3600.

        # Longest request execution time 
        self.max_time = 0.

        # Computed data
        self.data = {}

    def update(self, time):
        self.count += 1<commit_msg>Removes unused imports<commit_after># -*- coding: utf-8 -*-

"""
flstats
~~~~~~~

This module allows you to monitor Flask requests execution time.
Statistics can be accessed by using the '/flstats/' route.
"""

from flask import Blueprint, Flask, json, make_response, request, Response
from functools import wraps
from Queue import Queue
from threading import Thread
from time import time as now

class _Stat(object):
    """The _Stat class, which stores statistics for a specific URL."""

    def __init__(self):
        # Number of requests for the URL
        self.count = 0

        # Execution time for all requests
        self.total_time = 0.

        # Shortest request execution time
        self.min_time = 3600.

        # Longest request execution time 
        self.max_time = 0.

        # Computed data
        self.data = {}

    def update(self, time):
        self.count += 1
{'fraction_non_alphanumeric': 0.08588957055214724, 'fraction_numerical': 0.010039040713887339, 'mean_word_length': 2.6169354838709675, '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': '7092573', 'n_tokens_mistral': 513, 'n_tokens_neox': 478, 'n_words': 201}