





_SCREAMING_SNAKE_CASE   						=		(1, 1_53, 3_70, 3_71, 16_34, 24_67_80_51, 1_15_13_22_19_01_87_63_99_25_65_09_55_97_97_39_71_52_24_01)
_SCREAMING_SNAKE_CASE   						=		(-1_53, -1, 0, 1.2, 2_00, "A", [], {}, None)


def 				SCREAMING_SNAKE_CASE__    (     __a ):
	if not isinstance(__a ,			__a ) or n < 1:
		return False

	# Initialization of sum and number of digits.
	snake_case_		:      Optional[Any]           =						0
	snake_case_		:      Dict           =						0
	snake_case_		:      Dict           =						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_		:      Optional[int]           =						n
	while temp > 0:
		snake_case_		:      Optional[Any]           =						temp % 10
		total += rem**number_of_digits
		temp //= 10
	return n == total


def 				SCREAMING_SNAKE_CASE__    (     __a ):
	if not isinstance(__a ,			__a ) or n < 1:
		return False

	# Init a "histogram" of the digits
	snake_case_		:      Optional[int]           =						[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
	snake_case_		:      Dict           =						0
	snake_case_		:      Dict           =						0
	snake_case_		:      Tuple           =						n
	while temp > 0:
		snake_case_    ,snake_case_		:      List[Any]           =						divmod(__a ,			10 )
		digit_histogram[rem] += 1
		digit_total += 1

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

	return n == total


def 				SCREAMING_SNAKE_CASE__    (     __a ):
	if not isinstance(__a ,			__a ) or n < 1:
		return False
	snake_case_		:      str           =						len(str(__a ) )  # 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(__a ) ** expo for i in str(__a ) )


def 				SCREAMING_SNAKE_CASE__    (     ):
	snake_case_		:      int           =						int(input('Enter an integer to see if it is an Armstrong number: ' ).strip() )
	print(f"""{num} is {'' if armstrong_number(__a ) else 'not '}an Armstrong number.""" )
	print(f"""{num} is {'' if narcissistic_number(__a ) else 'not '}an Armstrong number.""" )
	print(f"""{num} is {'' if pluperfect_number(__a ) else 'not '}an Armstrong number.""" )


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						main()








import os
import shutil
import unittest
from unittest.mock import patch

from transformers.testing_utils import CaptureStd, is_pt_tf_cross_test, require_torch
class SCREAMING_SNAKE_CASE_    (       unittest.TestCase       ):






						@patch('sys.argv'		, ['fakeprogrampath', 'env']						)
						def UpperCAmelCase_					(   self   :   Tuple						)				->     Dict:







							"""simple docstring"""


							import transformers.commands.transformers_cli

							with CaptureStd() as cs:
								transformers.commands.transformers_cli.main()
							self.assertIn('Python version'		, cs.out						)
							self.assertIn('Platform'		, cs.out						)
							self.assertIn('Using distributed or parallel set-up in script?'		, cs.out						)






						@is_pt_tf_cross_test
						@patch(
						    'sys.argv'		, ['fakeprogrampath', 'pt-to-tf', '--model-name', 'hf-internal-testing/tiny-random-gptj', '--no-pr']						)
						def UpperCAmelCase_					(   self   :   Union[str, Any]						)				->     Optional[Any]:







							"""simple docstring"""


							import transformers.commands.transformers_cli

							shutil.rmtree('/tmp/hf-internal-testing/tiny-random-gptj'		, ignore_errors=_A						)  # cleans potential past runs
							transformers.commands.transformers_cli.main()

							# The original repo has no TF weights -- if they exist, they were created by the CLI
							self.assertTrue(os.path.exists('/tmp/hf-internal-testing/tiny-random-gptj/tf_model.h5'						)						)






						@require_torch
						@patch('sys.argv'		, ['fakeprogrampath', 'download', 'hf-internal-testing/tiny-random-gptj', '--cache-dir', '/tmp']						)
						def UpperCAmelCase_					(   self   :   List[Any]						)				->     str:







							"""simple docstring"""


							import transformers.commands.transformers_cli

							# # remove any previously downloaded model to start clean
							shutil.rmtree('/tmp/models--hf-internal-testing--tiny-random-gptj'		, ignore_errors=_A						)

							# run the command
							transformers.commands.transformers_cli.main()

							# check if the model files are downloaded correctly on /tmp/models--hf-internal-testing--tiny-random-gptj
							self.assertTrue(os.path.exists('/tmp/models--hf-internal-testing--tiny-random-gptj/blobs'						)						)
							self.assertTrue(os.path.exists('/tmp/models--hf-internal-testing--tiny-random-gptj/refs'						)						)
							self.assertTrue(os.path.exists('/tmp/models--hf-internal-testing--tiny-random-gptj/snapshots'						)						)






						@require_torch
						@patch(
						    'sys.argv'		, [
						        'fakeprogrampath',
						        'download',
						        'hf-internal-testing/test_dynamic_model_with_tokenizer',
						        '--trust-remote-code',
						        '--cache-dir',
						        '/tmp',
						    ]		, )
						def UpperCAmelCase_					(   self   :   Optional[Any]						)				->     str:







							"""simple docstring"""


							import transformers.commands.transformers_cli

							# # remove any previously downloaded model to start clean
							shutil.rmtree('/tmp/models--hf-internal-testing--test_dynamic_model_with_tokenizer'		, ignore_errors=_A						)

							# run the command
							transformers.commands.transformers_cli.main()

							# check if the model files are downloaded correctly on /tmp/models--hf-internal-testing--test_dynamic_model_with_tokenizer
							self.assertTrue(os.path.exists('/tmp/models--hf-internal-testing--test_dynamic_model_with_tokenizer/blobs'						)						)
							self.assertTrue(os.path.exists('/tmp/models--hf-internal-testing--test_dynamic_model_with_tokenizer/refs'						)						)
							self.assertTrue(
							    os.path.exists('/tmp/models--hf-internal-testing--test_dynamic_model_with_tokenizer/snapshots'						)						)

