



from manim import *




class 					snake_case__						(       UpperCamelCase__     ):






     """simple docstring"""


     def    lowercase_   (       self  :  List[str]					)   ->Dict:
            snake_case__							:	List[Any]   	=	Rectangle(height=0.5, width=0.5					)
            snake_case__							:	Optional[int]   	=	Rectangle(height=0.4_6, width=0.4_6					).set_stroke(width=0					)

            snake_case__							:	Optional[Any]   	=	[mem.copy() for i in range(6					)]
            snake_case__							:	List[Any]   	=	[mem.copy() for i in range(6					)]
            snake_case__							:	Optional[Any]   	=	VGroup(*_a					).arrange(_a, buff=0					)
            snake_case__							:	Any   	=	VGroup(*_a					).arrange(_a, buff=0					)
            snake_case__							:	Optional[int]   	=	VGroup(_a, _a					).arrange(_a, buff=0					)
            snake_case__							:	Optional[Any]   	=	Text('CPU', font_size=2_4					)
            snake_case__							:	List[str]   	=	Group(_a, _a					).arrange(_a, buff=0.5, aligned_edge=_a					)
            cpu.move_to([-2.5, -0.5, 0]					)
            self.add(_a					)

            snake_case__							:	Optional[Any]   	=	[mem.copy() for i in range(4					)]
            snake_case__							:	Optional[int]   	=	VGroup(*_a					).arrange(_a, buff=0					)
            snake_case__							:	Optional[Any]   	=	Text('GPU', font_size=2_4					)
            snake_case__							:	Union[str, Any]   	=	Group(_a, _a					).arrange(_a, buff=0.5, aligned_edge=_a					)
            gpu.move_to([-1, -1, 0]					)
            self.add(_a					)

            snake_case__							:	str   	=	[mem.copy() for i in range(6					)]
            snake_case__							:	int   	=	VGroup(*_a					).arrange(_a, buff=0					)

            snake_case__							:	str   	=	Text('Model', font_size=2_4					)
            snake_case__							:	List[Any]   	=	Group(_a, _a					).arrange(_a, buff=0.5, aligned_edge=_a					)
            model.move_to([3, -1.0, 0]					)
            self.add(_a					)

            snake_case__							:	List[str]   	=	[]
            for i, rect in enumerate(_a					):
                   rect.set_stroke(_a					)
                   # target = fill.copy().set_fill(YELLOW, opacity=0.7)
                   # target.move_to(rect)
                   # self.add(target)

                   snake_case__							:	str   	=	Rectangle(height=0.4_6 / 4, width=0.4_6 / 3					).set_stroke(width=0.0					).set_fill(_a, opacity=0.7					)

                   if i == 0:
                          cpu_target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT					), buff=0.0_2, direction=_a					)
                          cpu_target.set_x(cpu_target.get_x() + 0.1					)
                   elif i == 3:
                          cpu_target.next_to(cpu_targs[0], direction=_a, buff=0.0					)
                   else:
                          cpu_target.next_to(cpu_targs[i - 1], direction=_a, buff=0.0					)
                   self.add(_a					)
                   cpu_targs.append(_a					)

            snake_case__							:	Union[str, Any]   	=	[mem.copy() for i in range(6					)]
            snake_case__							:	str   	=	VGroup(*_a					).arrange(_a, buff=0					)

            snake_case__							:	List[str]   	=	Text('Loaded Checkpoint', font_size=2_4					)
            snake_case__							:	Optional[int]   	=	Group(_a, _a					).arrange(_a, aligned_edge=_a, buff=0.4					)
            checkpoint.move_to([3, 0.5, 0]					)

            snake_case__							:	List[Any]   	=	Square(side_length=2.2					)
            key.move_to([-5, 2, 0]					)

            snake_case__							:	int   	=	MarkupText(
                F'''<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model''', font_size=1_8, )

            key_text.move_to([-5, 2.4, 0]					)

            self.add(_a, _a					)

            snake_case__							:	List[str]   	=	MarkupText(
                F'''<span fgcolor=\'{BLUE}\'>●</span> Checkpoint''', font_size=1_8, )

            blue_text.next_to(_a, DOWN * 2.4, aligned_edge=key_text.get_left()					)

            snake_case__							:	Optional[int]   	=	MarkupText(
                F'''Next, a <i><span fgcolor="{BLUE}">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor="{BLUE}">single shard</span>.''', font_size=2_4, )
            step_a.move_to([2, 2, 0]					)
            self.play(Write(_a					), Write(_a					)					)

            self.play(Write(_a, run_time=1					), Create(_a, run_time=1					)					)

            snake_case__							:	Optional[int]   	=	[]
            snake_case__							:	Dict   	=	[]
            for i, rect in enumerate(_a					):
                   snake_case__							:	int   	=	fill.copy().set_fill(_a, opacity=0.7					)
                   target.move_to(_a					)
                   first_animations.append(GrowFromCenter(_a, run_time=1					)					)

                   snake_case__							:	Optional[Any]   	=	target.copy()
                   cpu_target.generate_target()
                   if i < 5:
                          cpu_target.target.move_to(cpu_left_col_base[i + 1]					)
                   else:
                          cpu_target.target.move_to(cpu_right_col_base[i - 5]					)
                   second_animations.append(MoveToTarget(_a, run_time=1.5					)					)

            self.play(*_a					)
            self.play(*_a					)
            self.wait()












from math import asin, atan, cos, radians, sin, sqrt, tan

_snake_case										=       6_3_7_8_1_3_7.0
_snake_case										=       6_3_5_6_7_5_2.3_1_4_2_4_5
_snake_case										=       6378137







def 				lowerCAmelCase_	(     snake_case_,snake_case_,snake_case_,snake_case_     ):
      _A							:     Any			=						(AXIS_A - AXIS_B) / AXIS_A
      _A							:     Optional[int]			=						atan((1 - flattening) * tan(radians(snake_case_     )     )     )
      _A							:     List[str]			=						atan((1 - flattening) * tan(radians(snake_case_     )     )     )
      _A							:     Optional[Any]			=						radians(snake_case_     )
      _A							:     str			=						radians(snake_case_     )
      # Equation
      _A							:     Dict			=						sin((phi_a - phi_a) / 2     )
      _A							:     List[str]			=						sin((lambda_a - lambda_a) / 2     )
      # Square both values
      sin_sq_phi *= sin_sq_phi
      sin_sq_lambda *= sin_sq_lambda
      _A							:     Optional[int]			=						sqrt(sin_sq_phi + (cos(snake_case_     ) * cos(snake_case_     ) * sin_sq_lambda)     )
      return 2 * RADIUS * asin(snake_case_     )


if __name__ == "__main__":
  import doctest

  doctest.testmod()

