<commit_before>import argparse
import os

try:
    import importlib.machinery
    import importlib.util

    def load_module(name, filepath):
        loader = importlib.machinery.SourceFileLoader(name, filepath)
        spec = importlib.util.spec_from_loader(loader.name, loader)
        mod = importlib.util.module_from_spec(spec)
        loader.exec_module(mod)

except ImportError:
    import imp

    def load_module(name, filepath):
        with open(filepath, 'r') as fd:
            imp.load_module('a_b', f, path, ('.py', 'U', imp.PY_SOURCE))

from better_exceptions import interact, hook<commit_msg>fix Python 2 import (fix #78)<commit_after>import argparse
import os

try:
    import importlib.machinery
    import importlib.util

    def load_module(name, filepath):
        loader = importlib.machinery.SourceFileLoader(name, filepath)
        spec = importlib.util.spec_from_loader(loader.name, loader)
        mod = importlib.util.module_from_spec(spec)
        loader.exec_module(mod)

except ImportError:
    import imp

    def load_module(name, filepath):
        with open(filepath, 'r') as fd:
            imp.load_module('a_b', fd, filepath, ('.py', 'U', imp.PY_SOURCE))

from better_exceptions import interact, hook
{'fraction_non_alphanumeric': 0.10105092966855295, 'fraction_numerical': 0.002425222312045271, 'mean_word_length': 3.4532374100719423, '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': '7460360', 'n_tokens_mistral': 396, 'n_tokens_neox': 388, 'n_words': 92}