






from __future__ import annotations

import bisect






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int						,snake_case__  : int = 0						,snake_case__  : int = -1	):




     '''simple docstring'''






     if hi < 0:
          __snake_case      :Union[str, Any] 							=    len(snake_case__	)

     while lo < hi:
          __snake_case      :List[str] 							=    lo + (hi - lo) // 2
          if sorted_collection[mid] < item:
               __snake_case      :Any 							=    mid + 1
          else:
               __snake_case      :Optional[int] 							=    mid

     return lo






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int						,snake_case__  : int = 0						,snake_case__  : int = -1	):




     '''simple docstring'''






     if hi < 0:
          __snake_case      :int 							=    len(snake_case__	)

     while lo < hi:
          __snake_case      :int 							=    lo + (hi - lo) // 2
          if sorted_collection[mid] <= item:
               __snake_case      :str 							=    mid + 1
          else:
               __snake_case      :Tuple 							=    mid

     return lo






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int						,snake_case__  : int = 0						,snake_case__  : int = -1	):




     '''simple docstring'''






     sorted_collection.insert(bisect_left(snake_case__						,snake_case__						,snake_case__						,snake_case__	)						,snake_case__	)






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int						,snake_case__  : int = 0						,snake_case__  : int = -1	):




     '''simple docstring'''






     sorted_collection.insert(bisect_right(snake_case__						,snake_case__						,snake_case__						,snake_case__	)						,snake_case__	)






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int	):




     '''simple docstring'''






     __snake_case      :Dict 							=    0
     __snake_case      :Dict 							=    len(snake_case__	) - 1

     while left <= right:
          __snake_case      :Union[str, Any] 							=    left + (right - left) // 2
          __snake_case      :Optional[Any] 							=    sorted_collection[midpoint]
          if current_item == item:
               return midpoint
          elif item < current_item:
               __snake_case      :int 							=    midpoint - 1
          else:
               __snake_case      :Any 							=    midpoint + 1
     return None






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int	):




     '''simple docstring'''






     __snake_case      :List[Any] 							=    bisect.bisect_left(snake_case__						,snake_case__	)
     if index != len(snake_case__	) and sorted_collection[index] == item:
          return index
     return None






def 	UpperCamelCase	(							snake_case__  : list[int]						,snake_case__  : int						,snake_case__  : int						,snake_case__  : int	):




     '''simple docstring'''






     if right < left:
          return None

     __snake_case      :int 							=    left + (right - left) // 2

     if sorted_collection[midpoint] == item:
          return midpoint
     elif sorted_collection[midpoint] > item:
          return binary_search_by_recursion(snake_case__						,snake_case__						,snake_case__						,midpoint - 1	)
     else:
          return binary_search_by_recursion(snake_case__						,snake_case__						,midpoint + 1						,snake_case__	)


if __name__ == "__main__":
     lowerCamelCase__       		=  input("""Enter numbers separated by comma:\n""").strip()
     lowerCamelCase__       		=  sorted(int(item) for item in user_input.split(""","""))
     lowerCamelCase__       		=  int(input("""Enter a single number to be found in the list:\n"""))
     lowerCamelCase__       		=  binary_search(collection, target)
     if result is None:
          print(f'''{target} was not found in {collection}.''')
     else:
          print(f'''{target} was found at position {result} in {collection}.''')










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


lowerCamelCase__       		=  logging.get_logger(__name__)

lowerCamelCase__       		=  {
    """microsoft/focalnet-tiny""": """https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json""",
}




class       snake_case__ (				lowercase_						,     lowercase_):

       '''simple docstring'''
       lowerCamelCase				:					List[Any]								=			"focalnet"



       def __init__(				self      ,    a__=2_24      ,    a__=4      ,    a__=3      ,    a__=96      ,    a__=False      ,    a__=[1_92, 3_84, 7_68, 7_68]      ,    a__=[2, 2, 6, 2]      ,    a__=[2, 2, 2, 2]      ,    a__=[3, 3, 3, 3]      ,    a__="gelu"      ,    a__=4.0      ,    a__=0.0      ,    a__=0.1      ,    a__=False      ,    a__=1e-4      ,    a__=False      ,    a__=False      ,    a__=False      ,    a__=0.02      ,    a__=1e-5      ,    a__=32      ,    a__=None      ,    a__=None      ,    **a__      ,    )			->   Tuple:






            '''simple docstring'''





            super().__init__(**a__     )

            __snake_case      :Optional[Any] 							=    image_size
            __snake_case      :Dict 							=    patch_size
            __snake_case      :Tuple 							=    num_channels
            __snake_case      :List[str] 							=    embed_dim
            __snake_case      :Any 							=    use_conv_embed
            __snake_case      :List[Any] 							=    hidden_sizes
            __snake_case      :str 							=    depths
            __snake_case      :List[Any] 							=    focal_levels
            __snake_case      :int 							=    focal_windows
            __snake_case      :Any 							=    hidden_act
            __snake_case      :List[str] 							=    mlp_ratio
            __snake_case      :str 							=    hidden_dropout_prob
            __snake_case      :List[str] 							=    drop_path_rate
            __snake_case      :int 							=    use_layerscale
            __snake_case      :int 							=    layerscale_value
            __snake_case      :Tuple 							=    use_post_layernorm
            __snake_case      :Dict 							=    use_post_layernorm_in_modulation
            __snake_case      :Union[str, Any] 							=    normalize_modulator
            __snake_case      :List[str] 							=    initializer_range
            __snake_case      :Optional[Any] 							=    layer_norm_eps
            __snake_case      :Tuple 							=    encoder_stride
            __snake_case      :List[str] 							=    ["""stem"""] + [F'''stage{idx}''' for idx in range(1      ,    len(self.depths     ) + 1     )]
            __snake_case							,			__snake_case      :str 							=    get_aligned_output_features_output_indices(
                out_features=a__      ,    out_indices=a__      ,    stage_names=self.stage_names     )


