__SCREAMING_SNAKE_CASE						:    Any     = (1, 1_5_3, 3_7_0, 3_7_1, 1_6_3_4, 2_4_6_7_8_0_5_1, 1_1_5_1_3_2_2_1_9_0_1_8_7_6_3_9_9_2_5_6_5_0_9_5_5_9_7_9_7_3_9_7_1_5_2_2_4_0_1)
__SCREAMING_SNAKE_CASE						:    tuple     = (-1_5_3, -1, 0, 1.2, 2_0_0, "A", [], {}, None)
def 					snake_case						(__lowercase						)       ->       bool:

						'''simple docstring'''



						if not isinstance(__lowercase					,			__lowercase						) or n < 1:
												return False

						# Initialization of sum and number of digits.
						_snake_case						:     str				=    0
						_snake_case						:     List[str]				=    0
						_snake_case						:     List[Any]				=    n
						# Calculation of digits of the number
						while temp > 0:
												number_of_digits += 1
												temp //= 10
						# Dividing number into separate digits and find Armstrong number
						_snake_case						:     List[str]				=    n
						while temp > 0:
												_snake_case						:     List[str]				=    temp % 10
												total += rem**number_of_digits
												temp //= 10
						return n == total
def 					snake_case						(__lowercase						)       ->       bool:

						'''simple docstring'''



						if not isinstance(__lowercase					,			__lowercase						) or n < 1:
												return False

						# Init a "histogram" of the digits
						_snake_case						:     Optional[Any]				=    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
						_snake_case						:     str				=    0
						_snake_case						:     str				=    0
						_snake_case						:     Optional[int]				=    n
						while temp > 0:
												_snake_case				,_snake_case						:     Union[str, Any]				=    divmod(__lowercase					,			10						)
												digit_histogram[rem] += 1
												digit_total += 1

						for cnt, i in zip(__lowercase					,			range(len(__lowercase						)						)						):
												total += cnt * i**digit_total

						return n == total
def 					snake_case						(__lowercase						)       ->       bool:

						'''simple docstring'''



						if not isinstance(__lowercase					,			__lowercase						) or n < 1:
												return False
						_snake_case						:     int				=    len(str(__lowercase						)						)  # the power that all digits will be raised to
						# check if sum of each digit multiplied expo times is equal to number
						return n == sum(int(__lowercase						) ** expo for i in str(__lowercase						)						)
def 					snake_case						()       ->       Any:

						'''simple docstring'''



						_snake_case						:     Optional[Any]				=    int(input("Enter an integer to see if it is an Armstrong number: "						).strip()						)
						print(F"""{num} is {'' if armstrong_number(__lowercase						) else 'not '}an Armstrong number."""						)
						print(F"""{num} is {'' if narcissistic_number(__lowercase						) else 'not '}an Armstrong number."""						)
						print(F"""{num} is {'' if pluperfect_number(__lowercase						) else 'not '}an Armstrong number."""						)


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				main()
from collections import OrderedDict
from typing import Mapping

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


__SCREAMING_SNAKE_CASE						:    str     = logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE						:    Union[str, Any]     = {
    'nghuyong/ernie-1.0-base-zh': 'https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json',
    'nghuyong/ernie-2.0-base-en': 'https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json',
    'nghuyong/ernie-2.0-large-en': 'https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json',
    'nghuyong/ernie-3.0-base-zh': 'https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-medium-zh': 'https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-mini-zh': 'https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-micro-zh': 'https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-nano-zh': 'https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json',
    'nghuyong/ernie-gram-zh': 'https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json',
    'nghuyong/ernie-health-zh': 'https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json',
}



class    lowercase_    (     __snake_case		):
							_lowerCamelCase						=		'ernie'



							def __init__(						self      ,				lowercase_=30_522      ,				lowercase_=768      ,				lowercase_=12      ,				lowercase_=12      ,				lowercase_=3_072      ,				lowercase_="gelu"      ,				lowercase_=0.1      ,				lowercase_=0.1      ,				lowercase_=512      ,				lowercase_=2      ,				lowercase_=3      ,				lowercase_=False      ,				lowercase_=0.02      ,				lowercase_=1e-12      ,				lowercase_=0      ,				lowercase_="absolute"      ,				lowercase_=True      ,				lowercase_=None      ,				**lowercase_      ,				):
													super().__init__(pad_token_id=lowercase_      ,				**lowercase_				)

													_snake_case						:     List[Any]				=    vocab_size
													_snake_case						:     Dict				=    hidden_size
													_snake_case						:     Any				=    num_hidden_layers
													_snake_case						:     List[str]				=    num_attention_heads
													_snake_case						:     int				=    hidden_act
													_snake_case						:     Tuple				=    intermediate_size
													_snake_case						:     Tuple				=    hidden_dropout_prob
													_snake_case						:     Optional[int]				=    attention_probs_dropout_prob
													_snake_case						:     Any				=    max_position_embeddings
													_snake_case						:     List[str]				=    type_vocab_size
													_snake_case						:     List[Any]				=    task_type_vocab_size
													_snake_case						:     Optional[int]				=    use_task_id
													_snake_case						:     Tuple				=    initializer_range
													_snake_case						:     Union[str, Any]				=    layer_norm_eps
													_snake_case						:     Optional[Any]				=    position_embedding_type
													_snake_case						:     int				=    use_cache
													_snake_case						:     Optional[Any]				=    classifier_dropout




class    lowercase_    (     __snake_case		):



							@property
							def        UpperCamelCase       (						self				):
													if self.task == "multiple-choice":
																			_snake_case						:     str				=    {0: "batch", 1: "choice", 2: "sequence"}
													else:
																			_snake_case						:     Optional[int]				=    {0: "batch", 1: "sequence"}
													return OrderedDict(
													    [
													        ("input_ids", dynamic_axis),
													        ("attention_mask", dynamic_axis),
													        ("token_type_ids", dynamic_axis),
													        ("task_type_ids", dynamic_axis),
													    ]				)