


import csv

import tweepy

# Twitter API credentials
lowerCAmelCase	=							''
lowerCAmelCase	=							''
lowerCAmelCase	=							''
lowerCAmelCase	=							''
def       _a			(				SCREAMING_SNAKE_CASE					):


		"""simple docstring"""




		lowercase__						=				tweepy.OAuthHandler(SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE					)
		auth.set_access_token(SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE					)
		lowercase__						=				tweepy.API(SCREAMING_SNAKE_CASE					)

		# initialize a list to hold all the tweepy Tweets
		lowercase__						=				[]

		# make initial request for most recent tweets (200 is the maximum allowed count)
		lowercase__						=				api.user_timeline(screen_name=SCREAMING_SNAKE_CASE						,    count=2_00					)

		# save most recent tweets
		alltweets.extend(SCREAMING_SNAKE_CASE					)

		# save the id of the oldest tweet less one
		lowercase__						=				alltweets[-1].id - 1

		# keep grabbing tweets until there are no tweets left to grab
		while len(SCREAMING_SNAKE_CASE					) > 0:
				print(f'getting tweets before {oldest}'					)

				# all subsequent requests use the max_id param to prevent duplicates
				lowercase__						=				api.user_timeline(
				    screen_name=SCREAMING_SNAKE_CASE						,    count=2_00						,    max_id=SCREAMING_SNAKE_CASE					)

				# save most recent tweets
				alltweets.extend(SCREAMING_SNAKE_CASE					)

				# update the id of the oldest tweet less one
				lowercase__						=				alltweets[-1].id - 1

				print(f'...{len(SCREAMING_SNAKE_CASE					)} tweets downloaded so far'					)

		# transform the tweepy tweets into a 2D array that will populate the csv
		lowercase__						=				[[tweet.id_str, tweet.created_at, tweet.text] for tweet in alltweets]

		# write the csv
		with open(f'new_{screen_name}_tweets.csv'						,    '''w'''					) as f:
				lowercase__						=				csv.writer(SCREAMING_SNAKE_CASE					)
				writer.writerow(['''id''', '''created_at''', '''text''']					)
				writer.writerows(SCREAMING_SNAKE_CASE					)


if __name__ == "__main__":
			# pass in the username of the account you want to download
			get_all_tweets('FirePing32')






def       _a			(				SCREAMING_SNAKE_CASE = 10_00					):


		"""simple docstring"""




		return sum(e for e in range(3						,    SCREAMING_SNAKE_CASE					) if e % 3 == 0 or e % 5 == 0					)


if __name__ == "__main__":
			print(f"""{solution() = }""")


