<commit_before>import os
import sys


def activate():
    # Try OPENSHIFT
    if os.environ.get('OPENSHIFT_HOMEDIR', None):
        sys.path.insert(0, os.path.dirname(__file__) or '.')
        if os.path.exists(os.path.join(
                os.environ['OPENSHIFT_HOMEDIR'], "python-2.6")):
            py_dir = os.path.join(
                os.environ['OPENSHIFT_HOMEDIR'], "python-2.6")
        else:
            py_dir = os.path.join(os.environ['OPENSHIFT_HOMEDIR'], "python")

        virtenv = py_dir + '/virtenv/'
        py_cache = os.path.join(virtenv, 'lib', '2.6', 'site-packages')
        os.environ['PYTHON_EGG_CACHE'] = os.path.join(py_cache)
        virtualenv = os.path.join(virtenv, 'bin/activate_this.py')

        try:
            if sys.version_info >= (3, 0):
                with open(virtualenv) as f:
                    code = compile(f.read(), virtualenv, 'exec')
                    exec(code, global_vars, local_vars)
            else:
                execfile(virtualenv, dict(__file__=virtualenv))  # noqa<commit_msg>fix var names for py3<commit_after>import os
import sys


def activate():
    # Try OPENSHIFT
    if os.environ.get('OPENSHIFT_HOMEDIR', None):
        sys.path.insert(0, os.path.dirname(__file__) or '.')
        if os.path.exists(os.path.join(
                os.environ['OPENSHIFT_HOMEDIR'], "python-2.6")):
            py_dir = os.path.join(
                os.environ['OPENSHIFT_HOMEDIR'], "python-2.6")
        else:
            py_dir = os.path.join(os.environ['OPENSHIFT_HOMEDIR'], "python")

        virtenv = py_dir + '/virtenv/'
        py_cache = os.path.join(virtenv, 'lib', '2.6', 'site-packages')
        os.environ['PYTHON_EGG_CACHE'] = os.path.join(py_cache)
        virtualenv = os.path.join(virtenv, 'bin/activate_this.py')

        try:
            if sys.version_info >= (3, 0):
                with open(virtualenv) as f:
                    code = compile(f.read(), virtualenv, 'exec')
                    exec(code, globals(), locals())
            else:
                execfile(virtualenv, dict(__file__=virtualenv))  # noqa
{'fraction_non_alphanumeric': 0.1451766953199618, 'fraction_numerical': 0.009073543457497613, 'mean_word_length': 2.0945347119645494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2601227', 'n_tokens_mistral': 693, 'n_tokens_neox': 698, 'n_words': 121}