





'''simple docstring'''

from string import ascii_uppercase

lowercase__						:      List[Any]       =    {str(ord(c) - 55): c for c in ascii_uppercase}







def  a__    (    lowercase :					int, lowercase :					int				)		->		str:





     """simple docstring"""

     if isinstance(lowercase__, lowercase__				):
          raise TypeError('''int() can\'t convert non-string with explicit base'''				)
     if num < 0:
          raise ValueError('''parameter must be positive int'''				)
     if isinstance(lowercase__, lowercase__				):
          raise TypeError('''\'str\' object cannot be interpreted as an integer'''				)
     if isinstance(lowercase__, lowercase__				):
          raise TypeError('''\'float\' object cannot be interpreted as an integer'''				)
     if base in (0, 1):
          raise ValueError('''base must be >= 2'''				)
     if base > 36:
          raise ValueError('''base must be <= 36'''				)
     _UpperCamelCase       =	""""""
     _UpperCamelCase       =	0
     _UpperCamelCase       =	0
     while div != 1:
          _UpperCamelCase       =	divmod(lowercase__, lowercase__				)
          if base >= 11 and 9 < mod < 36:
               _UpperCamelCase       =	ALPHABET_VALUES[str(lowercase__				)]
          else:
               _UpperCamelCase       =	str(lowercase__				)
          new_value += actual_value
          _UpperCamelCase       =	num // base
          _UpperCamelCase       =	div
          if div == 0:
               return str(new_value[::-1]				)
          elif div == 1:
               new_value += str(lowercase__				)
               return str(new_value[::-1]				)

     return new_value[::-1]


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   for base in range(2, 37):
      for num in range(10_00):
         assert int(decimal_to_any(num, base), base) == num, (
             num,
             base,
             decimal_to_any(num, base),
             int(decimal_to_any(num, base), base),
         )










'''simple docstring'''

from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase__						:      Optional[Any]	=    {
    'configuration_autoformer': [
        'AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'AutoformerConfig',
    ],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowercase__						:      List[Any]	=    [
       'AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
       'AutoformerForPrediction',
       'AutoformerModel',
       'AutoformerPreTrainedModel',
   ]


if TYPE_CHECKING:
   from .configuration_autoformer import (
       AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
       AutoformerConfig,
   )

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_autoformer import (
          AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          AutoformerForPrediction,
          AutoformerModel,
          AutoformerPreTrainedModel,
      )

else:
   import sys

   lowercase__						:      Tuple	=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



