
import csv

import tweepy

# Twitter API credentials
_SCREAMING_SNAKE_CASE    :      Tuple          =			''
_SCREAMING_SNAKE_CASE    :      Any          =			''
_SCREAMING_SNAKE_CASE    :      Tuple          =			''
_SCREAMING_SNAKE_CASE    :      Dict          =			''

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						str       ) ->       None:

				"""simple docstring"""







				A__  :	Union[str, Any]         =							tweepy.OAuthHandler(__UpperCamelCase							,						__UpperCamelCase       )
				auth.set_access_token(__UpperCamelCase							,						__UpperCamelCase       )
				A__  :	Tuple         =							tweepy.API(__UpperCamelCase       )

				# initialize a list to hold all the tweepy Tweets
				A__  :	List[Any]         =							[]

				# make initial request for most recent tweets (200 is the maximum allowed count)
				A__  :	List[str]         =							api.user_timeline(screen_name=__UpperCamelCase							,						count=2_00       )

				# save most recent tweets
				alltweets.extend(__UpperCamelCase       )

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

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

								# all subsequent requests use the max_id param to prevent duplicates
								A__  :	Union[str, Any]         =							api.user_timeline(
								    screen_name=__UpperCamelCase							,						count=2_00							,						max_id=__UpperCamelCase       )

								# save most recent tweets
								alltweets.extend(__UpperCamelCase       )

								# update the id of the oldest tweet less one
								A__  :	Optional[int]         =							alltweets[-1].id - 1

								print(F"...{len(__UpperCamelCase       )} tweets downloaded so far"       )

				# transform the tweepy tweets into a 2D array that will populate the csv
				A__  :	Any         =							[[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:
								A__  :	Optional[Any]         =							csv.writer(__UpperCamelCase       )
								writer.writerow(['''id''', '''created_at''', '''text''']       )
								writer.writerows(__UpperCamelCase       )


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

def 				SCREAMING_SNAKE_CASE     (      ) ->       Optional[int]:

				"""simple docstring"""







				A__  :	Optional[Any]         =							0
				for i in range(1							,						10_01       ):
								total += i**i
				return str(__UpperCamelCase       )[-10:]


if __name__ == "__main__":
					print(solution())