


"""simple docstring"""





from arguments import TokenizerTrainingArguments
from datasets import load_dataset
from tqdm import tqdm

from transformers import AutoTokenizer, HfArgumentParser
from transformers.models.gpta.tokenization_gpta import bytes_to_unicode





def     lowercase__	(  lowerCamelCase     :  Optional[Any]=1_0				)					->     List[Any]:
  for _ in tqdm(range(0				,	args.n_examples				,	lowerCamelCase				)				):
    yield [next(lowerCamelCase				)[args.text_column] for _ in range(lowerCamelCase				)]


# Configuration
__UpperCAmelCase    				=      HfArgumentParser(TokenizerTrainingArguments)
__UpperCAmelCase    				=      parser.parse_args()

# Base tokenizer
__UpperCAmelCase    				=      AutoTokenizer.from_pretrained(args.base_tokenizer)
__UpperCAmelCase    				=      list(bytes_to_unicode().values())

# Load dataset
__UpperCAmelCase    				=      load_dataset(args.dataset_name, split="train", streaming=True)
__UpperCAmelCase    				=      iter(dataset)


# Training and saving
__UpperCAmelCase    				=      tokenizer.train_new_from_iterator(
    batch_iterator(), vocab_size=args.vocab_size, initial_alphabet=base_vocab
)







new_tokenizer.save_pretrained(args.tokenizer_name, push_to_hub=args.push_to_hub)




"""simple docstring"""





from math import factorial





def     lowercase__	(  lowerCamelCase     :  Dict				,	lowerCamelCase     :  int				)					->     Tuple:
  return factorial(lowerCamelCase				) / (factorial(lowerCamelCase				) * factorial(n - r				))





def     lowercase__	(  )					->     Optional[Any]:
  lowerCAmelCase__    :    List[Any]								=					0

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


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