





'''simple docstring'''




import sys
import turtle






def 	_lowerCAmelCase      (  __snake_case  :			tuple[float, float]			,							__snake_case  :			tuple[float, float]      )					->					tuple[float, float]:
     return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2






def 	_lowerCAmelCase      (  __snake_case  :			tuple[float, float]			,							__snake_case  :			tuple[float, float]			,							__snake_case  :			tuple[float, float]			,							__snake_case  :			int			,							)					->					None:
     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(__snake_case			,							get_mid(__snake_case			,							__snake_case      )			,							get_mid(__snake_case			,							__snake_case      )			,							depth - 1      )
     triangle(__snake_case			,							get_mid(__snake_case			,							__snake_case      )			,							get_mid(__snake_case			,							__snake_case      )			,							depth - 1      )
     triangle(__snake_case			,							get_mid(__snake_case			,							__snake_case      )			,							get_mid(__snake_case			,							__snake_case      )			,							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>'''
    )
  lowercase__   :				Optional[int]      =   turtle.Turtle()
  my_pen.ht()
  my_pen.speed(5)
  my_pen.pencolor('''red''')

  lowercase__   :				Dict      =   [(-1_75, -1_25), (0, 1_75), (1_75, -1_25)]  # vertices of triangle
  triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))






'''simple docstring'''




import argparse


lowercase__   :				Any      =   '''docs/source/_static/js/custom.js'''






def 	_lowerCAmelCase      (  __snake_case  :			Union[str, Any]      )					->					str:
     with open(__snake_case			,							encoding='utf-8'			,							newline='\n'      ) as f:
          __A						:			Optional[Any]								=	f.readlines()
     __A						:			List[str]								=	0

     # First let's put the right version
     while not lines[index].startswith('const stableVersion ='      ):
          index += 1
     __A						:			Tuple								=	f'const stableVersion = "v{version}"\n'

     # Then update the dictionary
     while not lines[index].startswith('const versionMapping = {'      ):
          index += 1

     # We go until the end
     while not lines[index].startswith('}'      ):
          index += 1
     # We add the new version at the end
     lines[index - 1] += f'    "v{version}": "v{version}",\n'

     with open(__snake_case			,							'w'			,							encoding='utf-8'			,							newline='\n'      ) as f:
          f.writelines(__snake_case      )


if __name__ == "__main__":
  lowercase__   :				Optional[Any]      =   argparse.ArgumentParser()
  parser.add_argument('''--version''', help='''Release version.''')
  lowercase__   :				List[str]      =   parser.parse_args()
  update_custom_js(args.version)