



from manim import *
class    lowercase__     (					SCREAMING_SNAKE_CASE   ):







       '''simple docstring'''


       def   lowercase__       (							self    :						Optional[Any]					)				->		Any:


             '''simple docstring'''




             UpperCAmelCase_    				=							Rectangle(height=0.5	,       width=0.5					)
             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(*_UpperCAmelCase					).arrange(_UpperCAmelCase	,       buff=0					)
             UpperCAmelCase_    				=							VGroup(*_UpperCAmelCase					).arrange(_UpperCAmelCase	,       buff=0					)
             UpperCAmelCase_    				=							VGroup(_UpperCAmelCase	,       _UpperCAmelCase					).arrange(_UpperCAmelCase	,       buff=0					)
             UpperCAmelCase_    				=							Text("CPU"	,       font_size=24					)
             UpperCAmelCase_    				=							Group(_UpperCAmelCase	,       _UpperCAmelCase					).arrange(_UpperCAmelCase	,       buff=0.5	,       aligned_edge=_UpperCAmelCase					)
             cpu.move_to([-2.5, -0.5, 0]					)
             self.add(_UpperCAmelCase					)

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

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

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

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

                   UpperCAmelCase_    				=							Rectangle(height=0.46 / 4	,       width=0.46 / 3					).set_stroke(width=0.0					).set_fill(_UpperCAmelCase	,       opacity=0.7					)

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

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

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

             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(_UpperCAmelCase	,       _UpperCAmelCase					)

             UpperCAmelCase_    				=							MarkupText(
                 F"""<span fgcolor='{BLUE}'>●</span> Checkpoint"""	,       font_size=18	,       )

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

             UpperCAmelCase_    				=							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(_UpperCAmelCase					)	,       Write(_UpperCAmelCase					)					)

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

             UpperCAmelCase_    				=							[]
             UpperCAmelCase_    				=							[]
             for i, rect in enumerate(_UpperCAmelCase					):
                   UpperCAmelCase_    				=							fill.copy().set_fill(_UpperCAmelCase	,       opacity=0.7					)
                   target.move_to(_UpperCAmelCase					)
                   first_animations.append(GrowFromCenter(_UpperCAmelCase	,       run_time=1					)					)

                   UpperCAmelCase_    				=							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(_UpperCAmelCase	,       run_time=1.5					)					)

             self.play(*_UpperCAmelCase					)
             self.play(*_UpperCAmelCase					)
             self.wait()









"""simple docstring"""





import string
def      a__			(   lowerCAmelCase__   ):
      for key in range(len(string.ascii_uppercase   )   ):
            UpperCAmelCase_    				=							""
            for symbol in message:
                  if symbol in string.ascii_uppercase:
                        UpperCAmelCase_    				=							string.ascii_uppercase.find(lowerCAmelCase__   )
                        UpperCAmelCase_    				=							num - key
                        if num < 0:
                              UpperCAmelCase_    				=							num + len(string.ascii_uppercase   )
                        UpperCAmelCase_    				=							translated + string.ascii_uppercase[num]
                  else:
                        UpperCAmelCase_    				=							translated + symbol
            print(f"""Decryption using Key #{key}: {translated}"""   )
def      a__			(   ):
      UpperCAmelCase_    				=							input("Encrypted message: "   )
      UpperCAmelCase_    				=							message.upper()
      decrypt(lowerCAmelCase__   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()




