"""simple docstring"""






import math


def      UpperCAmelCase__			(							lowerCAmelCase__	:str   ,						lowerCAmelCase__	:List[str] = 0   ,						lowerCAmelCase__	:int = 0						)					->       list:
      '''simple docstring'''


      lowercase								=      end or len(_SCREAMING_SNAKE_CASE						)
      for i in range(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						):
            lowercase								=      i
            lowercase								=      array[i]
            while temp_index != start and temp_index_value < array[temp_index - 1]:
                  lowercase								=      array[temp_index - 1]
                  temp_index -= 1
            lowercase								=      temp_index_value
      return array


def      UpperCAmelCase__			(							lowerCAmelCase__	:Optional[int]   ,						lowerCAmelCase__	:Union[str, Any]   ,						lowerCAmelCase__	:Union[str, Any]						)					->       None:  # Max Heap
      '''simple docstring'''


      lowercase								=      index
      lowercase								=      2 * index + 1  # Left Node
      lowercase								=      2 * index + 2  # Right Node

      if left_index < heap_size and array[largest] < array[left_index]:
            lowercase								=      left_index

      if right_index < heap_size and array[largest] < array[right_index]:
            lowercase								=      right_index

      if largest != index:
            lowercase								=      array[largest], array[index]
            heapify(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						)


def      UpperCAmelCase__			(							lowerCAmelCase__	:Union[str, Any]						)					->       list:
      '''simple docstring'''


      lowercase								=      len(_SCREAMING_SNAKE_CASE						)

      for i in range(n // 2   ,						-1   ,						-1						):
            heapify(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						)

      for i in range(n - 1   ,						0   ,						-1						):
            lowercase								=      array[0], array[i]
            heapify(_SCREAMING_SNAKE_CASE   ,						0   ,						_SCREAMING_SNAKE_CASE						)

      return array


def      UpperCAmelCase__			(							lowerCAmelCase__	:Optional[int]   ,						lowerCAmelCase__	:Optional[Any]   ,						lowerCAmelCase__	:List[Any]   ,						lowerCAmelCase__	:str						)					->       int:
      '''simple docstring'''


      if (array[first_index] > array[middle_index]) != (
          array[first_index] > array[last_index]
      ):
            return array[first_index]
      elif (array[middle_index] > array[first_index]) != (
          array[middle_index] > array[last_index]
      ):
            return array[middle_index]
      else:
            return array[last_index]


def      UpperCAmelCase__			(							lowerCAmelCase__	:List[str]   ,						lowerCAmelCase__	:Tuple   ,						lowerCAmelCase__	:Optional[Any]   ,						lowerCAmelCase__	:List[str]						)					->       int:
      '''simple docstring'''


      lowercase								=      low
      lowercase								=      high
      while True:
            while array[i] < pivot:
                  i += 1
            j -= 1
            while pivot < array[j]:
                  j -= 1
            if i >= j:
                  return i
            lowercase								=      array[j], array[i]
            i += 1


def      UpperCAmelCase__			(							lowerCAmelCase__	:Tuple						)					->       list:
      '''simple docstring'''


      if len(_SCREAMING_SNAKE_CASE						) == 0:
            return array
      lowercase								=      2 * math.ceil(math.loga(len(_SCREAMING_SNAKE_CASE						)						)						)
      lowercase								=      1_6
      return intro_sort(_SCREAMING_SNAKE_CASE   ,						0   ,						len(_SCREAMING_SNAKE_CASE						)   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						)


def      UpperCAmelCase__			(							lowerCAmelCase__	:Tuple   ,						lowerCAmelCase__	:Optional[Any]   ,						lowerCAmelCase__	:Any   ,						lowerCAmelCase__	:Tuple   ,						lowerCAmelCase__	:str						)					->       list:
      '''simple docstring'''


      while end - start > size_threshold:
            if max_depth == 0:
                  return heap_sort(_SCREAMING_SNAKE_CASE						)
            max_depth -= 1
            lowercase								=      median_of_a(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						start + ((end - start) // 2) + 1   ,						end - 1						)
            lowercase								=      partition(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						)
            intro_sort(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						)
            lowercase								=      p
      return insertion_sort(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE						)


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       __lowerCAmelCase       :			str   	=input("""Enter numbers separated by a comma : """).strip()
       __lowerCAmelCase       :			Dict   	=[float(item) for item in user_input.split(""",""")]
       print(sort(unsorted))










"""simple docstring"""





import csv

import tweepy

# Twitter API credentials
__A											=						""""""
__A											=						""""""
__A											=						""""""
__A											=						""""""
def 					__A  (_SCREAMING_SNAKE_CASE     )   ->None:





  """simple docstring"""


  lowerCAmelCase__     :Any											=				tweepy.OAuthHandler(_SCREAMING_SNAKE_CASE	,  _SCREAMING_SNAKE_CASE     )
  auth.set_access_token(_SCREAMING_SNAKE_CASE	,  _SCREAMING_SNAKE_CASE     )
  lowerCAmelCase__     :List[Any]											=				tweepy.API(_SCREAMING_SNAKE_CASE     )

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

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

  # save most recent tweets
  alltweets.extend(_SCREAMING_SNAKE_CASE     )

  # save the id of the oldest tweet less one
  lowerCAmelCase__     :Tuple											=				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
    lowerCAmelCase__     :Union[str, Any]											=				api.user_timeline(
        screen_name=_SCREAMING_SNAKE_CASE	,  count=200	,  max_id=_SCREAMING_SNAKE_CASE     )

    # save most recent tweets
    alltweets.extend(_SCREAMING_SNAKE_CASE     )

    # update the id of the oldest tweet less one
    lowerCAmelCase__     :Tuple											=				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
  lowerCAmelCase__     :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:
    lowerCAmelCase__     :List[str]											=				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""")
