def num_tweets(): minutes = fetch.get_minutes(NEW_STREAM, MINS_IN_HOUR) one_hour = sum(minutes) return { 'hour': one_hour, 'day': one_hour * 24, # bogus! 'week': one_hour * 24 * 7 # bogus! }
def get_daily_count(stream): minutes = fetch.get_minutes(stream, MINS_IN_DAY) return sum(minutes[:MINS_IN_DAY])