
def     UpperCamelCase (					__lowerCamelCase  :				str       ,      __lowerCamelCase  :				Optional[int] = 1000					):
       if (not isinstance(__snake_case       ,      __snake_case					)) or (digit_position <= 0):
              raise ValueError("Digit position must be a positive integer"					)
       elif (not isinstance(__snake_case       ,      __snake_case					)) or (precision < 0):
              raise ValueError("Precision must be a nonnegative integer"					)

       # compute an approximation of (16 ** (n - 1)) * pi whose fractional part is mostly
       # accurate
       snake_case :     int           =   (
           4 * _subsum(__snake_case       ,      1       ,      __snake_case					)
           - 2 * _subsum(__snake_case       ,      4       ,      __snake_case					)
           - _subsum(__snake_case       ,      5       ,      __snake_case					)
           - _subsum(__snake_case       ,      6       ,      __snake_case					)
       )

       # return the first hex digit of the fractional part of the result
       return hex(int((sum_result % 1) * 16					)					)[2:]


def     UpperCamelCase (					__lowerCamelCase  :				List[str]       ,      __lowerCamelCase  :				str       ,      __lowerCamelCase  :				List[str]					):
       snake_case :     Dict           =   0.0
       for sum_index in range(digit_pos_to_extract + precision					):
              snake_case :     Any           =   8 * sum_index + denominator_addend
              if sum_index < digit_pos_to_extract:
                     # if the exponential term is an integer and we mod it by the denominator
                     # before dividing, only the integer part of the sum will change;
                     # the fractional part will not
                     snake_case :     Dict           =   pow(
                         16       ,      digit_pos_to_extract - 1 - sum_index       ,      __snake_case					)
              else:
                     snake_case :     Union[str, Any]           =   pow(16       ,      digit_pos_to_extract - 1 - sum_index					)
              total += exponential_term / denominator
       return total


if __name__ == "__main__":
   import doctest

   doctest.testmod()







import platform
from argparse import ArgumentParser

import huggingface_hub
import pandas
import pyarrow

from datasets import __version__ as version
from datasets.commands import BaseDatasetsCLICommand


def     UpperCamelCase      (					__lowerCamelCase  :				int					):
       return EnvironmentCommand()






class 						UpperCAmelCase	(		A_				):



   @staticmethod
   def        _SCREAMING_SNAKE_CASE     (snake_case__	:      ArgumentParser				)	->			Any:


          '''simple docstring'''


          snake_case :     Optional[Any]           =   parser.add_parser("env"					,		help="Print relevant system environment info."				)
          download_parser.set_defaults(func=snake_case__				)



   def        _SCREAMING_SNAKE_CASE     (self	:      Dict				)	->			Optional[Any]:


          '''simple docstring'''


          snake_case :     List[str]           =   {
              "`datasets` version": version,
              "Platform": platform.platform(),
              "Python version": platform.python_version(),
              "Huggingface_hub version": huggingface_hub.__version__,
              "PyArrow version": pyarrow.__version__,
              "Pandas version": pandas.__version__,
          }

          print("\nCopy-and-paste the text below in your GitHub issue.\n"				)
          print(self.format_dict(snake_case__				)				)

          return info



   @staticmethod
   def        _SCREAMING_SNAKE_CASE     (snake_case__	:      Tuple				)	->			Any:


          '''simple docstring'''


          return "\n".join([f"""- {prop}: {val}""" for prop, val in d.items()]				) + "\n"





