<commit_before>"""
Init
"""
from __future__ import unicode_literals

import datetime
import os
import subprocess

VERSION = (2, 2, 11, 'final', 0)


def get_version(version=None):
    """
    Returns a PEP 386-compliant version number from VERSION.
    """
    if not version:
        version = VERSION
    else:
        assert len(version) == 5
        assert version[3] in ('alpha', 'beta', 'rc', 'final')

    # Now build the two parts of the version number:
    # main = X.Y[.Z]
    # sub = .devN - for pre-alpha releases
    #     | {a|b|c}N - for alpha, beta and rc releases

    parts = 2 if version[2] == 0 else 3
    main = '.'.join(str(x) for x in version[:parts])
<commit_msg>Update to version 2.2.12 - Added new data encoding to compatibility with Python 3<commit_after>"""
Init
"""
from __future__ import unicode_literals

import datetime
import os
import subprocess

VERSION = (2, 2, 12, 'final', 0)


def get_version(version=None):
    """
    Returns a PEP 386-compliant version number from VERSION.
    """
    if not version:
        version = VERSION
    else:
        assert len(version) == 5
        assert version[3] in ('alpha', 'beta', 'rc', 'final')

    # Now build the two parts of the version number:
    # main = X.Y[.Z]
    # sub = .devN - for pre-alpha releases
    #     | {a|b|c}N - for alpha, beta and rc releases

    parts = 2 if version[2] == 0 else 3
    main = '.'.join(str(x) for x in version[:parts])

{'fraction_non_alphanumeric': 0.12690707350901526, 'fraction_numerical': 0.02288488210818308, 'mean_word_length': 2.709511568123393, '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': '3358671', 'n_tokens_mistral': 500, 'n_tokens_neox': 467, 'n_words': 172}