






"""simple docstring"""

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


lowercase__          = logging.get_logger(__name__)

lowercase__          = {
    """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 		__lowerCamelCase				( A__			):





		'''simple docstring'''






		a_	:				Dict            =							"""dpr"""





		def __init__(   self							:	Optional[int]						,			a_							:	Dict=3_05_22						,			a_							:	Optional[int]=7_68						,			a_							:	Optional[Any]=12						,			a_							:	Tuple=12						,			a_							:	Dict=30_72						,			a_							:	Dict="gelu"						,			a_							:	Optional[Any]=0.1						,			a_							:	Any=0.1						,			a_							:	int=5_12						,			a_							:	int=2						,			a_							:	Optional[int]=0.02						,			a_							:	List[str]=1e-1_2						,			a_							:	Optional[int]=0						,			a_							:	Any="absolute"						,			a_							:	int = 0						,			**a_							:	Union[str, Any]						,			):
				super().__init__(pad_token_id=a_						,			**a_	)

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








"""simple docstring"""

from decimal import Decimal, getcontext
from math import ceil, factorial

def 		__lowerCamelCase	(  __UpperCamelCase       )						->    str:

		"""simple docstring"""







		if not isinstance(__UpperCamelCase      ,       __UpperCamelCase       ):
				raise TypeError("Undefined for non-integers"       )
		elif precision < 1:
				raise ValueError("Undefined for non-natural numbers"       )

		lowerCAmelCase_   :							str									=			precision
		lowerCAmelCase_   :							Tuple									=			ceil(precision / 14       )
		lowerCAmelCase_   :							Optional[int]									=			426880 * Decimal(10005       ).sqrt()
		lowerCAmelCase_   :							Any									=			1
		lowerCAmelCase_   :							Any									=			13591409
		lowerCAmelCase_   :							List[str]									=			Decimal(__UpperCamelCase       )
		for k in range(1      ,       __UpperCamelCase       ):
				lowerCAmelCase_   :							List[Any]									=			factorial(6 * k       ) // (factorial(3 * k       ) * factorial(__UpperCamelCase       ) ** 3)
				linear_term += 545140134
				exponential_term *= -262537412640768000
				partial_sum += Decimal(multinomial_term * linear_term       ) / exponential_term
		return str(constant_term / partial_sum       )[:-1]


if __name__ == "__main__":
					lowercase__          = 50
					print(F"""The first {n} digits of pi is: {pi(n)}""")
