<commit_before>"""A setuptools based setup module for zof.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

import os
import re
from setuptools import setup, find_packages


HERE = os.path.abspath(os.path.dirname(__file__))
README_PATH = os.path.join(HERE, 'README.rst')
VERSION_PATH = os.path.join(HERE, 'zof', '__init__.py')


def _get_description(path):
    with open(path, encoding='utf-8') as afile:
        return afile.read()


def _get_version(path):
    with open(path, encoding='utf-8') as afile:
        regex = re.compile(r"(?m)__version__\s*=\s*'(\d+\.\d+\.\d+)'")
        return regex.search(afile.read()).group(1)<commit_msg>Make setup.py python2 compatible.<commit_after>"""A setuptools based setup module for zof.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

import os
import re
from codecs import open
from setuptools import setup, find_packages


HERE = os.path.abspath(os.path.dirname(__file__))
README_PATH = os.path.join(HERE, 'README.rst')
VERSION_PATH = os.path.join(HERE, 'zof', '__init__.py')


def _get_description(path):
    with open(path, encoding='utf-8') as afile:
        return afile.read()


def _get_version(path):
    with open(path, encoding='utf-8') as afile:
        regex = re.compile(r"(?m)__version__\s*=\s*'(\d+\.\d+\.\d+)'")
        return regex.search(afile.read()).group(1)
{'fraction_non_alphanumeric': 0.1671309192200557, 'fraction_numerical': 0.004874651810584958, 'mean_word_length': 4.283088235294118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3237763', 'n_tokens_mistral': 525, 'n_tokens_neox': 517, 'n_words': 102}