






from typing import Optional, Union

from ...file_utils import TensorType
from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, TruncationStrategy

class      UpperCamelCase_							(				UpperCamelCase       ):
						lowercase									=  '''MarkupLMFeatureExtractor'''
						lowercase									=  ('''MarkupLMTokenizer''', '''MarkupLMTokenizerFast''')
						lowercase									=  True




						def __call__(    self		,	lowercase=None		,	lowercase=None		,	lowercase=None		,	lowercase=None		,	lowercase=None		,	lowercase = True		,	lowercase = False		,	lowercase = None		,	lowercase = None		,	lowercase = 0		,	lowercase = None		,	lowercase = None		,	lowercase = None		,	lowercase = False		,	lowercase = False		,	lowercase = False		,	lowercase = False		,	lowercase = True		,	lowercase = None		,	**lowercase		,	)			->						BatchEncoding:
													# first, create nodes and xpaths
													if self.parse_html:
																				if html_strings is None:
																											raise ValueError('''Make sure to pass HTML strings in case `parse_html` is set to `True`'''       )

																				if nodes is not None or xpaths is not None or node_labels is not None:
																											raise ValueError(
																											    '''Please don\'t pass nodes, xpaths nor node labels in case `parse_html` is set to `True`'''       )

																				_a  :    Tuple			=						self.feature_extractor(lowercase       )
																				_a  :    Any			=						features['''nodes''']
																				_a  :    Tuple			=						features['''xpaths''']
													else:
																				if html_strings is not None:
																											raise ValueError('''You have passed HTML strings but `parse_html` is set to `False`.'''       )
																				if nodes is None or xpaths is None:
																											raise ValueError('''Make sure to pass nodes and xpaths in case `parse_html` is set to `False`'''       )

        # # second, apply the tokenizer
													if questions is not None and self.parse_html:
																				if isinstance(lowercase		,	lowercase       ):
																											_a  :    Any			=						[questions]  # add batch dimension (as the feature extractor always adds a batch dimension)

													_a  :    Optional[Any]			=						self.tokenizer(
													    text=questions if questions is not None else nodes		,	text_pair=nodes if questions is not None else None		,	xpaths=lowercase		,	node_labels=lowercase		,	add_special_tokens=lowercase		,	padding=lowercase		,	truncation=lowercase		,	max_length=lowercase		,	stride=lowercase		,	pad_to_multiple_of=lowercase		,	return_token_type_ids=lowercase		,	return_attention_mask=lowercase		,	return_overflowing_tokens=lowercase		,	return_special_tokens_mask=lowercase		,	return_offsets_mapping=lowercase		,	return_length=lowercase		,	verbose=lowercase		,	return_tensors=lowercase		,	**lowercase		,	)

													return encoded_inputs




						def      snake_case__(    self		,	*lowercase		,	**lowercase       )			->						Optional[Any]:
													return self.tokenizer.batch_decode(*lowercase		,	**lowercase       )




						def      snake_case__(    self		,	*lowercase		,	**lowercase       )			->						List[str]:
													return self.tokenizer.decode(*lowercase		,	**lowercase       )







						@property
						def      snake_case__(    self       )			->						Any:
													_a  :    List[Any]			=						self.tokenizer.model_input_names
													return tokenizer_input_names







from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
__lowerCamelCase						= 9.8_06_65






def    UpperCamelCase__  (   UpperCAmelCase    ,	UpperCAmelCase     )     ->		None:







							"""simple docstring"""





							if not isinstance(UpperCAmelCase    ,	(int, float)     ):
														raise TypeError('''Invalid velocity. Should be a positive number.'''     )

							if not isinstance(UpperCAmelCase    ,	(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__  (   UpperCAmelCase    ,	UpperCAmelCase     )     ->		float:







							"""simple docstring"""





							check_args(UpperCAmelCase    ,	UpperCAmelCase     )
							_a  :    Dict			=						angle_to_radians(2 * angle     )
							return round(init_velocity**2 * sin(UpperCAmelCase     ) / g    ,	2     )






def    UpperCamelCase__  (   UpperCAmelCase    ,	UpperCAmelCase     )     ->		float:







							"""simple docstring"""





							check_args(UpperCAmelCase    ,	UpperCAmelCase     )
							_a  :    Union[str, Any]			=						angle_to_radians(UpperCAmelCase     )
							return round(init_velocity**2 * sin(UpperCAmelCase     ) ** 2 / (2 * g)    ,	2     )






def    UpperCamelCase__  (   UpperCAmelCase    ,	UpperCAmelCase     )     ->		float:







							"""simple docstring"""





							check_args(UpperCAmelCase    ,	UpperCAmelCase     )
							_a  :    str			=						angle_to_radians(UpperCAmelCase     )
							return round(2 * init_velocity * sin(UpperCAmelCase     ) / g    ,	2     )






def    UpperCamelCase__  (   )     ->		None:







							"""simple docstring"""





							_a		,					_a  :    Any			=						25, 20
							assert horizontal_distance(UpperCAmelCase    ,	UpperCAmelCase     ) == 4_0.9_7
							assert max_height(UpperCAmelCase    ,	UpperCAmelCase     ) == 3.7_3
							assert total_time(UpperCAmelCase    ,	UpperCAmelCase     ) == 1.7_4


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

						testmod()

						# Get input from user
						__lowerCamelCase						= float(input('Initial Velocity: ').strip())

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