



'''simple docstring'''






from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
A_				:					Dict							=      9.8_0665




def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						None:





       '''simple docstring'''


       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 > 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        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						float:





       '''simple docstring'''


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




def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						float:





       '''simple docstring'''


       check_args(lowerCAmelCase_			,  lowerCAmelCase_						)
       _UpperCAmelCase    :		Tuple     	=					angle_to_radians(lowerCAmelCase_						)
       return round(init_velocity**2 * sin(lowerCAmelCase_						) ** 2 / (2 * g)			,  2						)




def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						float:





       '''simple docstring'''


       check_args(lowerCAmelCase_			,  lowerCAmelCase_						)
       _UpperCAmelCase    :		Any     	=					angle_to_radians(lowerCAmelCase_						)
       return round(2 * init_velocity * sin(lowerCAmelCase_						) / g			,  2						)




def        snake_case_   (	)->						None:





       '''simple docstring'''


       _UpperCAmelCase	,_UpperCAmelCase    :		Optional[int]     	=					25, 20
       assert horizontal_distance(lowerCAmelCase_			,  lowerCAmelCase_						) == 4_0.9_7
       assert max_height(lowerCAmelCase_			,  lowerCAmelCase_						) == 3.7_3
       assert total_time(lowerCAmelCase_			,  lowerCAmelCase_						) == 1.7_4


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

   testmod()

   # Get input from user
   A_				:					Optional[int]							=      float(input("""Initial Velocity: """).strip())

   # Get input from user
   A_				:					int							=      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]""")








import os

from apache_beam.io.filesystems import FileSystems
from apache_beam.pipeline import Pipeline

from .logging import get_logger


lowerCAmelCase					:				Union[str, Any]   	=2 << 20  # 2mb
lowerCAmelCase					:				Union[str, Any]   	=get_logger(__name__)






class 	_a			(      snake_case_  ):






			def 							_snake_case   (    self )	->					Dict:
									lowerCAmelCase	:   Optional[int]					     =					self._options.get_all_options().get("""runner""" )
									return runner in [None, "DirectRunner", "PortableRunner"]







def  _UpperCAmelCase  (				SCREAMING_SNAKE_CASE__			,SCREAMING_SNAKE_CASE__			,SCREAMING_SNAKE_CASE__=False  ):


						'''simple docstring'''




						lowerCAmelCase	:   Union[str, Any]					     =					FileSystems
						if fs.exists(SCREAMING_SNAKE_CASE__  ):
												if force_upload:
																		logger.info(F"""Remote path already exist: {remote_file_path}. Overwriting it as force_upload=True."""  )
												else:
																		logger.info(F"""Remote path already exist: {remote_file_path}. Skipping it as force_upload=False."""  )
																		return
						with fs.create(SCREAMING_SNAKE_CASE__  ) as remote_file:
												with open(SCREAMING_SNAKE_CASE__			,"""rb"""  ) as local_file:
																		lowerCAmelCase	:   Any					     =					local_file.read(SCREAMING_SNAKE_CASE__  )
																		while chunk:
																								remote_file.write(SCREAMING_SNAKE_CASE__  )
																								lowerCAmelCase	:   List[str]					     =					local_file.read(SCREAMING_SNAKE_CASE__  )







def  _UpperCAmelCase  (				SCREAMING_SNAKE_CASE__			,SCREAMING_SNAKE_CASE__			,SCREAMING_SNAKE_CASE__=False  ):


						'''simple docstring'''




						lowerCAmelCase	:   Optional[int]					     =					FileSystems
						if os.path.exists(SCREAMING_SNAKE_CASE__  ):
												if force_download:
																		logger.info(F"""Local path already exist: {remote_file_path}. Overwriting it as force_upload=True."""  )
												else:
																		logger.info(F"""Local path already exist: {remote_file_path}. Skipping it as force_upload=False."""  )
																		return
						with fs.open(SCREAMING_SNAKE_CASE__  ) as remote_file:
												with open(SCREAMING_SNAKE_CASE__			,"""wb"""  ) as local_file:
																		lowerCAmelCase	:   Optional[int]					     =					remote_file.read(SCREAMING_SNAKE_CASE__  )
																		while chunk:
																								local_file.write(SCREAMING_SNAKE_CASE__  )
																								lowerCAmelCase	:   Union[str, Any]					     =					remote_file.read(SCREAMING_SNAKE_CASE__  )

