






import random
def 						_a    (      a :int )							->			bool:
 a		  =      num - 1
 a		  =      0

 while s % 2 == 0:
  a		  =      s // 2
  t += 1

 for _ in range(5 ):
  a		  =      random.randrange(2	,							num - 1 )
  a		  =      pow(a	,							a	,							a )
  if v != 1:
   a		  =      0
   while v != (num - 1):
    if i == t - 1:
     return False
    else:
     a		  =      i + 1
     a		  =      (v**2) % num
 return True
def 						_a    (      a :int )							->			bool:
 if num < 2:
  return False

 a		  =      [
     2,
     3,
     5,
     7,
     11,
     13,
     17,
     19,
     23,
     29,
     31,
     37,
     41,
     43,
     47,
     53,
     59,
     61,
     67,
     71,
     73,
     79,
     83,
     89,
     97,
     101,
     103,
     107,
     109,
     113,
     127,
     131,
     137,
     139,
     149,
     151,
     157,
     163,
     167,
     173,
     179,
     181,
     191,
     193,
     197,
     199,
     211,
     223,
     227,
     229,
     233,
     239,
     241,
     251,
     257,
     263,
     269,
     271,
     277,
     281,
     283,
     293,
     307,
     311,
     313,
     317,
     331,
     337,
     347,
     349,
     353,
     359,
     367,
     373,
     379,
     383,
     389,
     397,
     401,
     409,
     419,
     421,
     431,
     433,
     439,
     443,
     449,
     457,
     461,
     463,
     467,
     479,
     487,
     491,
     499,
     503,
     509,
     521,
     523,
     541,
     547,
     557,
     563,
     569,
     571,
     577,
     587,
     593,
     599,
     601,
     607,
     613,
     617,
     619,
     631,
     641,
     643,
     647,
     653,
     659,
     661,
     673,
     677,
     683,
     691,
     701,
     709,
     719,
     727,
     733,
     739,
     743,
     751,
     757,
     761,
     769,
     773,
     787,
     797,
     809,
     811,
     821,
     823,
     827,
     829,
     839,
     853,
     857,
     859,
     863,
     877,
     881,
     883,
     887,
     907,
     911,
     919,
     929,
     937,
     941,
     947,
     953,
     967,
     971,
     977,
     983,
     991,
     997,
 ]

 if num in low_primes:
  return True

 for prime in low_primes:
  if (num % prime) == 0:
   return False

 return rabin_miller(a )
def 						_a    (      a :int = 1_024 )							->			int:
 while True:
  a		  =      random.randrange(2 ** (keysize - 1)	,							2 ** (keysize) )
  if is_prime_low_num(a ):
   return num


if __name__ == "__main__":
     UpperCAmelCase__				   =		generate_large_prime()
     print(("Prime number:", num))
     print(("is_prime_low_num:", is_prime_low_num(num)))










import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from .tokenization_electra import ElectraTokenizer


UpperCAmelCase__				   =		{"vocab_file": "vocab.txt", "tokenizer_file": "tokenizer.json"}

UpperCAmelCase__				   =		{
    "vocab_file": {
        "google/electra-small-generator": (
            "https://huggingface.co/google/electra-small-generator/resolve/main/vocab.txt"
        ),
        "google/electra-base-generator": "https://huggingface.co/google/electra-base-generator/resolve/main/vocab.txt",
        "google/electra-large-generator": (
            "https://huggingface.co/google/electra-large-generator/resolve/main/vocab.txt"
        ),
        "google/electra-small-discriminator": (
            "https://huggingface.co/google/electra-small-discriminator/resolve/main/vocab.txt"
        ),
        "google/electra-base-discriminator": (
            "https://huggingface.co/google/electra-base-discriminator/resolve/main/vocab.txt"
        ),
        "google/electra-large-discriminator": (
            "https://huggingface.co/google/electra-large-discriminator/resolve/main/vocab.txt"
        ),
    },
    "tokenizer_file": {
        "google/electra-small-generator": (
            "https://huggingface.co/google/electra-small-generator/resolve/main/tokenizer.json"
        ),
        "google/electra-base-generator": (
            "https://huggingface.co/google/electra-base-generator/resolve/main/tokenizer.json"
        ),
        "google/electra-large-generator": (
            "https://huggingface.co/google/electra-large-generator/resolve/main/tokenizer.json"
        ),
        "google/electra-small-discriminator": (
            "https://huggingface.co/google/electra-small-discriminator/resolve/main/tokenizer.json"
        ),
        "google/electra-base-discriminator": (
            "https://huggingface.co/google/electra-base-discriminator/resolve/main/tokenizer.json"
        ),
        "google/electra-large-discriminator": (
            "https://huggingface.co/google/electra-large-discriminator/resolve/main/tokenizer.json"
        ),
    },
}

UpperCAmelCase__				   =		{
    "google/electra-small-generator": 512,
    "google/electra-base-generator": 512,
    "google/electra-large-generator": 512,
    "google/electra-small-discriminator": 512,
    "google/electra-base-discriminator": 512,
    "google/electra-large-discriminator": 512,
}

UpperCAmelCase__				   =		{
    "google/electra-small-generator": {"do_lower_case": True},
    "google/electra-base-generator": {"do_lower_case": True},
    "google/electra-large-generator": {"do_lower_case": True},
    "google/electra-small-discriminator": {"do_lower_case": True},
    "google/electra-base-discriminator": {"do_lower_case": True},
    "google/electra-large-discriminator": {"do_lower_case": True},
}






class 		lowercase_					(	lowercase   ):






      '''simple docstring'''




      __snake_case       =  VOCAB_FILES_NAMES
      __snake_case       =  PRETRAINED_VOCAB_FILES_MAP
      __snake_case       =  PRETRAINED_INIT_CONFIGURATION
      __snake_case       =  PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
      __snake_case       =  ElectraTokenizer







      def __init__(      self      :						Dict ,					__UpperCAmelCase      :						int=None ,					__UpperCAmelCase      :						str=None ,					__UpperCAmelCase      :						Optional[int]=True ,					__UpperCAmelCase      :						str="[UNK]" ,					__UpperCAmelCase      :						Any="[SEP]" ,					__UpperCAmelCase      :						str="[PAD]" ,					__UpperCAmelCase      :						Optional[Any]="[CLS]" ,					__UpperCAmelCase      :						Union[str, Any]="[MASK]" ,					__UpperCAmelCase      :						List[str]=True ,					__UpperCAmelCase      :						Tuple=None ,					**__UpperCAmelCase      :						Optional[int] ,					)    ->str:




       """simple docstring"""


       super().__init__(
           __UpperCAmelCase ,					tokenizer_file=__UpperCAmelCase ,					do_lower_case=__UpperCAmelCase ,					unk_token=__UpperCAmelCase ,					sep_token=__UpperCAmelCase ,					pad_token=__UpperCAmelCase ,					cls_token=__UpperCAmelCase ,					mask_token=__UpperCAmelCase ,					tokenize_chinese_chars=__UpperCAmelCase ,					strip_accents=__UpperCAmelCase ,					**__UpperCAmelCase ,					)

       a		  =      json.loads(self.backend_tokenizer.normalizer.__getstate__()  )
       if (
           normalizer_state.get('''lowercase''' ,					__UpperCAmelCase  ) != do_lower_case
           or normalizer_state.get('''strip_accents''' ,					__UpperCAmelCase  ) != strip_accents
           or normalizer_state.get('''handle_chinese_chars''' ,					__UpperCAmelCase  ) != tokenize_chinese_chars
       ):
        a		  =      getattr(__UpperCAmelCase ,					normalizer_state.pop('''type'''  )  )
        a		  =      do_lower_case
        a		  =      strip_accents
        a		  =      tokenize_chinese_chars
        a		  =      normalizer_class(**__UpperCAmelCase  )

       a		  =      do_lower_case







      def       __lowerCAmelCase					(      self      :						List[Any] ,					__UpperCAmelCase      :						Optional[int] ,					__UpperCAmelCase      :						Tuple=None  )    ->str:




       """simple docstring"""


       a		  =      [self.cls_token_id] + token_ids_a + [self.sep_token_id]

       if token_ids_a:
        output += token_ids_a + [self.sep_token_id]

       return output







      def       __lowerCAmelCase					(      self      :						Optional[Any] ,					__UpperCAmelCase      :						List[int] ,					__UpperCAmelCase      :						Optional[List[int]] = None  )    ->List[int]:




       """simple docstring"""


       a		  =      [self.sep_token_id]
       a		  =      [self.cls_token_id]
       if token_ids_a is None:
        return len(cls + token_ids_a + sep  ) * [0]
       return len(cls + token_ids_a + sep  ) * [0] + len(token_ids_a + sep  ) * [1]







      def       __lowerCAmelCase					(      self      :						List[str] ,					__UpperCAmelCase      :						str ,					__UpperCAmelCase      :						Optional[str] = None  )    ->Tuple[str]:




       """simple docstring"""


       a		  =      self._tokenizer.model.save(__UpperCAmelCase ,					name=__UpperCAmelCase  )
       return tuple(__UpperCAmelCase  )


