fixed a warning in client (mac)
[twcon.git] / scripts / process_blame.py
blobae2c55b6e95bf5d58ecd00244aa4a1034f42ddb1
1 import sys
2 user_map = {"kma":"matricks", "teetow":"matricks", "jlha":"matricks", "jdv":"void", "jaf":"serp"}
3 users = {}
4 for line in sys.stdin:
5 fields = line.split()
6 name = user_map.get(fields[1], fields[1])
7 users[name] = users.get(name, 0) + 1
9 total = reduce(lambda x,y: x+y, users.values())
10 for u in users:
11 print "%6s %6d %s" % ("%03.2f"%(users[u]*100.0/total), users[u], u)
12 print "%03.2f %6d %s" % (100, total, "Total")