


'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


UpperCAmelCase_		:       Optional[Any]							       =		logging.get_logger(__name__)

UpperCAmelCase_		:       Dict							       =		{
    'facebook/convnext-tiny-224': 'https://huggingface.co/facebook/convnext-tiny-224/resolve/main/config.json',
    # See all ConvNeXT models at https://huggingface.co/models?filter=convnext
}





class    lowercase__  (						_snake_case					,					_snake_case ):





							'''simple docstring'''


							A_							:				Optional[int]				     =  """convnext"""






							def __init__(   self   , __snake_case=3   , __snake_case=4   , __snake_case=4   , __snake_case=None   , __snake_case=None   , __snake_case="gelu"   , __snake_case=0.02   , __snake_case=1e-12   , __snake_case=1e-6   , __snake_case=0.0   , __snake_case=224   , __snake_case=None   , __snake_case=None   , **__snake_case   , ):
											super().__init__(**__snake_case  )

											_SCREAMING_SNAKE_CASE			:	str							=				num_channels
											_SCREAMING_SNAKE_CASE			:	Optional[Any]							=				patch_size
											_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				num_stages
											_SCREAMING_SNAKE_CASE			:	List[str]							=				[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
											_SCREAMING_SNAKE_CASE			:	List[str]							=				[3, 3, 9, 3] if depths is None else depths
											_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				hidden_act
											_SCREAMING_SNAKE_CASE			:	Dict							=				initializer_range
											_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				layer_norm_eps
											_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				layer_scale_init_value
											_SCREAMING_SNAKE_CASE			:	Dict							=				drop_path_rate
											_SCREAMING_SNAKE_CASE			:	Any							=				image_size
											_SCREAMING_SNAKE_CASE			:	str							=				["""stem"""] + [f"""stage{idx}""" for idx in range(1   , len(self.depths  ) + 1  )]
											_SCREAMING_SNAKE_CASE		,	_SCREAMING_SNAKE_CASE			:	Optional[int]							=				get_aligned_output_features_output_indices(
											    out_features=__snake_case   , out_indices=__snake_case   , stage_names=self.stage_names  )





class    lowercase__  (						_snake_case ):





							'''simple docstring'''


							A_							:				Union[str, Any]				     =  version.parse("""1.11""" )






							@property
							def UpperCAmelCase_     (   self  ):
											return OrderedDict(
											    [
											        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
											    ]  )






							@property
							def UpperCAmelCase_     (   self  ):
											return 1e-5








'''simple docstring'''


import bsa
import requests







def       snake_case_       (  SCREAMING_SNAKE_CASE__					):







				"""simple docstring"""





				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       snake_case_       (  SCREAMING_SNAKE_CASE__ = 5					):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE			:	List[str]							=				int(float(SCREAMING_SNAKE_CASE__					)					)
				if num_movies < 1:
								return ()
				_SCREAMING_SNAKE_CASE			:	Optional[Any]							=				(
				    """https://www.imdb.com/search/title?title_type="""
				    f"""feature&sort=num_votes,desc&count={num_movies}"""
				)
				_SCREAMING_SNAKE_CASE			:	Any							=				bsa.BeautifulSoup(requests.get(SCREAMING_SNAKE_CASE__					).content							,				"""html.parser"""					)
				return tuple(
				    get_movie_data_from_soup(SCREAMING_SNAKE_CASE__					)
				    for movie in source.find_all("""div"""							,				class_="""lister-item mode-advanced"""					)					)


if __name__ == "__main__":
				import json

				UpperCAmelCase_		:       List[str]							       =		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)
				    )
				)




