





import json
import os
import tempfile

import transformers

import datasets
from utils import generate_example_dataset, get_duration


SCREAMING_SNAKE_CASE__							:      Tuple         =    5_0_0_0_0_0

SCREAMING_SNAKE_CASE__   ,  SCREAMING_SNAKE_CASE__							:      Union[str, Any]         =    os.path.split(__file__)
SCREAMING_SNAKE_CASE__							:      Any         =    os.path.join(RESULTS_BASEPATH, """results""", RESULTS_FILENAME.replace(""".py""", """.json"""))






@get_duration
def    _A	(   lowerCamelCase				,			**lowerCamelCase ):
   a__						:    List[str]   		=	dataset.map(**lowerCamelCase )






@get_duration
def    _A	(   lowerCamelCase				,			**lowerCamelCase ):
   a__						:    List[Any]   		=	dataset.filter(**lowerCamelCase )






def    _A	(   ):
   a__						:    str   		=	{"num examples": SPEED_TEST_N_EXAMPLES}
   with tempfile.TemporaryDirectory() as tmp_dir:
      a__						:    Any   		=	datasets.Features({"text": datasets.Value("string" ), "numbers": datasets.Value("float32" )} )
      a__						:    List[str]   		=	generate_example_dataset(
          os.path.join(lowerCamelCase				,			"dataset.arrow" )				,			lowerCamelCase				,			num_examples=lowerCamelCase )

      a__						:    int   		=	transformers.AutoTokenizer.from_pretrained("bert-base-cased"				,			use_fast=lowerCamelCase )

      def tokenize(lowerCamelCase ):
         return tokenizer(examples["text"] )

      a__						:    List[str]   		=	map(lowerCamelCase )

      a__						:    Any   		=	map(lowerCamelCase				,			batched=lowerCamelCase )

      a__						:    List[Any]   		=	map(lowerCamelCase				,			function=lambda lowerCamelCase : None				,			batched=lowerCamelCase )

      with dataset.formatted_as(type="numpy" ):
         a__						:    Optional[int]   		=	map(lowerCamelCase				,			function=lambda lowerCamelCase : None				,			batched=lowerCamelCase )

      with dataset.formatted_as(type="pandas" ):
         a__						:    Tuple   		=	map(lowerCamelCase				,			function=lambda lowerCamelCase : None				,			batched=lowerCamelCase )

      with dataset.formatted_as(type="torch"				,			columns="numbers" ):
         a__						:    Union[str, Any]   		=	map(lowerCamelCase				,			function=lambda lowerCamelCase : None				,			batched=lowerCamelCase )

      with dataset.formatted_as(type="tensorflow"				,			columns="numbers" ):
         a__						:    Optional[int]   		=	map(lowerCamelCase				,			function=lambda lowerCamelCase : None				,			batched=lowerCamelCase )

      a__						:    Any   		=	map(lowerCamelCase				,			function=lowerCamelCase				,			batched=lowerCamelCase )

      a__						:    Tuple   		=	filter(lowerCamelCase )

      # Activate later when tokenizer support batched inputs
      # with dataset.formatted_as(type='numpy'):
      #     times[func.__name__ + " fast-tokenizer batched numpy"] = func(dataset, function=tokenize, batched=True)

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


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








def    _A	(   lowerCamelCase ):
   a__						:    Optional[Any]   		=	1
   for i in range(1				,			num + 1 ):
      fact *= i
   return fact






def    _A	(   lowerCamelCase ):
   a__						:    List[Any]   		=	0
   while number > 0:
      a__						:    str   		=	number % 10
      sum_of_digits += last_digit
      a__						:    Dict   		=	number // 10  # Removing the last_digit from the given number
   return sum_of_digits






def    _A	(   lowerCamelCase = 100 ):
   a__						:    Any   		=	factorial(lowerCamelCase )
   a__						:    Optional[Any]   		=	split_and_add(lowerCamelCase )
   return result


if __name__ == "__main__":
  print(solution(int(input("""Enter the Number: """).strip())))

