<commit_before># -*- coding: utf-8 -*-
"""Helper functions for working with Programs."""
from __future__ import absolute_import

import datetime
import logging
from collections import defaultdict
from copy import deepcopy
from itertools import chain

import six
from six.moves.urllib.parse import urljoin, urlparse, urlunparse  # pylint: disable=import-error
from dateutil.parser import parse
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.cache import cache
from django.urls import reverse
from django.utils.functional import cached_property
from edx_rest_api_client.exceptions import SlumberBaseException
from opaque_keys.edx.keys import CourseKey
from pytz import utc
from requests.exceptions import ConnectionError, Timeout

from course_modes.models import CourseMode
from entitlements.models import CourseEntitlement
from lms.djangoapps.certificates import api as certificate_api
from lms.djangoapps.certificates.models import GeneratedCertificate<commit_msg>Fixing python-modernize issues.<commit_after># -*- coding: utf-8 -*-
"""Helper functions for working with Programs."""
from __future__ import absolute_import

import datetime
import logging
from collections import defaultdict
from copy import deepcopy
from itertools import chain

import six
from dateutil.parser import parse
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.cache import cache
from django.urls import reverse
from django.utils.functional import cached_property
from edx_rest_api_client.exceptions import SlumberBaseException
from opaque_keys.edx.keys import CourseKey
from pytz import utc
from requests.exceptions import ConnectionError, Timeout
from six.moves.urllib.parse import urljoin, urlparse, urlunparse  # pylint: disable=import-error

from course_modes.models import CourseMode
from entitlements.models import CourseEntitlement
from lms.djangoapps.certificates import api as certificate_api
from lms.djangoapps.certificates.models import GeneratedCertificate
{'fraction_non_alphanumeric': 0.04887585532746823, 'fraction_numerical': 0.0009775171065493646, 'mean_word_length': 6.498168498168498, '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': '3618479', 'n_tokens_mistral': 532, 'n_tokens_neox': 520, 'n_words': 197}