<commit_before>"""
Adaptations of the cached and filesystem template loader working in a
multi-tenant setting
"""

import hashlib
from django import VERSION as DJANGO_VERSION
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from django.template.base import Template
from django.template.loaders.base import Loader as BaseLoader
from django.utils._os import safe_join
from django.utils.encoding import force_bytes
from tenant_schemas.postgresql_backend.base import FakeTenant

DJANGO_1_10 = DJANGO_VERSION[1] >= 10

if DJANGO_1_10:
    from django.template import Origin, TemplateDoesNotExist


    def make_origin(engine, name, loader, template_name, dirs):
        return Origin(name=name, template_name=template_name, loader=loader)
else:
    from django.template.base import TemplateDoesNotExist

<commit_msg>Updated Django 1.10 Version Check<commit_after>"""
Adaptations of the cached and filesystem template loader working in a
multi-tenant setting
"""

import hashlib
from django import VERSION as DJANGO_VERSION
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from django.template.base import Template
from django.template.loaders.base import Loader as BaseLoader
from django.utils._os import safe_join
from django.utils.encoding import force_bytes
from tenant_schemas.postgresql_backend.base import FakeTenant

DJANGO_1_10 = DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] >= 10

if DJANGO_1_10:
    from django.template import Origin, TemplateDoesNotExist


    def make_origin(engine, name, loader, template_name, dirs):
        return Origin(name=name, template_name=template_name, loader=loader)
else:
    from django.template.base import TemplateDoesNotExist


{'fraction_non_alphanumeric': 0.05778756191524491, 'fraction_numerical': 0.012658227848101266, 'mean_word_length': 5.7835820895522385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6941010', 'n_tokens_mistral': 530, 'n_tokens_neox': 510, 'n_words': 169}