

"""simple docstring"""


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


__A						       =      logging.get_logger(__name__)

__A						       =      {
    "facebook/dpr-ctx_encoder-single-nq-base": (
        "https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-question_encoder-single-nq-base": (
        "https://huggingface.co/facebook/dpr-question_encoder-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-reader-single-nq-base": (
        "https://huggingface.co/facebook/dpr-reader-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-ctx_encoder-multiset-base": (
        "https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base/resolve/main/config.json"
    ),
    "facebook/dpr-question_encoder-multiset-base": (
        "https://huggingface.co/facebook/dpr-question_encoder-multiset-base/resolve/main/config.json"
    ),
    "facebook/dpr-reader-multiset-base": (
        "https://huggingface.co/facebook/dpr-reader-multiset-base/resolve/main/config.json"
    ),
}





class    snake_case     (    __snake_case  ):
				SCREAMING_SNAKE_CASE_       :				Tuple       				=  """dpr"""

				def __init__(     self							:    List[Any]					,  UpperCamelCase__							:    Optional[Any]=3_0_5_2_2					,  UpperCamelCase__							:    Optional[int]=7_6_8					,  UpperCamelCase__							:    Dict=1_2					,  UpperCamelCase__							:    Optional[int]=1_2					,  UpperCamelCase__							:    int=3_0_7_2					,  UpperCamelCase__							:    Optional[Any]="gelu"					,  UpperCamelCase__							:    List[Any]=0.1					,  UpperCamelCase__							:    str=0.1					,  UpperCamelCase__							:    int=5_1_2					,  UpperCamelCase__							:    List[str]=2					,  UpperCamelCase__							:    int=0.02					,  UpperCamelCase__							:    int=1e-12					,  UpperCamelCase__							:    Optional[Any]=0					,  UpperCamelCase__							:    Optional[Any]="absolute"					,  UpperCamelCase__							:    int = 0					,  **UpperCamelCase__							:    Optional[int]					,  )->       List[str]:



						'''simple docstring'''


						super().__init__(pad_token_id=UpperCamelCase__					,  **UpperCamelCase__)

						__lowerCAmelCase:	List[Any]   				=      vocab_size
						__lowerCAmelCase:	int   				=      hidden_size
						__lowerCAmelCase:	Optional[Any]   				=      num_hidden_layers
						__lowerCAmelCase:	List[Any]   				=      num_attention_heads
						__lowerCAmelCase:	int   				=      hidden_act
						__lowerCAmelCase:	int   				=      intermediate_size
						__lowerCAmelCase:	int   				=      hidden_dropout_prob
						__lowerCAmelCase:	Union[str, Any]   				=      attention_probs_dropout_prob
						__lowerCAmelCase:	Any   				=      max_position_embeddings
						__lowerCAmelCase:	Any   				=      type_vocab_size
						__lowerCAmelCase:	Dict   				=      initializer_range
						__lowerCAmelCase:	Union[str, Any]   				=      layer_norm_eps
						__lowerCAmelCase:	Union[str, Any]   				=      projection_dim
						__lowerCAmelCase:	Any   				=      position_embedding_type






"""simple docstring"""


from __future__ import annotations

from decimal import Decimal
from math import *  # noqa: F403

from sympy import diff






def    a__   (   __SCREAMING_SNAKE_CASE ,			__SCREAMING_SNAKE_CASE ,			__SCREAMING_SNAKE_CASE = 1_0**-1_0			)     ->     float:
		__lowerCAmelCase:	Union[str, Any]   				=      a
		while True:
				__lowerCAmelCase:	Optional[int]   				=      Decimal(__SCREAMING_SNAKE_CASE			) - (
				    Decimal(eval(__SCREAMING_SNAKE_CASE			)			) / Decimal(eval(str(diff(__SCREAMING_SNAKE_CASE			)			)			)			)  # noqa: S307
				)
				# This number dictates the accuracy of the answer
				if abs(eval(__SCREAMING_SNAKE_CASE			)			) < precision:  # noqa: S307
						return float(__SCREAMING_SNAKE_CASE			)


# Let's Execute
if __name__ == "__main__":
			# Find root of trigonometric function
			# Find value of pi
			print(F'''The root of sin(x) = 0 is {newton_raphson("sin(x)", 2)}''')
			# Find root of polynomial
			print(F'''The root of x**2 - 5*x + 2 = 0 is {newton_raphson("x**2 - 5*x + 2", 0.4)}''')
			# Find Square Root of 5
			print(F'''The root of log(x) - 1 = 0 is {newton_raphson("log(x) - 1", 2)}''')
			# Exponential Roots
			print(F'''The root of exp(x) - 1 = 0 is {newton_raphson("exp(x) - 1", 0)}''')


