



'''simple docstring'''






from manim import *



class 							lowercase       (  _lowerCamelCase				):


 """simple docstring"""


 def _snake_case (							self							)		->   Optional[Any]:
        _UpperCAmelCase  :						Any			     = Rectangle(height=0.5  ,width=0.5							)
        _UpperCAmelCase  :						str			     = Rectangle(height=0.46  ,width=0.46							).set_stroke(width=0							)

        _UpperCAmelCase  :						List[Any]			     = [mem.copy() for i in range(6							)]
        _UpperCAmelCase  :						Any			     = [mem.copy() for i in range(6							)]
        _UpperCAmelCase  :						Dict			     = VGroup(*a_							).arrange(a_  ,buff=0							)
        _UpperCAmelCase  :						Optional[Any]			     = VGroup(*a_							).arrange(a_  ,buff=0							)
        _UpperCAmelCase  :						List[str]			     = VGroup(a_  ,a_							).arrange(a_  ,buff=0							)
        _UpperCAmelCase  :						int			     = Text("""CPU"""  ,font_size=24							)
        _UpperCAmelCase  :						Optional[int]			     = Group(a_  ,a_							).arrange(a_  ,buff=0.5  ,aligned_edge=a_							)
        cpu.move_to([-2.5, -0.5, 0]							)
        self.add(a_							)

        _UpperCAmelCase  :						Dict			     = [mem.copy() for i in range(4							)]
        _UpperCAmelCase  :						List[str]			     = VGroup(*a_							).arrange(a_  ,buff=0							)
        _UpperCAmelCase  :						Any			     = Text("""GPU"""  ,font_size=24							)
        _UpperCAmelCase  :						str			     = Group(a_  ,a_							).arrange(a_  ,buff=0.5  ,aligned_edge=a_							)
        gpu.move_to([-1, -1, 0]							)
        self.add(a_							)

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

        _UpperCAmelCase  :						Any			     = Text("""Model"""  ,font_size=24							)
        _UpperCAmelCase  :						List[str]			     = Group(a_  ,a_							).arrange(a_  ,buff=0.5  ,aligned_edge=a_							)
        model.move_to([3, -1.0, 0]							)
        self.add(a_							)

        _UpperCAmelCase  :						Tuple			     = []
        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)

               _UpperCAmelCase  :						Union[str, Any]			     = Rectangle(height=0.46 / 4  ,width=0.46 / 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.02  ,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_							)

        _UpperCAmelCase  :						Tuple			     = [mem.copy() for i in range(6							)]
        _UpperCAmelCase  :						Optional[Any]			     = VGroup(*a_							).arrange(a_  ,buff=0							)

        _UpperCAmelCase  :						Optional[int]			     = Text("""Loaded Checkpoint"""  ,font_size=24							)
        _UpperCAmelCase  :						Dict			     = Group(a_  ,a_							).arrange(a_  ,aligned_edge=a_  ,buff=0.4							)
        checkpoint.move_to([3, 0.5, 0]							)

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

        _UpperCAmelCase  :						str			     = MarkupText(
            f'''<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model'''  ,font_size=18  ,)

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

        self.add(a_  ,a_							)

        _UpperCAmelCase  :						List[str]			     = MarkupText(
            f'''<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'''  ,font_size=18  ,)

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

        _UpperCAmelCase  :						Optional[Any]			     = 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=24  ,)
        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							)							)

        _UpperCAmelCase  :						List[Any]			     = []
        _UpperCAmelCase  :						Optional[int]			     = []
        for i, rect in enumerate(a_							):
               _UpperCAmelCase  :						Tuple			     = fill.copy().set_fill(a_  ,opacity=0.7							)
               target.move_to(a_							)
               first_animations.append(GrowFromCenter(a_  ,run_time=1							)							)

               _UpperCAmelCase  :						List[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()








'''simple docstring'''






from numpy import exp, pi, sqrt




def     snake_case_					(     lowerCAmelCase_       ,   lowerCAmelCase_ = 0.0       ,   lowerCAmelCase_ = 1.0		)->		int:





       '''simple docstring'''


       return 1 / sqrt(2 * pi * sigma**2		) * exp(-((x - mu) ** 2) / (2 * sigma**2)		)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



