


import sys
import turtle







def 				UpperCAmelCase					(  UpperCAmelCase					,UpperCAmelCase   )->		Dict:







					'''simple docstring'''



					return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2







def 				UpperCAmelCase					(  UpperCAmelCase					,UpperCAmelCase					,UpperCAmelCase					,UpperCAmelCase					,)->		Tuple:







					'''simple docstring'''



					my_pen.up()
					my_pen.goto(vertexa[0]					,vertexa[1]   )
					my_pen.down()
					my_pen.goto(vertexa[0]					,vertexa[1]   )
					my_pen.goto(vertexa[0]					,vertexa[1]   )
					my_pen.goto(vertexa[0]					,vertexa[1]   )

					if depth == 0:
										return

					triangle(__A					,get_mid(__A					,__A   )					,get_mid(__A					,__A   )					,depth - 1   )
					triangle(__A					,get_mid(__A					,__A   )					,get_mid(__A					,__A   )					,depth - 1   )
					triangle(__A					,get_mid(__A					,__A   )					,get_mid(__A					,__A   )					,depth - 1   )


if __name__ == "__main__":
		if len(sys.argv) != 2:
				raise ValueError(
				    "Correct format for using this script: "
				    "python fractals.py <int:depth_for_fractal>"
				)
		A_								=   turtle.Turtle()
		my_pen.ht()
		my_pen.speed(5)
		my_pen.pencolor("red")

		A_								=   [(-1_7_5, -1_2_5), (0, 1_7_5), (1_7_5, -1_2_5)]  # vertices of triangle
		triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))







'''simple docstring'''





import json
import os
import unittest

from transformers.models.ctrl.tokenization_ctrl import VOCAB_FILES_NAMES, CTRLTokenizer

from ...test_tokenization_common import TokenizerTesterMixin






class __A     (    A  ,  unittest.TestCase		):



 '''simple docstring'''







 __lowerCamelCase       :			Union[str, Any]		=			CTRLTokenizer
 __lowerCamelCase       :			Union[str, Any]		=			False
 __lowerCamelCase       :			Any		=			False



 def    a__    (self			)       ->	Optional[int]:


      """simple docstring"""



      super().setUp()

      # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
      _a           =    ['''adapt''', '''re@@''', '''a@@''', '''apt''', '''c@@''', '''t''', '''<unk>''']
      _a           =    dict(zip(A					,  range(len(A			)			)			)			)
      _a           =    ['''#version: 0.2''', '''a p''', '''ap t</w>''', '''r e''', '''a d''', '''ad apt</w>''', '''''']
      _a           =    {'''unk_token''': '''<unk>'''}

      _a           =    os.path.join(self.tmpdirname					,  VOCAB_FILES_NAMES['''vocab_file''']			)
      _a           =    os.path.join(self.tmpdirname					,  VOCAB_FILES_NAMES['''merges_file''']			)
      with open(self.vocab_file					,  '''w'''					,  encoding='''utf-8'''			) as fp:
           fp.write(json.dumps(A			) + '''\n'''			)
      with open(self.merges_file					,  '''w'''					,  encoding='''utf-8'''			) as fp:
           fp.write('''\n'''.join(A			)			)



 def    a__    (self					,  **A			)       ->	int:


      """simple docstring"""



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



 def    a__    (self					,  A			)       ->	Tuple:


      """simple docstring"""



      _a           =    '''adapt react readapt apt'''
      _a           =    '''adapt react readapt apt'''
      return input_text, output_text



 def    a__    (self			)       ->	List[Any]:


      """simple docstring"""



      _a           =    CTRLTokenizer(self.vocab_file					,  self.merges_file					,  **self.special_tokens_map			)
      _a           =    '''adapt react readapt apt'''
      _a           =    '''adapt re@@ a@@ c@@ t re@@ adapt apt'''.split()
      _a           =    tokenizer.tokenize(A			)
      self.assertListEqual(A					,  A			)

      _a           =    tokens + [tokenizer.unk_token]

      _a           =    [0, 1, 2, 4, 5, 1, 0, 3, 6]
      self.assertListEqual(tokenizer.convert_tokens_to_ids(A			)					,  A			)



