
"""simple docstring"""

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


SCREAMING_SNAKE_CASE_            =    logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_            =    {
    '''facebook/s2t-wav2vec2-large-en-de''': (
        '''https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json'''
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}
class   _UpperCAmelCase				(		SCREAMING_SNAKE_CASE_				):
      __SCREAMING_SNAKE_CASE :				Any				   =						"speech_to_text_2"
      __SCREAMING_SNAKE_CASE :				str				   =						["past_key_values"]
      __SCREAMING_SNAKE_CASE :				Any				   =						{"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}




      def __init__(				self ,							lowercase_=1_0_0_0_0 ,							lowercase_=6 ,							lowercase_=2_0_4_8 ,							lowercase_=4 ,							lowercase_=0.0 ,							lowercase_=True ,							lowercase_="relu" ,							lowercase_=2_5_6 ,							lowercase_=0.1 ,							lowercase_=0.0 ,							lowercase_=0.0 ,							lowercase_=0.0_2 ,							lowercase_=2 ,							lowercase_=True ,							lowercase_=1 ,							lowercase_=0 ,							lowercase_=2 ,							lowercase_=1_0_2_4 ,							**lowercase_ ,							)    ->       List[Any]:
          UpperCAmelCase          =       vocab_size
          UpperCAmelCase          =       d_model
          UpperCAmelCase          =       decoder_ffn_dim
          UpperCAmelCase          =       decoder_layers
          UpperCAmelCase          =       decoder_attention_heads
          UpperCAmelCase          =       dropout
          UpperCAmelCase          =       attention_dropout
          UpperCAmelCase          =       activation_dropout
          UpperCAmelCase          =       activation_function
          UpperCAmelCase          =       init_std
          UpperCAmelCase          =       decoder_layerdrop
          UpperCAmelCase          =       use_cache
          UpperCAmelCase          =       decoder_layers
          UpperCAmelCase          =       scale_embedding  # scale factor will be sqrt(d_model) if True
          UpperCAmelCase          =       max_target_positions

          super().__init__(
              pad_token_id=lowercase_ ,							bos_token_id=lowercase_ ,							eos_token_id=lowercase_ ,							decoder_start_token_id=lowercase_ ,							**lowercase_ ,							)





"""simple docstring"""

from math import asin, atan, cos, radians, sin, sqrt, tan

SCREAMING_SNAKE_CASE_            =    6_3_7_8_1_3_7.0
SCREAMING_SNAKE_CASE_            =    6_3_5_6_7_5_2.3_1_4_2_4_5
SCREAMING_SNAKE_CASE_            =    637_8137




def      lowercase__    (       lowerCAmelCase					:       float			,					lowerCAmelCase					:       float			,					lowerCAmelCase					:       float			,					lowerCAmelCase					:       float			)			->   float:






    """simple docstring"""




    UpperCAmelCase          =       (AXIS_A - AXIS_B) / AXIS_A
    UpperCAmelCase          =       atan((1 - flattening) * tan(radians(lowerCAmelCase			)			)			)
    UpperCAmelCase          =       atan((1 - flattening) * tan(radians(lowerCAmelCase			)			)			)
    UpperCAmelCase          =       radians(lowerCAmelCase			)
    UpperCAmelCase          =       radians(lowerCAmelCase			)
    # Equation
    UpperCAmelCase          =       sin((phi_a - phi_a) / 2			)
    UpperCAmelCase          =       sin((lambda_a - lambda_a) / 2			)
    # Square both values
    sin_sq_phi *= sin_sq_phi
    sin_sq_lambda *= sin_sq_lambda
    UpperCAmelCase          =       sqrt(sin_sq_phi + (cos(lowerCAmelCase			) * cos(lowerCAmelCase			) * sin_sq_lambda)			)
    return 2 * RADIUS * asin(lowerCAmelCase			)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



