<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import re

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup


classifiers = """\
    Development Status :: 4 - Beta
    Operating System :: OS Independent
    License :: OSI Approved :: MIT License
    Programming Language :: Python
    Programming Language :: Python :: 2
    Programming Language :: Python :: 2.7
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3.3
    Programming Language :: Python :: 3.4
    Programming Language :: Python :: 3.5
    Programming Language :: Python :: Implementation :: CPython
    Programming Language :: Python :: Implementation :: PyPy
"""


def _read(*parts, **kwargs):
    filepath = os.path.join(os.path.dirname(__file__), *parts)
    with io.open(filepath) as fh:
          text = io.open(fh, encoding=kwargs.pop('encoding', 'utf-8')).read()
    return text


def get_version():
    regex = re.compile(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]')
    return regex.search(_read('pqdict', '__init__.py')).group(1)


def get_long_description():
    return _read('README.rst')


setup(
    name='pqdict',
    version=get_version(),
    license='MIT',
    description='A dictionary-like indexed priority queue',
    long_description=get_long_description(),
    keywords=['dict', 'priority queue', 'heap', 'scheduler', 'data structures'],
    author='<NAME>',
    author_email='<EMAIL>',
    url='https://github.com/nvictus/priority-queue-dictionary',
    packages=['pqdict'],
    zip_safe=False,
    classifiers=[s.strip() for s in classifiers.split('\n') if s],
    tests_require=['nose'],
    extras_require={'docs': ['Sphinx>=1.1', 'numpydoc']},
)<commit_msg>fix _read<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import re

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup


classifiers = """\
    Development Status :: 4 - Beta
    Operating System :: OS Independent
    License :: OSI Approved :: MIT License
    Programming Language :: Python
    Programming Language :: Python :: 2
    Programming Language :: Python :: 2.7
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3.3
    Programming Language :: Python :: 3.4
    Programming Language :: Python :: 3.5
    Programming Language :: Python :: Implementation :: CPython
    Programming Language :: Python :: Implementation :: PyPy
"""


def _read(*parts, **kwargs):
    filepath = os.path.join(os.path.dirname(__file__), *parts)
    encoding = kwargs.pop('encoding', 'utf-8')
    with io.open(filepath, encoding=encoding) as fh:
        text = fh.read()
    return text


def get_version():
    version = re.search(
        r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
        _read('pqdict', '__init__.py'), 
        re.MULTILINE).group(1)
    return version


def get_long_description():
    return _read('README.rst')


setup(
    name='pqdict',
    version=get_version(),
    license='MIT',
    description='A dictionary-like indexed priority queue',
    long_description=get_long_description(),
    keywords=['dict', 'priority queue', 'heap', 'scheduler', 'data structures'],
    author='<NAME>',
    author_email='<EMAIL>',
    url='https://github.com/nvictus/priority-queue-dictionary',
    packages=['pqdict'],
    zip_safe=False,
    classifiers=[s.strip() for s in classifiers.split('\n') if s],
    install_requires=[],
    tests_require=['nose'],
    extras_require={'docs': ['Sphinx>=1.1', 'numpydoc']},
)
{'fraction_non_alphanumeric': 0.15912897822445563, 'fraction_numerical': 0.00893355667225014, 'mean_word_length': 3.6232258064516127, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2571363', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1088, 'n_words': 271}