




from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray



def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase,	lowerCamelCase = False      ):
  if radian_mode:
    return [magnitude * cos(lowerCamelCase      ), magnitude * sin(lowerCamelCase      )]
  return [magnitude * cos(radians(lowerCamelCase      )      ), magnitude * sin(radians(lowerCamelCase      )      )]



def 					UpperCAmelCase__     (   lowerCamelCase,	lowerCamelCase,	lowerCamelCase = 10**-1      ):
  lowercase			:NDArray[floataa]							=  cross(lowerCamelCase,	lowerCamelCase      )
  lowercase			:float							=  sum(lowerCamelCase      )
  return abs(lowerCamelCase      ) < eps


if __name__ == "__main__":
     # Test to check if it works
     _UpperCAmelCase		:  int	=   array(
         [
             polar_force(7_1_8.4, 180 - 30),
             polar_force(8_7_9.5_4, 45),
             polar_force(100, -90),
         ]
     )

     _UpperCAmelCase		:  NDArray[floataa]	=   array([[0, 0], [0, 0], [0, 0]])

     assert in_static_equilibrium(forces, location)

     # Problem 1 in image_data/2D_problems.jpg
     _UpperCAmelCase		:  List[str]	=   array(
         [
             polar_force(30 * 9.8_1, 15),
             polar_force(215, 180 - 45),
             polar_force(264, 90 - 30),
         ]
     )

     _UpperCAmelCase		:  Optional[int]	=   array([[0, 0], [0, 0], [0, 0]])

     assert in_static_equilibrium(forces, location)

     # Problem in image_data/2D_problems_1.jpg
     _UpperCAmelCase		:  int	=   array([[0, -2000], [0, -1200], [0, 15600], [0, -12400]])

     _UpperCAmelCase		:  Optional[Any]	=   array([[0, 0], [6, 0], [10, 0], [12, 0]])

     assert in_static_equilibrium(forces, location)

     import doctest

     doctest.testmod()









from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


_UpperCAmelCase		:  Tuple	=   {
    "susnato/ernie-m-base_pytorch": "https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json",
    "susnato/ernie-m-large_pytorch": "https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json",
}




class       __lowerCAmelCase				(							lowerCAmelCase):
       _a           =  '''ernie_m'''
       _a           =  {"dropout": "classifier_dropout", "num_classes": "num_labels"}






       def __init__(      self:    List[Any]				,    _lowerCAmelCase:    int = 25_00_02				,    _lowerCAmelCase:    int = 7_68				,    _lowerCAmelCase:    int = 12				,    _lowerCAmelCase:    int = 12				,    _lowerCAmelCase:    int = 30_72				,    _lowerCAmelCase:    str = "gelu"				,    _lowerCAmelCase:    float = 0.1				,    _lowerCAmelCase:    float = 0.1				,    _lowerCAmelCase:    int = 5_14				,    _lowerCAmelCase:    float = 0.02				,    _lowerCAmelCase:    int = 1				,    _lowerCAmelCase:    float = 1e-0_5				,    _lowerCAmelCase:    Dict=None				,    _lowerCAmelCase:    Optional[int]=False				,    _lowerCAmelCase:    List[str]=0.0				,    **_lowerCAmelCase:    Tuple				,    ):
         super().__init__(pad_token_id=_lowerCAmelCase				,    **_lowerCAmelCase )
         lowercase			:Tuple							=  vocab_size
         lowercase			:List[str]							=  hidden_size
         lowercase			:Optional[int]							=  num_hidden_layers
         lowercase			:Optional[Any]							=  num_attention_heads
         lowercase			:Optional[Any]							=  intermediate_size
         lowercase			:Optional[Any]							=  hidden_act
         lowercase			:Any							=  hidden_dropout_prob
         lowercase			:int							=  attention_probs_dropout_prob
         lowercase			:Dict							=  max_position_embeddings
         lowercase			:Optional[Any]							=  initializer_range
         lowercase			:Any							=  layer_norm_eps
         lowercase			:Union[str, Any]							=  classifier_dropout
         lowercase			:int							=  is_decoder
         lowercase			:List[str]							=  act_dropout



