



__snake_case	:				int  					=			(1, 153, 370, 371, 1_634, 24_678_051, 115_132_219_018_763_992_565_095_597_973_971_522_401)
__snake_case	:				tuple  					=			(-153, -1, 0, 1.2, 200, "A", [], {}, None)



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

     # Initialization of sum and number of digits.
     A__				=   0
     A__				=   0
     A__				=   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
     A__				=   n
     while temp > 0:
          A__				=   temp % 10
          total += rem**number_of_digits
          temp //= 10
     return n == total



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

     # Init a "histogram" of the digits
     A__				=   [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     A__				=   0
     A__				=   0
     A__				=   n
     while temp > 0:
          A__	,     A__				=   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   a_	(			__a      ):
     if not isinstance(__a		,							__a      ) or n < 1:
          return False
     A__				=   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   a_	(			):
     A__				=   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()








"""simple docstring"""







import json
import os
import tempfile

import datasets
from utils import generate_example_dataset, get_duration


__snake_case	:				Optional[Any]  					=			500_000

__snake_case					,  __snake_case	:				Any  					=			os.path.split(__file__)
__snake_case	:				Optional[Any]  					=			os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.select(range(0		,							len(__a      )		,							2      )      )



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.sort('''numbers'''      )



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.shuffle()



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.train_test_split(0.1      )



@get_duration
def   a_	(			__a		,							__a=10      ):
     for shard_id in range(__a      ):
          A__				=   dataset.shard(__a		,							__a      )



def   a_	(			):
     A__				=   {'''num examples''': SPEED_TEST_N_EXAMPLES}
     A__				=   (select, sort, shuffle, train_test_split, shard)
     with tempfile.TemporaryDirectory() as tmp_dir:
          print('''generating dataset'''      )
          A__				=   datasets.Features({'''text''': datasets.Value('''string'''      ), '''numbers''': datasets.Value('''float32'''      )}      )
          A__				=   generate_example_dataset(
              os.path.join(__a		,							'''dataset.arrow'''      )		,							__a		,							num_examples=__a      )
          print('''Functions'''      )
          for func in functions:
               print(func.__name__      )
               A__				=   func(__a      )

     with open(__a		,							'''wb'''      ) as f:
          f.write(json.dumps(__a      ).encode('''utf-8'''      )      )


if __name__ == "__main__":  # useful to run the profiler
 benchmark_indices_mapping()



