<commit_before>#
# python functions which compute statistics tables (no views)
#
# This produces much of the data to be obtained via AJAX calls, but the
# AJAX calls themselves should go elsewhere.
#

import datetime
import bqutil
import local_config
import logging
from collections import defaultdict, OrderedDict
from datatable import DataTableField
from unidecode import unidecode

from google.appengine.api import memcache

mem = memcache.Client()

class DataStats(object):

    GSROOT = local_config.GOOGLE_STORAGE_ROOT
    USE_LATEST = local_config.DATA_DATE=='latest'	# later: generalize to dataset for specific date
    IM_WIDTH = 374/2
    IM_HEIGHT = 200/2
    bqdata = {}<commit_msg>missing re in stats<commit_after>#
# python functions which compute statistics tables (no views)
#
# This produces much of the data to be obtained via AJAX calls, but the
# AJAX calls themselves should go elsewhere.
#

import re
import datetime
import bqutil
import local_config
import logging
from collections import defaultdict, OrderedDict
from datatable import DataTableField
from unidecode import unidecode

from google.appengine.api import memcache

mem = memcache.Client()

class DataStats(object):

    GSROOT = local_config.GOOGLE_STORAGE_ROOT
    USE_LATEST = local_config.DATA_DATE=='latest'	# later: generalize to dataset for specific date
    IM_WIDTH = 374/2
    IM_HEIGHT = 200/2
    bqdata = {}
{'fraction_non_alphanumeric': 0.05698005698005698, 'fraction_numerical': 0.011396011396011397, 'mean_word_length': 4.758196721311475, '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': '2153806', 'n_tokens_mistral': 427, 'n_tokens_neox': 404, 'n_words': 153}