



'''simple docstring'''






import csv

import tweepy

# Twitter API credentials
lowerCAmelCase: Optional[Any]							=						''
lowerCAmelCase: List[Any]							=						''
lowerCAmelCase: str							=						''
lowerCAmelCase: Union[str, Any]							=						''
def 				lowerCamelCase__	(						_A    ):
  # authorize twitter, initialize tweepy
  a						: Tuple					       =					tweepy.OAuthHandler(_A			,      _A    )
  auth.set_access_token(_A			,      _A    )
  a						: Dict					       =					tweepy.API(_A    )

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

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

  # save most recent tweets
  alltweets.extend(_A    )

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

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

    # all subsequent requests use the max_id param to prevent duplicates
    a						: Any					       =					api.user_timeline(
        screen_name=_A			,      count=200			,      max_id=_A    )

    # save most recent tweets
    alltweets.extend(_A    )

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

    print(f"""...{len(_A    )} tweets downloaded so far"""    )

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


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




'''simple docstring'''






import math

class 							a__:







    def __init__(				self			:  int						,      __snake_case			:  Any=0     ):  # a graph with Node 0,1,...,N-1
      a						: List[Any]					       =					n
      a						: Optional[Any]					       =					[
          [math.inf for j in range(0						,      __snake_case     )] for i in range(0						,      __snake_case     )
      ]  # adjacency matrix for weight
      a						: Dict					       =					[
          [math.inf for j in range(0						,      __snake_case     )] for i in range(0						,      __snake_case     )
      ]  # dp[i][j] stores minimum distance from i to j







    def       lowercase_	(				self			:  int						,      __snake_case			:  str						,      __snake_case			:  Tuple						,      __snake_case			:  int     ):
      a						: str					       =					w







    def       lowercase_	(				self			:  int     ):
      for k in range(0						,      self.n     ):
        for i in range(0						,      self.n     ):
          for j in range(0						,      self.n     ):
            a						: str					       =					min(self.dp[i][j]						,      self.dp[i][k] + self.dp[k][j]     )







    def       lowercase_	(				self			:  List[str]						,      __snake_case			:  Any						,      __snake_case			:  List[str]     ):
      return self.dp[u][v]


if __name__ == "__main__":
     lowerCAmelCase: Any							=						Graph(5)
     graph.add_edge(0, 2, 9)
     graph.add_edge(0, 4, 1_0)
     graph.add_edge(1, 3, 5)
     graph.add_edge(2, 3, 7)
     graph.add_edge(3, 0, 1_0)
     graph.add_edge(3, 1, 2)
     graph.add_edge(3, 2, 1)
     graph.add_edge(3, 4, 6)
     graph.add_edge(4, 1, 3)
     graph.add_edge(4, 2, 4)
     graph.add_edge(4, 3, 9)
     graph.floyd_warshall()
     graph.show_min(1, 4)
     graph.show_min(0, 3)