
def     UpperCAmelCase_  (						__lowerCAmelCase = 10	) ->						List[str]:




    if not isinstance(__lowercase	,					__lowercase	) or n < 0:
        raise ValueError('''Invalid input'''	)
    __lowercase		:			Tuple	    =       10**n
    __lowercase		:			Tuple	    =       28_433 * (pow(2	,					7_830_457	,					__lowercase	)) + 1
    return str(number % modulus	)


if __name__ == "__main__":
 from doctest import testmod

 testmod()
 print(F'{solution(10) = }')




import csv

import tweepy

# Twitter API credentials
__lowerCAmelCase					:			str			      =		""
__lowerCAmelCase					:			Any			      =		""
__lowerCAmelCase					:			Any			      =		""
__lowerCAmelCase					:			Optional[int]			      =		""


def     UpperCAmelCase_  (						__lowerCAmelCase	) ->						None:
    # authorize twitter, initialize tweepy
    __lowercase		:			List[Any]	    =       tweepy.OAuthHandler(__lowerCAmelCase	,					__lowerCAmelCase	)
    auth.set_access_token(__lowerCAmelCase	,					__lowerCAmelCase	)
    __lowercase		:			str	    =       tweepy.API(__lowerCAmelCase	)

    # initialize a list to hold all the tweepy Tweets
    __lowercase		:			Union[str, Any]	    =       []

    # make initial request for most recent tweets (200 is the maximum allowed count)
    __lowercase		:			List[Any]	    =       api.user_timeline(screen_name=__lowerCAmelCase	,					count=200	)

    # save most recent tweets
    alltweets.extend(__lowerCAmelCase	)

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

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

        # all subsequent requests use the max_id param to prevent duplicates
        __lowercase		:			Tuple	    =       api.user_timeline(
            screen_name=__lowerCAmelCase	,					count=200	,					max_id=__lowerCAmelCase	)

        # save most recent tweets
        alltweets.extend(__lowerCAmelCase	)

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

        print(F'...{len(__lowerCAmelCase	)} tweets downloaded so far'	)

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


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


