<commit_before>'''
    ModernGL main
'''

import argparse
import json
import os
import sys

import ModernGL


def main(argv=None):
    '''
        main
    '''

    parser = argparse.ArgumentParser(prog='ModernGL')
    parser.add_argument('-v', '--version', action='version', version='ModernGL %s' % ModernGL.__version__)
    parser.add_argument('-i', '--info', action='store_true', default=False)
    args = parser.parse_args(argv)

    ctx = ModernGL.create_standalone_context()

    if args.info:
        print(json.dumps(ctx.info, sort_keys=True, indent=4))

    else:
        repo = os.path.isfile(os.path.join(os.path.dirname(__file__), 'README.md'))
        install = '(git repository)' if repo else '(installed)'

        print('ModernGL:', ModernGL.__version__, install)
        print('Vendor:', ctx.info['GL_VENDOR'])
        print('Renderer:', ctx.info['GL_RENDERER'])
        print('Version:', ctx.info['GL_VERSION'])
        print('Python:', sys.version)
        print('Platform:', sys.platform)


if __name__ == '__main__':
    main()
<commit_msg>fix main program<commit_after>'''
    ModernGL main
'''

import argparse
import json
import os
import sys

import moderngl


def main(argv=None):
    '''
        main
    '''

    parser = argparse.ArgumentParser(prog='moderngl')
    parser.add_argument('-v', '--version', action='version', version='moderngl %s' % moderngl.__version__)
    parser.add_argument('-i', '--info', action='store_true', default=False)
    args = parser.parse_args(argv)

    ctx = moderngl.create_standalone_context()

    if args.info:
        print(json.dumps(ctx.info, sort_keys=True, indent=4))

    else:
        repo = os.path.isfile(os.path.join(os.path.dirname(__file__), 'README.md'))
        install = '(git repository)' if repo else '(installed)'

        print('moderngl:', moderngl.__version__, install)
        print('Vendor:', ctx.info['GL_VENDOR'])
        print('Renderer:', ctx.info['GL_RENDERER'])
        print('Version:', ctx.info['GL_VERSION'])
        print('Python:', sys.version)
        print('Platform:', sys.platform)


if __name__ == '__main__':
    main()

{'fraction_non_alphanumeric': 0.16376470588235295, 'fraction_numerical': 0.0009411764705882353, 'mean_word_length': 3.4384133611691023, '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': '1736972', 'n_tokens_mistral': 708, 'n_tokens_neox': 688, 'n_words': 132}