2 user_map
= {"kma":"matricks", "teetow":"matricks", "jlha":"matricks", "jdv":"void", "jaf":"serp"}
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())
11 print "%6s %6d %s" % ("%03.2f"%(users
[u
]*100.0/total
), users
[u
], u
)
12 print "%03.2f %6d %s" % (100, total
, "Total")