code: 
  
  
  
  
  
  
  """simple docstring"""
  
  
  
  
  
  
  import copy
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  A_			  =    logging.get_logger(__name__)
  
  A_			  =    {
      'facebook/sam-vit-huge': 'https://huggingface.co/facebook/sam-vit-huge/resolve/main/config.json',
      'facebook/sam-vit-large': 'https://huggingface.co/facebook/sam-vit-large/resolve/main/config.json',
      'facebook/sam-vit-base': 'https://huggingface.co/facebook/sam-vit-base/resolve/main/config.json',
  }
  class 						__lowerCAmelCase   (			lowercase_       ):
  
  
  
  
  
  
  
    '''simple docstring'''
  
  
    def __init__(      self:		Dict				,			UpperCamelCase_:		Union[str, Any]=256				,			UpperCamelCase_:		Union[str, Any]=1024				,			UpperCamelCase_:		List[str]=16				,			UpperCamelCase_:		int=16				,			UpperCamelCase_:		str=4				,			UpperCamelCase_:		Dict="gelu"				,			UpperCamelCase_:		int=1e-6				,			**UpperCamelCase_:		Tuple				,			):
          super().__init__(**UpperCamelCase_					)
          UpperCamelCase_     =hidden_size
          UpperCamelCase_     =image_size
          UpperCamelCase_     =patch_size
          UpperCamelCase_     =image_size // patch_size
          UpperCamelCase_     =mask_input_channels
          UpperCamelCase_     =num_point_embeddings
          UpperCamelCase_     =hidden_act
          UpperCamelCase_     =layer_norm_eps
  
  
  
  
  class 						__lowerCAmelCase   (			lowercase_       ):
  
  
  
  
  
  
  
    '''simple docstring'''
  
  
    def __init__(      self:		List[str]				,			UpperCamelCase_:		List[Any]=256				,			UpperCamelCase_:		Dict="relu"				,			UpperCamelCase_:		Optional[Any]=2048				,			UpperCamelCase_:		Optional[Any]=2				,			UpperCamelCase_:		Optional[Any]=8				,			UpperCamelCase_:		Optional[Any]=2				,			UpperCamelCase_:		Union[str, Any]=3				,			UpperCamelCase_:		Optional[Any]=3				,			UpperCamelCase_:		int=256				,			UpperCamelCase_:		List[Any]=1e-6				,			**UpperCamelCase_:		Dict				,			):
          super().__init__(**UpperCamelCase_					)
          UpperCamelCase_     =hidden_size
          UpperCamelCase_     =hidden_act
          UpperCamelCase_     =mlp_dim
          UpperCamelCase_     =num_hidden_layers
          UpperCamelCase_     =num_attention_heads
          UpperCamelCase_     =attention_downsample_rate
          UpperCamelCase_     =num_multimask_outputs
          UpperCamelCase_     =iou_head_depth
          UpperCamelCase_     =iou_head_hidden_dim
          UpperCamelCase_     =layer_norm_eps
  
  
  
  
  class 						__lowerCAmelCase   (			lowercase_       ):
  
  
  
  
  
  
  
    '''simple docstring'''
  
  
    def __init__(      self:		Union[str, Any]				,			UpperCamelCase_:		Optional[int]=768				,			UpperCamelCase_:		int=256				,			UpperCamelCase_:		Tuple=12				,			UpperCamelCase_:		Tuple=12				,			UpperCamelCase_:		List[str]=3				,			UpperCamelCase_:		List[Any]=1024				,			UpperCamelCase_:		Any=16				,			UpperCamelCase_:		Union[str, Any]="gelu"				,			UpperCamelCase_:		str=1e-0_6				,			UpperCamelCase_:		Tuple=0.0				,			UpperCamelCase_:		int=1e-1_0				,			UpperCamelCase_:		int=True				,			UpperCamelCase_:		Union[str, Any]=4.0				,			UpperCamelCase_:		Tuple=True				,			UpperCamelCase_:		Optional[Any]=True				,			UpperCamelCase_:		str=14				,			UpperCamelCase_:		List[str]=[2, 5, 8, 11]				,			UpperCamelCase_:		Optional[Any]=128				,			UpperCamelCase_:		List[Any]=None				,			**UpperCamelCase_:		List[str]				,			):
          super().__init__(**UpperCamelCase_					)
  
          UpperCamelCase_     =hidden_size
          UpperCamelCase_     =output_channels
          UpperCamelCase_     =num_hidden_layers
          UpperCamelCase_     =num_attention_heads
          UpperCamelCase_     =num_channels
          UpperCamelCase_     =image_size
          UpperCamelCase_     =patch_size
          UpperCamelCase_     =hidden_act
          UpperCamelCase_     =layer_norm_eps
          UpperCamelCase_     =attention_dropout
          UpperCamelCase_     =initializer_range
          UpperCamelCase_     =qkv_bias
          UpperCamelCase_     =mlp_ratio
          UpperCamelCase_     =use_abs_pos
          UpperCamelCase_     =use_rel_pos
          UpperCamelCase_     =window_size
          UpperCamelCase_     =global_attn_indexes
          UpperCamelCase_     =num_pos_feats
          UpperCamelCase_     =int(hidden_size * mlp_ratio					) if mlp_dim is None else mlp_dim
  
  
  
  
  class 						__lowerCAmelCase   (			lowercase_       ):
  
  
  
  
  
  
  
    '''simple docstring'''
  
  
    __lowerCamelCase       :    Union[str, Any]     	=			"""sam"""
    __lowerCamelCase       :    Union[str, Any]     	=			True
    def __init__(      self:		str				,			UpperCamelCase_:		Tuple=None				,			UpperCamelCase_:		Any=None				,			UpperCamelCase_:		Tuple=None				,			UpperCamelCase_:		int=0.02				,			**UpperCamelCase_:		int				,			):
          super().__init__(**UpperCamelCase_					)
          UpperCamelCase_     =vision_config if vision_config is not None else {}
          UpperCamelCase_     =prompt_encoder_config if prompt_encoder_config is not None else {}
          UpperCamelCase_     =mask_decoder_config if mask_decoder_config is not None else {}
  
          if isinstance(UpperCamelCase_				,			UpperCamelCase_					):
                UpperCamelCase_     =vision_config.to_dict()
          if isinstance(UpperCamelCase_				,			UpperCamelCase_					):
                UpperCamelCase_     =prompt_encoder_config.to_dict()
          if isinstance(UpperCamelCase_				,			UpperCamelCase_					):
                UpperCamelCase_     =mask_decoder_config.to_dict()
  
          UpperCamelCase_     =SamVisionConfig(**UpperCamelCase_					)
          UpperCamelCase_     =SamPromptEncoderConfig(**UpperCamelCase_					)
          UpperCamelCase_     =SamMaskDecoderConfig(**UpperCamelCase_					)
          UpperCamelCase_     =initializer_range
  
  
  
  
  
    def 					UpperCamelCase__   (      self:		List[Any]					):
          UpperCamelCase_     =copy.deepcopy(self.__dict__					)
          UpperCamelCase_     =self.vision_config.to_dict()
          UpperCamelCase_     =self.prompt_encoder_config.to_dict()
          UpperCamelCase_     =self.mask_decoder_config.to_dict()
          UpperCamelCase_     =self.__class__.model_type
          return output
  
style_context: 
  
  
  
  
  
  
  """simple docstring"""
  
  
  
  
  
  
  from math import radians as angle_to_radians
  from math import sin
  
  # Acceleration Constant on Earth (unit m/s^2)
  A_			  =    9.80665
  
  
  
  
  def 						_UpperCamelCase			(  A    ,       A			):
  
     # Ensure valid instance
     if not isinstance(A    ,       (int, float)			):
        raise TypeError("Invalid velocity. Should be a positive number."			)
  
     if not isinstance(A    ,       (int, float)			):
        raise TypeError("Invalid angle. Range is 1-90 degrees."			)
  
     # Ensure valid angle
     if angle > 90 or angle < 1:
        raise ValueError("Invalid angle. Range is 1-90 degrees."			)
  
     # Ensure valid velocity
     if init_velocity < 0:
        raise ValueError("Invalid velocity. Should be a positive number."			)
  
  
  
  
  def 						_UpperCamelCase			(  A    ,       A			):
     check_args(A    ,       A			)
     UpperCamelCase_     =angle_to_radians(2 * angle			)
     return round(init_velocity**2 * sin(A			) / g    ,       2			)
  
  
  
  
  def 						_UpperCamelCase			(  A    ,       A			):
     check_args(A    ,       A			)
     UpperCamelCase_     =angle_to_radians(A			)
     return round(init_velocity**2 * sin(A			) ** 2 / (2 * g)    ,       2			)
  
  
  
  
  def 						_UpperCamelCase			(  A    ,       A			):
     check_args(A    ,       A			)
     UpperCamelCase_     =angle_to_radians(A			)
     return round(2 * init_velocity * sin(A			) / g    ,       2			)
  
  
  
  
  def 						_UpperCamelCase			(  ):
     UpperCamelCase_    ,							UpperCamelCase_     =25, 20
     assert horizontal_distance(A    ,       A			) == 40.97
     assert max_height(A    ,       A			) == 3.73
     assert total_time(A    ,       A			) == 1.74
  
  
  if __name__ == "__main__":
      from doctest import testmod
  
      testmod()
  
      # Get input from user
      A_			  =    float(input("Initial Velocity: ").strip())
  
      # Get input from user
      A_			  =    float(input("angle: ").strip())
  
      # Print results
      print()
      print("Results: ")
      print(f'''Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]''')
      print(f'''Maximum Height: {max_height(init_vel, angle)!s} [m]''')
      print(f'''Total Time: {total_time(init_vel, angle)!s} [s]''')
  