




'''simple docstring'''




from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
snake_case__ 							=    9.8_0_6_6_5




def     snake_case__     (			lowerCamelCase__					: float      ,		lowerCamelCase__					: float      ) -> None:

					# Ensure valid instance
					if not isinstance(lowerCamelCase__      ,		(int, float)      ):
										raise TypeError('''Invalid velocity. Should be a positive number.'''      )

					if not isinstance(lowerCamelCase__      ,		(int, float)      ):
										raise TypeError('''Invalid angle. Range is 1-90 degrees.'''      )

					# Ensure valid angle
					if angle > 9_0 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     snake_case__     (			lowerCamelCase__					: float      ,		lowerCamelCase__					: float      ) -> float:
					check_args(lowerCamelCase__      ,		lowerCamelCase__      )
					A_			:  Optional[Any]			=				angle_to_radians(2 * angle      )
					return round(init_velocity**2 * sin(lowerCamelCase__      ) / g      ,		2      )




def     snake_case__     (			lowerCamelCase__					: float      ,		lowerCamelCase__					: float      ) -> float:
					check_args(lowerCamelCase__      ,		lowerCamelCase__      )
					A_			:  str			=				angle_to_radians(lowerCamelCase__      )
					return round(init_velocity**2 * sin(lowerCamelCase__      ) ** 2 / (2 * g)      ,		2      )




def     snake_case__     (			lowerCamelCase__					: float      ,		lowerCamelCase__					: float      ) -> float:
					check_args(lowerCamelCase__      ,		lowerCamelCase__      )
					A_			:  Optional[Any]			=				angle_to_radians(lowerCamelCase__      )
					return round(2 * init_velocity * sin(lowerCamelCase__      ) / g      ,		2      )




def     snake_case__     (			) -> None:
					A_			,A_			:  List[Any]			=				2_5, 2_0
					assert horizontal_distance(lowerCamelCase__      ,		lowerCamelCase__      ) == 40.97
					assert max_height(lowerCamelCase__      ,		lowerCamelCase__      ) == 3.73
					assert total_time(lowerCamelCase__      ,		lowerCamelCase__      ) == 1.74


if __name__ == "__main__":
							from doctest import testmod

							testmod()

							# Get input from user
							snake_case__ 							=    float(input("""Initial Velocity: """).strip())

							# Get input from user
							snake_case__ 							=    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]')









'''simple docstring'''




from ...configuration_utils import PretrainedConfig
from ...utils import logging


snake_case__ 							=    logging.get_logger(__name__)

snake_case__ 							=    {
    """uw-madison/nystromformer-512""": """https://huggingface.co/uw-madison/nystromformer-512/resolve/main/config.json""",
    # See all Nystromformer models at https://huggingface.co/models?filter=nystromformer
}






class      UpperCamelCase_  (a__  ):







						"""simple docstring"""


						_lowerCAmelCase         =       'nystromformer'







						def __init__(  self   :							Optional[Any]				,			_lowerCamelCase   :							str=30000				,			_lowerCamelCase   :							Optional[Any]=768				,			_lowerCamelCase   :							Optional[Any]=12				,			_lowerCamelCase   :							str=12				,			_lowerCamelCase   :							List[str]=3072				,			_lowerCamelCase   :							Any="gelu_new"				,			_lowerCamelCase   :							List[Any]=0.1				,			_lowerCamelCase   :							List[str]=0.1				,			_lowerCamelCase   :							List[str]=510				,			_lowerCamelCase   :							Optional[Any]=2				,			_lowerCamelCase   :							List[Any]=64				,			_lowerCamelCase   :							str=64				,			_lowerCamelCase   :							str=65				,			_lowerCamelCase   :							List[Any]=False				,			_lowerCamelCase   :							List[Any]=0.02				,			_lowerCamelCase   :							List[Any]=1E-5				,			_lowerCamelCase   :							Dict=1				,			_lowerCamelCase   :							Tuple=0				,			_lowerCamelCase   :							List[str]=2				,			**_lowerCamelCase   :							List[str]				,			):





											"""simple docstring"""







											A_			:  List[Any]			=				vocab_size
											A_			:  Tuple			=				max_position_embeddings
											A_			:  Dict			=				hidden_size
											A_			:  Optional[Any]			=				num_hidden_layers
											A_			:  Dict			=				num_attention_heads
											A_			:  Tuple			=				intermediate_size
											A_			:  Dict			=				hidden_act
											A_			:  List[Any]			=				hidden_dropout_prob
											A_			:  str			=				attention_probs_dropout_prob
											A_			:  Optional[Any]			=				initializer_range
											A_			:  List[str]			=				type_vocab_size
											A_			:  List[Any]			=				segment_means_seq_len
											A_			:  Dict			=				num_landmarks
											A_			:  int			=				conv_kernel_size
											A_			:  Optional[Any]			=				inv_coeff_init_option
											A_			:  str			=				layer_norm_eps
											super().__init__(pad_token_id=_lowerCamelCase				,			bos_token_id=_lowerCamelCase				,			eos_token_id=_lowerCamelCase				,			**_lowerCamelCase     )



