code: 
  """simple docstring"""
  
  
  
  
  
  import json
  import os
  from dataclasses import dataclass
  
  import numpy as np
  import pyarrow as pa
  
  import datasets
  from utils import get_duration
  
  
  _a	 =							100_000_000_000
  _a	 =							10_000
  
  _a	 =							os.path.split(__file__)
  _a	 =							os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))
  
  
  
  
  
  
  
  def 			__a  (	__lowerCamelCase,	__lowerCamelCase						):
     UpperCAmelCase_      :      Optional[int]      =					pa.Table.from_pydict({"col": [0] * chunk_size}						)
     UpperCAmelCase_      :      Tuple      =					pa.concat_tables([table] * (num_examples // chunk_size)						)
     return datasets.Dataset(__lowerCamelCase,	fingerprint="table_100B"						)
  
  
  @dataclass
  class A_			:
  
  
  
  
    '''simple docstring'''
    SCREAMING_SNAKE_CASE__    :		Any						  =	42
    SCREAMING_SNAKE_CASE__    :		Tuple						  =	42
    SCREAMING_SNAKE_CASE__    :		Optional[int]						  =	42
    SCREAMING_SNAKE_CASE__    :		Optional[int]						  =	42
  
  
  
  
  
  
  
    def  UpperCamelCase__      (	self						):
  
       """simple docstring"""
       UpperCAmelCase_      :      Dict      =					np.random.default_rng(self.seed						)
       UpperCAmelCase_      :      Any      =					rng.integers(low=self.low       ,     high=self.high       ,     size=self.size						).tolist()
  
  
  
  
  
  
  
    def __iter__(	self						):
  
       """simple docstring"""
       return iter(self._sampled_values						)
  
  
  
  
  
  
  
    def __len__(	self						):
  
       """simple docstring"""
       return self.size
  
  
  
  
  
  
  
  @get_duration
  def 			__a  (	__lowerCamelCase						):
     UpperCAmelCase_      :      str      =					dataset[0]
  
  
  
  
  
  
  
  @get_duration
  def 			__a  (	__lowerCamelCase						):
     UpperCAmelCase_      :      Union[str, Any]      =					dataset[-1]
  
  
  
  
  
  
  
  @get_duration
  def 			__a  (	__lowerCamelCase						):
     UpperCAmelCase_      :      List[Any]      =					dataset[range(len(__lowerCamelCase						) // 2,	len(__lowerCamelCase						) // 2 + 1024						)]
  
  
  
  
  
  
  
  @get_duration
  def 			__a  (	__lowerCamelCase						):
     UpperCAmelCase_      :      List[str]      =					dataset[RandIter(0,	len(__lowerCamelCase						),	1024,	seed=42						)]
  
  
  
  
  
  
  
  def 			__a  (	):
     UpperCAmelCase_      :      Any      =					{"""num examples""": SPEED_TEST_N_EXAMPLES}
     UpperCAmelCase_      :      int      =					(get_first_row, get_last_row, get_batch_of_aaaa_rows, get_batch_of_aaaa_random_rows)
     print("generating dataset"						)
     UpperCAmelCase_      :      Tuple      =					generate_100B_dataset(num_examples=__lowerCamelCase,	chunk_size=__lowerCamelCase						)
     print("Functions"						)
     for func in functions:
        print(func.__name__						)
        UpperCAmelCase_      :      Tuple      =					func(__lowerCamelCase						)
  
     with open(__lowerCamelCase,	"wb"						) as f:
        f.write(json.dumps(__lowerCamelCase						).encode("utf-8"						)						)
  
  
  if __name__ == "__main__":  # useful to run the profiler
      benchmark_table_100B()
  
  
  
style_context: 
  """simple docstring"""
  
  
  
  
  
  from __future__ import annotations
  
  from typing import Any
  
  
  class A_			:
  
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
  
    def __init__(	self       ,     lowercase_       ,     lowercase_						):  # noqa: A002
  
       """simple docstring"""
       UpperCAmelCase_      :      Optional[Any]      =					item
       UpperCAmelCase_      :      Optional[Any]      =					next
  
  
  
  
  class A_			:
  
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
  
    def __init__(	self						):
  
       """simple docstring"""
       UpperCAmelCase_      :      Node | None      =					None
       UpperCAmelCase_      :      Optional[int]      =					0
  
  
  
  
  
  
  
    def  UpperCamelCase__      (	self       ,     lowercase_						):
  
       """simple docstring"""
       UpperCAmelCase_      :      int      =					Node(lowercase_       ,     self.head						)
       self.size += 1
  
  
  
  
  
  
  
    def  UpperCamelCase__      (	self						):
  
       """simple docstring"""
       # Switched 'self.is_empty()' to 'self.head is None'
       # because mypy was considering the possibility that 'self.head'
       # can be None in below else part and giving error
       if self.head is None:
          return None
       else:
          UpperCAmelCase_      :      int      =					self.head.item
          UpperCAmelCase_      :      str      =					self.head.next
          self.size -= 1
          return item
  
  
  
  
  
  
  
    def  UpperCamelCase__      (	self						):
  
       """simple docstring"""
       return self.head is None
  
  
  
  
  
  
  
    def __str__(	self						):
  
       """simple docstring"""
       if self.is_empty():
          return ""
       else:
          UpperCAmelCase_      :      str      =					self.head
          UpperCAmelCase_      :      str      =					""
          UpperCAmelCase_      :      list[str]      =					[]
          while iterate:
             item_list.append(str(iterate.item						)						)
             UpperCAmelCase_      :      Tuple      =					iterate.next
  
          UpperCAmelCase_      :      Optional[Any]      =					" --> ".join(lowercase_						)
  
          return item_str
  
  
  
  
  
  
  
    def __len__(	self						):
  
       """simple docstring"""
       return self.size
  
  
  