"""simple docstring"""







import os

from ...utils import logging
from .utils import DataProcessor, InputExample


_SCREAMING_SNAKE_CASE	:		Any   =   logging.get_logger(__name__)






class      _SCREAMING_SNAKE_CASE							(			UpperCAmelCase				):



   '''simple docstring'''



   def __init__(	self ,				_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE=None	):


      '''simple docstring'''

      __lowerCamelCase    		=					language
      __lowerCamelCase    		=					train_language







   def    _A				(	self ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      __lowerCamelCase    		=					self.language if self.train_language is None else self.train_language
      __lowerCamelCase    		=					self._read_tsv(os.path.join(_SCREAMING_SNAKE_CASE ,				F'''XNLI-MT-1.0/multinli/multinli.train.{lg}.tsv'''	)	)
      __lowerCamelCase    		=					[]
      for i, line in enumerate(_SCREAMING_SNAKE_CASE	):
         if i == 0:
            continue
         __lowerCamelCase    		=					F'''train-{i}'''
         __lowerCamelCase    		=					line[0]
         __lowerCamelCase    		=					line[1]
         __lowerCamelCase    		=					'''contradiction''' if line[2] == '''contradictory''' else line[2]
         if not isinstance(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):
            raise ValueError(F'''Training input {text_a} is not a string'''	)
         if not isinstance(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):
            raise ValueError(F'''Training input {text_b} is not a string'''	)
         if not isinstance(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):
            raise ValueError(F'''Training label {label} is not a string'''	)
         examples.append(InputExample(guid=_SCREAMING_SNAKE_CASE ,				text_a=_SCREAMING_SNAKE_CASE ,				text_b=_SCREAMING_SNAKE_CASE ,				label=_SCREAMING_SNAKE_CASE	)	)
      return examples







   def    _A				(	self ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      __lowerCamelCase    		=					self._read_tsv(os.path.join(_SCREAMING_SNAKE_CASE ,				'XNLI-1.0/xnli.test.tsv'	)	)
      __lowerCamelCase    		=					[]
      for i, line in enumerate(_SCREAMING_SNAKE_CASE	):
         if i == 0:
            continue
         __lowerCamelCase    		=					line[0]
         if language != self.language:
            continue
         __lowerCamelCase    		=					F'''test-{i}'''
         __lowerCamelCase    		=					line[6]
         __lowerCamelCase    		=					line[7]
         __lowerCamelCase    		=					line[1]
         if not isinstance(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):
            raise ValueError(F'''Training input {text_a} is not a string'''	)
         if not isinstance(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):
            raise ValueError(F'''Training input {text_b} is not a string'''	)
         if not isinstance(_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):
            raise ValueError(F'''Training label {label} is not a string'''	)
         examples.append(InputExample(guid=_SCREAMING_SNAKE_CASE ,				text_a=_SCREAMING_SNAKE_CASE ,				text_b=_SCREAMING_SNAKE_CASE ,				label=_SCREAMING_SNAKE_CASE	)	)
      return examples







   def    _A				(	self	):


      '''simple docstring'''

      return ["contradiction", "entailment", "neutral"]

_SCREAMING_SNAKE_CASE	:		Tuple   =   {
    '''xnli''': XnliProcessor,
}

_SCREAMING_SNAKE_CASE	:		Dict   =   {
    '''xnli''': '''classification''',
}

_SCREAMING_SNAKE_CASE	:		Optional[Any]   =   {
    '''xnli''': 3,
}














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]''')