






"""simple docstring"""


import json
import os
import unittest

from transformers.models.gpt_neox_japanese.tokenization_gpt_neox_japanese import (
    VOCAB_FILES_NAMES,
    GPTNeoXJapaneseTokenizer,
)
from transformers.testing_utils import require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin






@require_tokenizers
class 		snake_case    (    UpperCAmelCase  ,					unittest.TestCase			):
    __magic_name__       	=	GPTNeoXJapaneseTokenizer
    __magic_name__       	=	False
    __magic_name__       	=	{'''do_clean_text''': False, '''add_prefix_space''': False}





    def 							lowerCamelCase__ (				self      :   Any     ):


      '''simple docstring'''




      super().setUp()

      a	:     Union[str, Any]							=  [
          'こん',
          'こんに',
          'にちは',
          'ばんは',
          '世界,㔺界',
          '、',
          '。',
          '<BR>',
          '<SP>',
          '<TAB>',
          '<URL>',
          '<EMAIL>',
          '<TEL>',
          '<DATE>',
          '<PRICE>',
          '<BLOCK>',
          '<KIGOU>',
          '<U2000U2BFF>',
          '<|emoji1|>',
          '<unk>',
          '<|startoftext|>',
          '<|endoftext|>',
      ]
      a	:     Optional[int]							=  {'emoji': {'\ud83d\ude00': '<|emoji1|>'}, 'emoji_inv': {'<|emoji1|>': '\ud83d\ude00'}}  # 😀
      a	:     List[Any]							=  {'unk_token': '<unk>'}

      a	:     int							=  os.path.join(self.tmpdirname							,						VOCAB_FILES_NAMES['vocab_file']     )
      a	:     int							=  os.path.join(self.tmpdirname							,						VOCAB_FILES_NAMES['emoji_file']     )
      with open(self.vocab_file							,						'w'							,						encoding='utf-8'     ) as vocab_writer:
        vocab_writer.write(''.join([x + '\n' for x in vocab_tokens]     )     )
      with open(self.emoji_file							,						'w'     ) as emoji_writer:
        emoji_writer.write(json.dumps(A     )     )





    def 							lowerCamelCase__ (				self      :   List[str]							,						**A      :   Tuple     ):


      '''simple docstring'''




      kwargs.update(self.special_tokens_map     )
      return GPTNeoXJapaneseTokenizer.from_pretrained(self.tmpdirname							,						**A     )





    def 							lowerCamelCase__ (				self      :   Union[str, Any]							,						A      :   int     ):


      '''simple docstring'''




      a	:     Union[str, Any]							=  'こんにちは、世界。 \nこんばんは、㔺界。😀'
      a	:     Optional[Any]							=  'こんにちは、世界。 \nこんばんは、世界。😀'
      return input_text, output_text





    def 							lowerCamelCase__ (				self      :   int							,						A      :   Union[str, Any]     ):


      '''simple docstring'''




      a,	a	:     List[str]							=  self.get_input_output_texts(A     )
      a	:     Tuple							=  tokenizer.encode(A							,						add_special_tokens=A     )
      a	:     Optional[Any]							=  tokenizer.decode(A							,						clean_up_tokenization_spaces=A     )
      return text, ids





    def 							lowerCamelCase__ (				self      :   List[str]     ):


      '''simple docstring'''




      pass  # TODO add if relevant





    def 							lowerCamelCase__ (				self      :   int     ):


      '''simple docstring'''




      pass  # TODO add if relevant





    def 							lowerCamelCase__ (				self      :   int     ):


      '''simple docstring'''




      pass  # TODO add if relevant





    def 							lowerCamelCase__ (				self      :   Dict     ):


      '''simple docstring'''




      a	:     Dict							=  self.get_tokenizer()

      # Testing tokenization
      a	:     Optional[int]							=  'こんにちは、世界。　こんばんは、㔺界。'
      a	:     str							=  ['こん', 'にちは', '、', '世界', '。', '<SP>', 'こん', 'ばんは', '、', '㔺界', '。']
      a	:     Dict							=  tokenizer.tokenize(A     )
      self.assertListEqual(A							,						A     )

      # Testing conversion to ids without special tokens
      a	:     List[Any]							=  [0, 2, 5, 4, 6, 8, 0, 3, 5, 4, 6]
      a	:     List[Any]							=  tokenizer.convert_tokens_to_ids(A     )
      self.assertListEqual(A							,						A     )

      # Testing conversion to ids with special tokens
      a	:     List[Any]							=  tokens + [tokenizer.unk_token]
      a	:     List[Any]							=  [0, 2, 5, 4, 6, 8, 0, 3, 5, 4, 6, 1_9]
      a	:     Tuple							=  tokenizer.convert_tokens_to_ids(A     )
      self.assertListEqual(A							,						A     )





    @slow
    def 							lowerCamelCase__ (				self      :   List[Any]     ):


      '''simple docstring'''




      a	:     List[str]							=  self.tokenizer_class.from_pretrained('abeja/gpt-neox-japanese-2.7b'     )

      a	:     str							=  tokenizer.encode('ありがとう。'							,						add_special_tokens=A     )
      a	:     Optional[int]							=  tokenizer.encode('どういたしまして。'							,						add_special_tokens=A     )

      a	:     int							=  tokenizer.build_inputs_with_special_tokens(A     )
      a	:     List[Any]							=  tokenizer.build_inputs_with_special_tokens(A							,						A     )

      assert encoded_sentence == ids_a
      assert encoded_pair == ids_a + ids_a





    def 							lowerCamelCase__ (				self      :   Optional[int]     ):


      '''simple docstring'''




      pass





    def 							lowerCamelCase__ (				self      :   Optional[Any]     ):


      '''simple docstring'''




      pass












"""simple docstring"""


_UpperCamelCase							:       str       					=		10**8




def      snake_case    (A_ :int ):







  '''simple docstring'''

  if n % 1_0 == 0:
    return False
  a	:     Optional[int]							=  str(A_ )
  return s == s[::-1]




def      snake_case    ():







  '''simple docstring'''

  a	:     Tuple							=  set()
  a	:     Optional[Any]							=  1
  a	:     List[str]							=  5
  while sum_squares < LIMIT:
    a	:     int							=  first_square + 1
    while sum_squares < LIMIT:
      if is_palindrome(A_ ):
        answer.add(A_ )
      last_square += 1
      sum_squares += last_square**2
    first_square += 1
    a	:     List[str]							=  first_square**2 + (first_square + 1) ** 2

  return sum(A_ )


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




