




def       UpperCAmelCase__  (     lowerCamelCase   ):
  try:
    lowercase    :Union[str, Any]      	=						float(lowerCamelCase   )
  except ValueError:
    raise ValueError("Please enter a valid number"   )
  lowercase    :Any      	=						decimal - int(lowerCamelCase   )
  if fractional_part == 0:
    return int(lowerCamelCase   ), 1
  else:
    lowercase    :str      	=						len(str(lowerCamelCase   ).split("."   )[1]   )
    lowercase    :Any      	=						int(decimal * (10**number_of_frac_digits)   )
    lowercase    :Tuple      	=						10**number_of_frac_digits
    lowercase	,    lowercase    :List[Any]      	=						denominator, numerator
    while True:
      lowercase    :str      	=						dividend % divisor
      if remainder == 0:
        break
      lowercase	,    lowercase    :Tuple      	=						divisor, remainder
    lowercase	,    lowercase    :Tuple      	=						numerator / divisor, denominator / divisor
    return int(lowerCamelCase   ), int(lowerCamelCase   )


if __name__ == "__main__":
     print(f'''{decimal_to_fraction(2) = }''')
     print(f'''{decimal_to_fraction(8_9.0) = }''')
     print(f'''{decimal_to_fraction("67") = }''')
     print(f'''{decimal_to_fraction("45.0") = }''')
     print(f'''{decimal_to_fraction(1.5) = }''')
     print(f'''{decimal_to_fraction("6.25") = }''')
     print(f'''{decimal_to_fraction("78td") = }''')









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase	:						List[Any]			=     {
    "configuration_swinv2": ["SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP", "Swinv2Config"],
}


try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     _UpperCAmelCase	:						Union[str, Any]			=     [
         "SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST",
         "Swinv2ForImageClassification",
         "Swinv2ForMaskedImageModeling",
         "Swinv2Model",
         "Swinv2PreTrainedModel",
     ]


if TYPE_CHECKING:
     from .configuration_swinva import SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinvaConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_swinva import (
              SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST,
              SwinvaForImageClassification,
              SwinvaForMaskedImageModeling,
              SwinvaModel,
              SwinvaPreTrainedModel,
          )


else:
     import sys

     _UpperCAmelCase	:						Tuple			=     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



