<commit_before>#!/usr/bin/python

import timeit, sys

def wrapper(func, *args, **kwargs):
    def wrapped():
        return func(*args, **kwargs)
    return wrapped

def start(file, outfile):
    input = open(file, 'r')
    output = open(outfile, 'w')

    line = input.readline()
    while line:
        line = line.replace('Tellus', 'Terra')
        line = line.replace('tellus', 'terra')
        output.write(line)
        line = input.readline()

def main(argv):
    file = 'dump.txt'
    output = 'res.txt'
    for i in range(len(argv)):
        if argv[i] == '-f':
            i = i + 1
            file = argv[i]
        elif argv[i] == '-o':
            i = i + 1
            output = argv[i]

    #ns = time.time()
    wrapped = wrapper(start, file, output)
    print (timeit.timeit(wrapped, number=1))
    #totaltime = (time.time() - ns) / 1000000
    #print (totaltime)
    sys.exit(0)

if __name__ == '__main__':main(sys.argv[1:])<commit_msg>Changed python return from seconds to milliseconds<commit_after>#!/usr/bin/python

import timeit, sys

def wrapper(func, *args, **kwargs):
    def wrapped():
        return func(*args, **kwargs)
    return wrapped

def start(file, outfile):
    input = open(file, 'r')
    output = open(outfile, 'w')

    line = input.readline()
    while line:
        line = line.replace('Tellus', 'Terra')
        line = line.replace('tellus', 'terra')
        output.write(line)
        line = input.readline()

def main(argv):
    file = 'dump.txt'
    output = 'res.txt'
    for i in range(len(argv)):
        if argv[i] == '-f':
            i = i + 1
            file = argv[i]
        elif argv[i] == '-o':
            i = i + 1
            output = argv[i]

    #ns = time.time()
    wrapped = wrapper(start, file, output)
    print (timeit.timeit(wrapped, number=1)*1000)
    #totaltime = (time.time() - ns) / 1000000
    #print (totaltime)
    sys.exit(0)

if __name__ == '__main__':main(sys.argv[1:])
{'fraction_non_alphanumeric': 0.16153846153846155, 'fraction_numerical': 0.014358974358974359, 'mean_word_length': 2.290050590219224, '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': '5368976', 'n_tokens_mistral': 691, 'n_tokens_neox': 664, 'n_words': 169}