
from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_UpperCAmelCase					: Dict      =       logging.get_logger(__name__)

_UpperCAmelCase					: List[Any]      =       {
    "microsoft/beit-base-patch16-224-pt22k": (
        "https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}


class 				lowercase					(		_SCREAMING_SNAKE_CASE   ):
		__lowercase       :       Tuple	     =				"beit"



		def __init__( self				,      A_=8_192				,      A_=768				,      A_=12				,      A_=12				,      A_=3_072				,      A_="gelu"				,      A_=0.0				,      A_=0.0				,      A_=0.02				,      A_=1e-12				,      A_=224				,      A_=16				,      A_=3				,      A_=False				,      A_=False				,      A_=False				,      A_=False				,      A_=0.1				,      A_=0.1				,      A_=True				,      A_=[3, 5, 7, 11]				,      A_=[1, 2, 3, 6]				,      A_=True				,      A_=0.4				,      A_=256				,      A_=1				,      A_=False				,      A_=255				,      **A_				,      )  ->					Any:
				"""simple docstring"""
				super().__init__(**A_       )

				UpperCamelCase		=     vocab_size
				UpperCamelCase		=     hidden_size
				UpperCamelCase		=     num_hidden_layers
				UpperCamelCase		=     num_attention_heads
				UpperCamelCase		=     intermediate_size
				UpperCamelCase		=     hidden_act
				UpperCamelCase		=     hidden_dropout_prob
				UpperCamelCase		=     attention_probs_dropout_prob
				UpperCamelCase		=     initializer_range
				UpperCamelCase		=     layer_norm_eps

				UpperCamelCase		=     image_size
				UpperCamelCase		=     patch_size
				UpperCamelCase		=     num_channels
				UpperCamelCase		=     use_mask_token
				UpperCamelCase		=     use_absolute_position_embeddings
				UpperCamelCase		=     use_relative_position_bias
				UpperCamelCase		=     use_shared_relative_position_bias
				UpperCamelCase		=     layer_scale_init_value
				UpperCamelCase		=     drop_path_rate
				UpperCamelCase		=     use_mean_pooling
				# decode head attributes (semantic segmentation)
				UpperCamelCase		=     out_indices
				UpperCamelCase		=     pool_scales
				# auxiliary head attributes (semantic segmentation)
				UpperCamelCase		=     use_auxiliary_head
				UpperCamelCase		=     auxiliary_loss_weight
				UpperCamelCase		=     auxiliary_channels
				UpperCamelCase		=     auxiliary_num_convs
				UpperCamelCase		=     auxiliary_concat_input
				UpperCamelCase		=     semantic_loss_ignore_index






class 				lowercase					(		_SCREAMING_SNAKE_CASE   ):
		__lowercase       :       Dict	     =				version.parse("1.11"   )



		@property
		def __UpperCamelCase ( self       )  ->					Mapping[str, Mapping[int, str]]:
				"""simple docstring"""
				return OrderedDict(
				    [
				        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
				    ]       )



		@property
		def __UpperCamelCase ( self       )  ->					float:
				"""simple docstring"""
				return 1e-4


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


def       A       (					lowercase )   ->  str:
		'''simple docstring'''

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

		UpperCamelCase		=     precision
		UpperCamelCase		=     ceil(precision / 14 )
		UpperCamelCase		=     426_880 * Decimal(10_005 ).sqrt()
		UpperCamelCase		=     1
		UpperCamelCase		=     13_591_409
		UpperCamelCase		=     Decimal(lowercase )
		for k in range(1    ,       lowercase ):
				UpperCamelCase		=     factorial(6 * k ) // (factorial(3 * k ) * factorial(lowercase ) ** 3)
				linear_term += 545_140_134
				exponential_term *= -262_537_412_640_768_000
				partial_sum += Decimal(multinomial_term * linear_term ) / exponential_term
		return str(constant_term / partial_sum )[:-1]


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