




from .chunk_utils import chunk_layer
from .data_transforms import make_atomaa_masks
from .feats import atomaa_to_atomaa, frames_and_literature_positions_to_atomaa_pos, torsion_angles_to_frames
from .loss import compute_predicted_aligned_error, compute_tm
from .protein import Protein as OFProtein
from .protein import to_pdb
from .rigid_utils import Rigid, Rotation
from .tensor_utils import dict_multimap, flatten_final_dims, permute_final_dims












import bsa
import requests

def       UpperCAmelCase_							(   __UpperCAmelCase		:			bsa.element.ResultSet							)      ->				dict[str, str]:
      return {
          "name": soup.ha.a.text,
          "genre": soup.find('span'    ,    class_='genre'							).text.strip(),
          "rating": soup.strong.text,
          "page_link": f"https://www.imdb.com{soup.a.get('href'							)}",
      }

def       UpperCAmelCase_							(   __UpperCAmelCase		:			int = 5							)      ->				tuple:
      SCREAMING_SNAKE_CASE_					=    int(float(__UpperCAmelCase							)							)
      if num_movies < 1:
            return ()
      SCREAMING_SNAKE_CASE_					=    (
          'https://www.imdb.com/search/title?title_type='
          f"feature&sort=num_votes,desc&count={num_movies}"
      )
      SCREAMING_SNAKE_CASE_					=    bsa.BeautifulSoup(requests.get(__UpperCAmelCase							).content    ,    'html.parser'							)
      return tuple(
          get_movie_data_from_soup(__UpperCAmelCase							)
          for movie in source.find_all('div'    ,    class_='lister-item mode-advanced'							)							)


if __name__ == "__main__":
   import json

   lowerCamelCase__				:     int			       =							int(input('How many movies would you like to see? '))
   print(
       ', '.join(
           json.dumps(movie, indent=4) for movie in get_imdb_top_movies(num_movies)
       )
   )