def main(): iter_count = 0 for users in get_user_sessions(limit=800*BYTES_IN_MB, remove_autorecurring=True): prefix = 'user_sessions.' + str(iter_count) put_json_files(users, prefix, encoder=UserEncoder) print "Wrote to file prefix " + prefix iter_count += 1 prefix = 'user_sessions.' + str(iter_count)
def main(): short_sessions, zeros = get_short_sessions(keepzeros=False) print "Number of short sessions: " + str(len(short_sessions)) print "Number of single-query sessions: " + str(zeros) put_json_files(short_sessions, "short_sessions", encoder=SessionEncoder)