"""simple docstring"""






from string import ascii_uppercase

__lowerCAmelCase					: List[str]        ={str(ord(c) - 5_5): c for c in ascii_uppercase}


def     UpperCAmelCase__ (       lowerCAmelCase__  :int      ,	lowerCAmelCase__  :int	)				->					str:
      '''simple docstring'''


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

      return new_value[::-1]


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       for base in range(2, 3_7):
              for num in range(1_0_0_0):
                     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

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


__lowerCAmelCase					: Dict        ={
    """configuration_xlm""": ["""XLM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLMConfig""", """XLMOnnxConfig"""],
    """tokenization_xlm""": ["""XLMTokenizer"""],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCAmelCase					: int        =[
           """XLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """XLMForMultipleChoice""",
           """XLMForQuestionAnswering""",
           """XLMForQuestionAnsweringSimple""",
           """XLMForSequenceClassification""",
           """XLMForTokenClassification""",
           """XLMModel""",
           """XLMPreTrainedModel""",
           """XLMWithLMHeadModel""",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCAmelCase					: Union[str, Any]        =[
           """TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """TFXLMForMultipleChoice""",
           """TFXLMForQuestionAnsweringSimple""",
           """TFXLMForSequenceClassification""",
           """TFXLMForTokenClassification""",
           """TFXLMMainLayer""",
           """TFXLMModel""",
           """TFXLMPreTrainedModel""",
           """TFXLMWithLMHeadModel""",
       ]


if TYPE_CHECKING:
       from .configuration_xlm import XLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMConfig, XLMOnnxConfig
       from .tokenization_xlm import XLMTokenizer

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_xlm import (
                  XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  XLMForMultipleChoice,
                  XLMForQuestionAnswering,
                  XLMForQuestionAnsweringSimple,
                  XLMForSequenceClassification,
                  XLMForTokenClassification,
                  XLMModel,
                  XLMPreTrainedModel,
                  XLMWithLMHeadModel,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_xlm import (
                  TF_XLM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFXLMForMultipleChoice,
                  TFXLMForQuestionAnsweringSimple,
                  TFXLMForSequenceClassification,
                  TFXLMForTokenClassification,
                  TFXLMMainLayer,
                  TFXLMModel,
                  TFXLMPreTrainedModel,
                  TFXLMWithLMHeadModel,
              )

else:
       import sys

       __lowerCAmelCase					: Optional[int]        =_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



