





import sys
import turtle



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



def 	A_       (  _lowerCAmelCase							,     _lowerCAmelCase							,     _lowerCAmelCase							,     _lowerCAmelCase							,     )		->				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(_lowerCAmelCase							,     get_mid(_lowerCAmelCase							,     _lowerCAmelCase  )							,     get_mid(_lowerCAmelCase							,     _lowerCAmelCase  )							,     depth - 1  )
 triangle(_lowerCAmelCase							,     get_mid(_lowerCAmelCase							,     _lowerCAmelCase  )							,     get_mid(_lowerCAmelCase							,     _lowerCAmelCase  )							,     depth - 1  )
 triangle(_lowerCAmelCase							,     get_mid(_lowerCAmelCase							,     _lowerCAmelCase  )							,     get_mid(_lowerCAmelCase							,     _lowerCAmelCase  )							,     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>"""
        )
    __lowerCamelCase :  int										=  turtle.Turtle()
    my_pen.ht()
    my_pen.speed(5)
    my_pen.pencolor("""red""")

    __lowerCamelCase :  Tuple										=  [(-175, -125), (0, 175), (175, -125)]  # vertices of triangle
    triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))







from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream



class       A__     ( __snake_case    ):





      def __init__(				self ,							A_ ,							A_ = None ,							A_ = None ,							A_ = False ,							A_ = False ,							A_ = None ,							A_ = None ,							**A_ ,							):
       '''simple docstring'''




       super().__init__(
           features=A_ ,							cache_dir=A_ ,							keep_in_memory=A_ ,							streaming=A_ ,							num_proc=A_ ,							**A_ ,							)
       UpperCamelCase			:      Optional[int] 			=     Generator(
           cache_dir=A_ ,							features=A_ ,							generator=A_ ,							gen_kwargs=A_ ,							**A_ ,							)





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       if self.streaming:
        UpperCamelCase			:      Optional[Any] 			=     self.builder.as_streaming_dataset(split="train"     )
       # Build regular (map-style) dataset
       else:
        UpperCamelCase			:      Union[str, Any] 			=     None
        UpperCamelCase			:      Union[str, Any] 			=     None
        UpperCamelCase			:      List[Any] 			=     None
        UpperCamelCase			:      List[str] 			=     None

        self.builder.download_and_prepare(
            download_config=A_ ,							download_mode=A_ ,							verification_mode=A_ ,							base_path=A_ ,							num_proc=self.num_proc ,							)
        UpperCamelCase			:      int 			=     self.builder.as_dataset(
            split="train" ,							verification_mode=A_ ,							in_memory=self.keep_in_memory     )
       return dataset
