<commit_before>from __future__ import unicode_literals

import codecs
from io import BytesIO
from mock import patch
import os
import re

from datetime import datetime, timedelta

from django_webtest import WebTest
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import six

from lxml import etree

from candidates.models import LoggedAction, PersonExtra

from .auth import TestUserMixin
from . import factories


def random_person_id():
    return codecs.encode(os.urandom(8), 'hex').decode()


def change_updated_and_created(la, timestamp):
    # auto_add_now and auto_now are used for the LoggedAction created
    # and updated fields, which are awkward to override. You can do
    # this, however, by use the update() method of QuerySet, which is<commit_msg>Remove some unused imports<commit_after>from __future__ import unicode_literals

import codecs
from io import BytesIO
from mock import patch
import os

from datetime import datetime, timedelta

from django_webtest import WebTest
from django.test.utils import override_settings

from lxml import etree

from candidates.models import LoggedAction, PersonExtra

from .auth import TestUserMixin
from . import factories


def random_person_id():
    return codecs.encode(os.urandom(8), 'hex').decode()


def change_updated_and_created(la, timestamp):
    # auto_add_now and auto_now are used for the LoggedAction created
    # and updated fields, which are awkward to override. You can do
    # this, however, by use the update() method of QuerySet, which is
{'fraction_non_alphanumeric': 0.051118210862619806, 'fraction_numerical': 0.0012779552715654952, 'mean_word_length': 5.023076923076923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5206171', 'n_tokens_mistral': 436, 'n_tokens_neox': 425, 'n_words': 180}