



"""simple docstring"""







import json
import os
import tempfile

import datasets
from utils import generate_example_dataset, get_duration


__snake_case	:				Optional[Any]  					=			500_000

__snake_case	:				Any  					=			os.path.split(__file__)
__snake_case	:				Optional[Any]  					=			os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.select(range(0		,							len(__a      )		,							2      )      )



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.sort('''numbers'''      )



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.shuffle()



@get_duration
def   a_	(			__a      ):
     A__				=   dataset.train_test_split(0.1      )



@get_duration
def   a_	(			__a		,							__a=10      ):
     for shard_id in range(__a      ):
          A__				=   dataset.shard(__a		,							__a      )



def   a_	(			):
     A__				=   {'''num examples''': SPEED_TEST_N_EXAMPLES}
     A__				=   (select, sort, shuffle, train_test_split, shard)
     with tempfile.TemporaryDirectory() as tmp_dir:
          print('''generating dataset'''      )
          A__				=   datasets.Features({'''text''': datasets.Value('''string'''      ), '''numbers''': datasets.Value('''float32'''      )}      )
          A__				=   generate_example_dataset(
              os.path.join(__a		,							'''dataset.arrow'''      )		,							__a		,							num_examples=__a      )
          print('''Functions'''      )
          for func in functions:
               print(func.__name__      )
               A__				=   func(__a      )

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


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










"""simple docstring"""







from math import factorial



def   a_	(			__a		,							__a      ):
     return factorial(__a      ) / (factorial(__a      ) * factorial(n - r      ))



def   a_	(			):
     A__				=   0

     for i in range(1		,							101      ):
          for j in range(1		,							i + 1      ):
               if combinations(__a		,							__a      ) > 1e6:
                    total += 1
     return total


if __name__ == "__main__":
 print(solution())



