Created
January 4, 2012 04:35
-
-
Save gjcourt/1558523 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for site, sns in _map.iteritems(): | |
counts_total = [0] * 5 | |
for sn in sns: | |
counts = [[int(c) for c in l.split('\t')[1:]] for l in website_map[sn]] | |
for count in counts: | |
counts_total = [sum(c) for c in zip(counts_total, count)] | |
print '%s\t%s' % (site.strip(), '\t'.join([str(c) for c in counts_total])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment