This commit is contained in:
wea_ondara
2020-01-25 14:25:57 +01:00
parent 60d966a497
commit ce3ff5145c

View File

@@ -51,7 +51,7 @@ def main(folder, intervl):
if firstcontrib[a['OwnerUserId']] + timedelta(days=DAYS_NEW_USER) > a['CreationDate']: if firstcontrib[a['OwnerUserId']] + timedelta(days=DAYS_NEW_USER) > a['CreationDate']:
activitynewusersinmonth[p['OwnerUserId']] += 1 activitynewusersinmonth[p['OwnerUserId']] += 1
activitysum = sum(activitynewusersinmonth.values()) activitysum = sum(activitynewusersinmonth.values())
activitynewusers.append(((option_date_from, option_date_to), activitysum / len(activitynewusersinmonth))) activitynewusers.append(((option_date_from, option_date_to), activitysum / len(activitynewusersinmonth) if len(activitynewusersinmonth > 0) else float("nan")))
histfilename = outputdir + "posthist_" + folder.split("/")[-1] + "_" + option_date_from.strftime("%d-%m-%Y") + "_" + option_date_to.strftime("%d-%m-%Y") + "-i" + str(intervl) histfilename = outputdir + "posthist_" + folder.split("/")[-1] + "_" + option_date_from.strftime("%d-%m-%Y") + "_" + option_date_to.strftime("%d-%m-%Y") + "-i" + str(intervl)