<commit_before>import json
import sys

# turn the list of files into json for working with
def main():
    inFileName = sys.argv[1]
    outFileName = '{0}.json'.format(inFileName)

    inFile = open(inFileName, 'r')
    outFile = open(outFileName, 'w')

    for line in inFile:
        d = dict()
        line = line.strip()
        attrs = line.split('_')
        d['imageName'] = line
        d['vehicleID'] = attrs[0]
        d['cameraID'] = attrs[1]
        d['colorID'] = str(-1)
        d['typeID'] = str(-1)
        outFile.write(d+'\n')
    inFile.close()


if __name__ == '__main__':
    main()<commit_msg>change list of files, into json<commit_after>import json
import sys

# turn the list of files into json for working with
def main():
    inFileName = sys.argv[1]
    outFileName = '{0}.json'.format(inFileName)

    inFile = open(inFileName, 'r')
    outFile = open(outFileName, 'w')

    for line in inFile:
        d = dict()
        line = line.strip()
        attrs = line.split('_')
        d['imageName'] = line
        d['vehicleID'] = attrs[0]
        d['cameraID'] = attrs[1]
        d['colorID'] = str(-1)
        d['typeID'] = str(-1)
        outFile.write(json.dumps(d)+'\n')
    inFile.close()


if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.15873015873015872, 'fraction_numerical': 0.009523809523809525, 'mean_word_length': 2.4359673024523163, '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': '5252308', 'n_tokens_mistral': 432, 'n_tokens_neox': 427, 'n_words': 108}