comparison master/bin/finalMerge.py @ 36:9d4f130073b8

merge the uploaded results of fixAndMerge
author Henry S. Thompson <ht@markup.co.uk>
date Thu, 29 Nov 2018 13:41:27 +0000
parents
children beae6309d4ec
comparison
equal deleted inserted replaced
35:1b6bcc54268d 36:9d4f130073b8
1 #!/usr/bin/env python3
2 import sys,re
3 mh={}
4 ms={}
5 for l in sys.stdin:
6 (h,m,y,c)=l.split()
7 if h=='http':
8 tab=mh
9 else:
10 tab=ms
11 key='%s\t%s'%(m,y)
12 tab[key]=tab.get(key,0)+int(c)
13 for (l,tab) in zip(['http','https'],[mh,ms]):
14 for k in sorted(tab.keys()):
15 print(l,k,tab[k],sep='\t')