






'''simple docstring'''







import csv

import tweepy

# Twitter API credentials
UpperCamelCase    :      Dict  			=		''
UpperCamelCase    :      Optional[Any]  			=		''
UpperCamelCase    :      int  			=		''
UpperCamelCase    :      Optional[int]  			=		''
def 						A__			(				__lowerCAmelCase		:			str						):
      # authorize twitter, initialize tweepy
      lowerCamelCase__         =  tweepy.OAuthHandler(__lowerCAmelCase   ,    __lowerCAmelCase						)
      auth.set_access_token(__lowerCAmelCase   ,    __lowerCAmelCase						)
      lowerCamelCase__         =  tweepy.API(__lowerCAmelCase						)

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

      # make initial request for most recent tweets (200 is the maximum allowed count)
      lowerCamelCase__         =  api.user_timeline(screen_name=__lowerCAmelCase   ,    count=200						)

      # save most recent tweets
      alltweets.extend(__lowerCAmelCase						)

      # save the id of the oldest tweet less one
      lowerCamelCase__         =  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
            lowerCamelCase__         =  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
            lowerCamelCase__         =  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
      lowerCamelCase__         =  [[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:
            lowerCamelCase__         =  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')









'''simple docstring'''







from __future__ import annotations

import math
def 						A__			(				__lowerCAmelCase		:			int						):

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or number % 2 == 0 or number % 3 == 0:
												# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
												return False

						# All primes number are in format of 6k +/- 1
						for i in range(5   ,    int(math.sqrt(__lowerCAmelCase						) + 1						)   ,    6						):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True


UpperCamelCase    :      str  			=		[num for num in range(3, 10_00_01, 2) if not is_prime(num)]
def 						A__			(				__lowerCAmelCase		:			int						):
						if not isinstance(__lowerCAmelCase   ,    __lowerCAmelCase						):
												raise ValueError("""n must be an integer"""						)
						if n <= 0:
												raise ValueError("""n must be >= 0"""						)

						lowerCamelCase__         =  []
						for num in range(len(__lowerCAmelCase						)						):
												lowerCamelCase__         =  0
												while 2 * i * i <= odd_composites[num]:
																		lowerCamelCase__         =  odd_composites[num] - 2 * i * i
																		if is_prime(__lowerCAmelCase						):
																								break
																		i += 1
												else:
																		list_nums.append(odd_composites[num]						)
																		if len(__lowerCAmelCase						) == n:
																								return list_nums

						return []
def 						A__			(				):
						return compute_nums(1						)[0]


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

