<commit_before># -*- coding: UTF-8 -*-
from __future__ import absolute_import
import mimetypes
import os
import os.path
import re
import httplib2
import random
import sys
import simplejson
from collections import defaultdict
from datetime import date, datetime, time, timedelta
from django import template
from django.conf import settings as dsettings
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from django.template import defaultfilters, Context
from django.template.loader import render_to_string
from django.utils.html import escape
from django.utils.safestring import mark_safe

from conference import dataaccess
from conference import models
from conference import utils
from conference import settings
from conference.settings import MIMETYPE_NAME_CONVERSION_DICT as mimetype_conversion_dict
from conference.signals import timetable_prepare
from conference.utils import TimeTable

from pages.settings import PAGE_DEFAULT_LANGUAGE

from tagging.models import Tag, TaggedItem
from tagging.utils import parse_tag_input

from fancy_tag import fancy_tag

mimetypes.init()

register = template.Library()

def _lang(ctx):
    try:
        return ctx['LANGUAGE_CODE']
    except KeyError:
        return PAGE_DEFAULT_LANGUAGE

def _request_cache(request, key):
    """
    ritorna (o crea) un dizionario collegato all'oggetto passato utilizzabile
    come cache con visibilità pari a quella della request.
    """
    try:
        return request._conf_cache[key]
    except KeyError:
        request._conf_cache[key] = {}
    except AttributeError:
        request._conf_cache = {key: {}}
    return request._conf_cache[key]

@fancy_tag(register, takes_context=True)
def get_deadlines(context, year=None, limit=None, not_expired=True):
    if year is None:
        year = date.today().year<commit_msg>utilizzo un codice lingua a due caratteri<commit_after># -*- coding: UTF-8 -*-
from __future__ import absolute_import
import mimetypes
import os
import os.path
import re
import httplib2
import random
import sys
import simplejson
from collections import defaultdict
from datetime import date, datetime, time, timedelta
from django import template
from django.conf import settings as dsettings
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from django.template import defaultfilters, Context
from django.template.loader import render_to_string
from django.utils.html import escape
from django.utils.safestring import mark_safe

from conference import dataaccess
from conference import models
from conference import utils
from conference import settings
from conference.settings import MIMETYPE_NAME_CONVERSION_DICT as mimetype_conversion_dict
from conference.signals import timetable_prepare
from conference.utils import TimeTable

from pages.settings import PAGE_DEFAULT_LANGUAGE

from tagging.models import Tag, TaggedItem
from tagging.utils import parse_tag_input

from fancy_tag import fancy_tag

mimetypes.init()

register = template.Library()

def _lang(ctx):
    try:
        l = ctx['LANGUAGE_CODE']
    except KeyError:
        l = PAGE_DEFAULT_LANGUAGE
    return l.split('-', 1)[0]

def _request_cache(request, key):
    """
    ritorna (o crea) un dizionario collegato all'oggetto passato utilizzabile
    come cache con visibilità pari a quella della request.
    """
    try:
        return request._conf_cache[key]
    except KeyError:
        request._conf_cache[key] = {}
    except AttributeError:
        request._conf_cache = {key: {}}
    return request._conf_cache[key]

@fancy_tag(register, takes_context=True)
def get_deadlines(context, year=None, limit=None, not_expired=True):
    if year is None:
        year = date.today().year
{'fraction_non_alphanumeric': 0.06071049840933192, 'fraction_numerical': 0.0015906680805938495, 'mean_word_length': 4.769113149847095, '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': '4316293', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1047, 'n_words': 356}