def write_results(results): with open('notification_report.txt', 'a') as datafile: base_func.print_time(datafile, StartDate, EndDate, Version) # print data datafile.write("results: " + str(results)) datafile.write('\n') datafile.write('\n')
def write_results(share_data): with open('users_countries.txt', 'a') as datafile: # print date and time base_func.print_time(datafile, StartDate, EndDate, Version) # print countries base_func.print_countries(datafile, countries_code) # print data base_func.print_dict(datafile, share_data)
def write_results(results): with open('users_data.txt', 'a') as datafile: # print time base_func.print_time(datafile, StartDate, EndDate, Version) # print data base_func.resultsFile.write("all sessions") base_func.print_dict(datafile, extract_data(StartDate, EndDate, UserId, EventName, Version)) base_func.resultsFile.write("TM sessions") base_func.print_dict(datafile, extract_data_tm(StartDate, EndDate, UserId, EventName, Version)) base_func.resultsFile.write("token sessions") base_func.print_dict(datafile, extract_data_tokens(StartDate, EndDate, UserId, EventName, Version))
share_twt_us_unique = list(set(share_twt_us)) share_msg_us_unique = list(set(share_msg_us)) share_more_us_unique = list(set(share_more_us)) skip_share_us_unique = list(set(skip_share_us)) # edited and shared all_shares = list( set(share_fb_us_unique + share_inst_us_unique + share_twt_us_unique + share_msg_us_unique + share_more_us_unique)) edit_approved_is_share = list( set(unique_collage_approved_us) & set(all_shares)) # open a file to write the data resultsFile.write("countries: ") resultsFile.write(base_func.return_countries(countries_code)) resultsFile.write("\n") base_func.print_time(resultsFile, StartDate, EndDate, Version) # print data US # print general data base_func.print_numeric_data(resultsFile, "unique_users_us", unique_users_us) base_func.print_numeric_data(resultsFile, "unique_new_users_us", unique_new_users_us) if sessions_duration_ms_us: base_func.print_values(resultsFile, "avg_sessions_duration_us", avg_sessions_duration_value_us) base_func.print_values(resultsFile, "median_sessions_duration_us", median_sessions_duration_value_us) resultsFile.write("total time in app during 1st week %d:%02d:%02d" % (h, m, s)) resultsFile.write("\n") base_func.print_values(resultsFile, "avg_gallery_size_us",
def write_results(skin_type_data): with open('skins_analysis.txt', 'a') as datafile: #print date and time base_func.print_time(datafile, StartDate, EndDate, Version) # print data base_func.print_dict(datafile, skin_type_data)