<commit_before><commit_msg>Add a tool for determining active SVN committers.<commit_after>
# Run svn log -l <some number>

import re
import numpy as np
import os

names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200')

def get_count(filename, repo):
    mystr = open(filename).read()
    result = names.findall(mystr)
    u = np.unique(result)
    count = [(x,result.count(x),repo) for x in u]
    return count
    

command = 'svn log -l 2300 > output.txt'
os.chdir('..')
os.system(command)

count = get_count('output.txt', 'NumPy')


os.chdir('../scipy')
os.system(command)

count.extend(get_count('output.txt', 'SciPy'))

os.chdir('../scikits')
os.system(command)
count.extend(get_count('output.txt', 'SciKits'))
count.sort()

             

print "** SciPy and NumPy **"
print "====================="
for val in count:
    print val


                   
{'fraction_non_alphanumeric': 0.19131455399061034, 'fraction_numerical': 0.008215962441314555, 'mean_word_length': 3.3743589743589744, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '5750393', 'n_tokens_mistral': 321, 'n_tokens_neox': 307, 'n_words': 72}