






from __future__ import annotations

import csv

import requests
from bsa import BeautifulSoup







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase = ""      )			->     dict[str, float]:
     UpperCamelCase__      :       List[Any]	    =  url or "https://www.imdb.com/chart/top/?ref_=nv_mv_250"
     UpperCamelCase__      :       List[str]	    =  BeautifulSoup(requests.get(__lowerCAmelCase      ).text ,   "html.parser"      )
     UpperCamelCase__      :       Any	    =  soup.find_all("td" ,   attrs="titleColumn"      )
     UpperCamelCase__      :       List[Any]	    =  soup.find_all("td" ,   class_="ratingColumn imdbRating"      )
     return {
         title.a.text: float(rating.strong.text      )
         for title, rating in zip(__lowerCAmelCase ,   __lowerCAmelCase      )
     }







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase = "IMDb_Top_250_Movies.csv"      )			->     None:
     UpperCamelCase__      :       int	    =  get_imdb_top_aaa_movies()
     with open(__lowerCAmelCase ,   "w" ,   newline=""      ) as out_file:
          UpperCamelCase__      :       Tuple	    =  csv.writer(__lowerCAmelCase      )
          writer.writerow(["Movie title", "IMDb rating"]      )
          for title, rating in movies.items():
               writer.writerow([title, rating]      )


if __name__ == "__main__":
 write_movies()







from __future__ import annotations







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase ,   __lowerCAmelCase      )			->     list[int]:
     UpperCamelCase__      :       Optional[Any]	    =  0
     UpperCamelCase__      :       Any	    =  len(__lowerCAmelCase      ) - 1

     while i < j:
          if nums[i] + nums[j] == target:
               return [i, j]
          elif nums[i] + nums[j] < target:
               UpperCamelCase__      :       Optional[int]	    =  i + 1
          else:
               UpperCamelCase__      :       Dict	    =  j - 1

     return []


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 print(F"""{two_pointer([2, 7, 11, 15], 9) = }""")