files = [f for f in os.listdir(os.environ['HOME'])
if f.startswith('.timeSampler') and not f.endswith('.gz')]
-hist = defaultdict(int(1))
-histHier = defaultdict(int(1))
-histGtd = defaultdict(int(1))
-histOther = defaultdict(int(1))
+hist = defaultdict(lambda: 1)
+histHier = defaultdict(lambda: 1)
+histGtd = defaultdict(lambda: 1)
+histOther = defaultdict(lambda: 1)
for file in files:
f = open(os.environ['HOME'] + '/' + file, 'r')
for line in f.readlines():