



"""simple docstring"""





from manim import *
class 				lowercase__       (   __snake_case				):







     '''simple docstring'''


     def 					lowercase__    (							self      :  Union[str, Any]   )			->						List[Any]:


           '''simple docstring'''




           UpperCAmelCase_      			=							Rectangle(height=0.5		,    width=0.5   )
           UpperCAmelCase_      			=							Rectangle(height=0.25		,    width=0.25   )
           UpperCAmelCase_      			=							Rectangle(height=0.46		,    width=0.46   ).set_stroke(width=0   )

           UpperCAmelCase_      			=							[mem.copy() for i in range(6   )]
           UpperCAmelCase_      			=							[mem.copy() for i in range(6   )]
           UpperCAmelCase_      			=							VGroup(*a_   ).arrange(a_		,    buff=0   )
           UpperCAmelCase_      			=							VGroup(*a_   ).arrange(a_		,    buff=0   )
           UpperCAmelCase_      			=							VGroup(a_		,    a_   ).arrange(a_		,    buff=0   )
           UpperCAmelCase_      			=							Text("CPU"		,    font_size=24   )
           UpperCAmelCase_      			=							Group(a_		,    a_   ).arrange(a_		,    buff=0.5		,    aligned_edge=a_   )
           cpu.move_to([-2.5, -0.5, 0]   )
           self.add(a_   )

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

           UpperCAmelCase_      			=							[mem.copy() for i in range(6   )]
           UpperCAmelCase_      			=							VGroup(*a_   ).arrange(a_		,    buff=0   )

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

           UpperCAmelCase_      			=							[]
           UpperCAmelCase_      			=							[]
           UpperCAmelCase_      			=							[]

           for i, rect in enumerate(a_   ):
                 rect.set_stroke(a_   )

                 UpperCAmelCase_      			=							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(model_cpu_arr[0]		,    direction=a_		,    buff=0.0   )
                 else:
                       cpu_target.next_to(model_cpu_arr[i - 1]		,    direction=a_		,    buff=0.0   )
                 self.add(a_   )
                 model_cpu_arr.append(a_   )

           self.add(*a_		,    *a_		,    *a_   )

           UpperCAmelCase_      			=							[mem.copy() for i in range(6   )]
           UpperCAmelCase_      			=							VGroup(*a_   ).arrange(a_		,    buff=0   )

           UpperCAmelCase_      			=							Text("Loaded Checkpoint"		,    font_size=24   )
           UpperCAmelCase_      			=							Group(a_		,    a_   ).arrange(a_		,    buff=0.5		,    aligned_edge=a_   )
           checkpoint.move_to([3, 0.5, 0]   )

           self.add(a_   )

           UpperCAmelCase_      			=							[]
           UpperCAmelCase_      			=							[]

           for i, rect in enumerate(a_   ):
                 UpperCAmelCase_      			=							fill.copy().set_fill(a_		,    opacity=0.7   )
                 target.move_to(a_   )
                 ckpt_arr.append(a_   )

                 UpperCAmelCase_      			=							target.copy()
                 if i < 5:
                       cpu_target.move_to(cpu_left_col_base[i + 1]   )
                 else:
                       cpu_target.move_to(cpu_right_col_base[i - 5]   )
                 ckpt_cpu_arr.append(a_   )
           self.add(*a_		,    *a_   )

           UpperCAmelCase_      			=							Square(side_length=2.2   )
           key.move_to([-5, 2, 0]   )

           UpperCAmelCase_      			=							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_      			=							MarkupText(
               F"""<span fgcolor='{BLUE}'>●</span> Checkpoint"""		,    font_size=18		,    )

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

           UpperCAmelCase_      			=							MarkupText(
               F"""Based on the passed in configuration, weights are stored in\na variety of np.memmaps on disk or to a particular device."""		,    font_size=24		,    )
           step_a.move_to([2, 2, 0]   )

           UpperCAmelCase_      			=							[meta_mem.copy() for i in range(6   )]
           UpperCAmelCase_      			=							[meta_mem.copy() for i in range(6   )]
           UpperCAmelCase_      			=							VGroup(*a_   ).arrange(a_		,    buff=0   )
           UpperCAmelCase_      			=							VGroup(*a_   ).arrange(a_		,    buff=0   )
           UpperCAmelCase_      			=							VGroup(a_		,    a_   ).arrange(a_		,    buff=0   )
           UpperCAmelCase_      			=							Text("Disk"		,    font_size=24   )
           UpperCAmelCase_      			=							Group(a_		,    a_   ).arrange(a_		,    buff=0.5		,    aligned_edge=a_   )
           disk.move_to([-4.0, -1.25, 0]   )
           self.play(Write(a_		,    run_time=3   )		,    Write(a_		,    run_time=1   )		,    Create(a_		,    run_time=1   )   )

           UpperCAmelCase_      			=							[]
           for i, rect in enumerate(a_   ):
                 UpperCAmelCase_      			=							rect.copy()
                 target.generate_target()
                 target.target.move_to(disk_left_col_base[i]   ).scale(0.5   )
                 animations.append(MoveToTarget(a_		,    run_time=1.5   )   )
           self.play(*a_   )

           self.play(FadeOut(a_   )   )

           UpperCAmelCase_      			=							MarkupText(F"""Then, the checkpoint is removed from memory\nthrough garbage collection."""		,    font_size=24   )
           step_a.move_to([2, 2, 0]   )

           self.play(Write(a_		,    run_time=3   )   )

           self.play(
               FadeOut(a_		,    a_		,    *a_		,    *a_   )		,    )

           self.wait()









"""simple docstring"""





from maths.prime_check import is_prime
def        a__     (				lowerCAmelCase__				):
      if not isinstance(lowerCAmelCase__     ,      lowerCAmelCase__				):
            UpperCAmelCase_      			=							f"""Input value of [number={number}] must be an integer"""
            raise TypeError(lowerCAmelCase__				)
      if is_prime(lowerCAmelCase__				) and is_prime(number + 2				):
            return number + 2
      else:
            return -1


if __name__ == "__main__":
  import doctest

  doctest.testmod()




