<commit_before>import argparse


def main():

    parser = argparse.ArgumentParser()
    parser.add_argument('--codecs', action='store_true')
    parser.add_argument('--version', action='store_true')
    args = parser.parse_args()

    # ---

    if args.version:

        import av._core

        print 'PyAV v' + av._core.pyav_version
        print 'git origin: <EMAIL>:mikeboers/PyAV'
        print 'git commit:', av._core.pyav_commit

        by_config = {}
        for libname, config in sorted(av._core.versions.iteritems()):
            version = config['version']
            if version[0] >= 0:
                by_config.setdefault(
                    (config['configuration'], config['license']),
                    []
                ).append((libname, config))
        for (config, license), libs in sorted(by_config.iteritems()):
            print 'library configuration:', config
            print 'library license:', license
            for libname, config in libs:
                version = config['version']
                print '%-13s %3d.%3d.%3d' % (libname, version[0], version[1], version[2])

    if args.codecs:
        from av.codec import dump_codecs
        dump_codecs()


if __name__ == '__main__':
    main()<commit_msg>Python 3 strikes again!<commit_after>from __future__ import print_function

import argparse


def main():

    parser = argparse.ArgumentParser()
    parser.add_argument('--codecs', action='store_true')
    parser.add_argument('--version', action='store_true')
    args = parser.parse_args()

    # ---

    if args.version:

        import av._core

        print('PyAV v' + av._core.pyav_version)
        print('git origin: <EMAIL>:mikeboers/PyAV')
        print('git commit:', av._core.pyav_commit)

        by_config = {}
        for libname, config in sorted(av._core.versions.iteritems()):
            version = config['version']
            if version[0] >= 0:
                by_config.setdefault(
                    (config['configuration'], config['license']),
                    []
                ).append((libname, config))
        for (config, license), libs in sorted(by_config.iteritems()):
            print('library configuration:', config)
            print('library license:', license)
            for libname, config in libs:
                version = config['version']
                print('%-13s %3d.%3d.%3d' % (libname, version[0], version[1], version[2]))

    if args.codecs:
        from av.codec import dump_codecs
        dump_codecs()


if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.13325517780382962, 'fraction_numerical': 0.008206330597889801, 'mean_word_length': 2.164400494437577, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6667176', 'n_tokens_mistral': 766, 'n_tokens_neox': 724, 'n_words': 166}