<commit_before>import math
import sys

def meansd(values):
    mean = sum(values) / len(values)
    var = sum([(v - mean) * (v - mean) for v in values]) / len(values)
    return mean, math.sqrt(var)

def gather(files):
    data = { }

    for j in range(1, 10):
        data[j + 1] = []

    for f in files:
        records = open(f, 'r').readlines()
        if not len(records) == 9:
            continue

        for r in records:
            s = r.split()
            n = int(s[0])
            m = float(s[1])

            data[n].append(m)

    for j in range(1, 10):
        m, s = meansd(data[j + 1])

        print '%d %.3f %.3f' % (j + 1, m, s)

    print '%d points' % len(data[1])

if __name__ == '__main__':
    gather(sys.argv[1:])
            <commit_msg>Typo - 1 should be 2<commit_after>import math
import sys

def meansd(values):
    mean = sum(values) / len(values)
    var = sum([(v - mean) * (v - mean) for v in values]) / len(values)
    return mean, math.sqrt(var)

def gather(files):
    data = { }

    for j in range(1, 10):
        data[j + 1] = []

    for f in files:
        records = open(f, 'r').readlines()
        if not len(records) == 9:
            continue

        for r in records:
            s = r.split()
            n = int(s[0])
            m = float(s[1])

            data[n].append(m)

    for j in range(1, 10):
        m, s = meansd(data[j + 1])

        print '%d %.3f %.3f' % (j + 1, m, s)

    print '%d points' % len(data[2])

if __name__ == '__main__':
    gather(sys.argv[1:])
            
{'fraction_non_alphanumeric': 0.16267012313674659, 'fraction_numerical': 0.0220349967595593, 'mean_word_length': 1.7135325131810193, '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': '7581384', 'n_tokens_mistral': 585, 'n_tokens_neox': 554, 'n_words': 164}