





from manim import *

class SCREAMING_SNAKE_CASE_ (					lowercase_   ):





					"""simple docstring"""


					def 					__magic_name__ ( self	):
										lowerCamelCase__       =       Rectangle(height=0.5	,  width=0.5	)
										lowerCamelCase__       =       Rectangle(height=0.25	,  width=0.25	)
										lowerCamelCase__       =       Rectangle(height=0.46	,  width=0.46	).set_stroke(width=0	)

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

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

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

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

										lowerCamelCase__       =       []
										lowerCamelCase__       =       []
										lowerCamelCase__       =       []

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

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

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

										self.add(*_lowerCAmelCase	,  *_lowerCAmelCase	,  *_lowerCAmelCase	)

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

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

										self.add(_lowerCAmelCase	)

										lowerCamelCase__       =       []
										lowerCamelCase__       =       []

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

															lowerCamelCase__       =       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(_lowerCAmelCase	)
										self.add(*_lowerCAmelCase	,  *_lowerCAmelCase	)

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

										lowerCamelCase__       =       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(_lowerCAmelCase	,  _lowerCAmelCase	)

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

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

										lowerCamelCase__       =       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]	)

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

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

										self.play(FadeOut(_lowerCAmelCase	)	)

										lowerCamelCase__       =       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(_lowerCAmelCase	,  run_time=3	)	)

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

										self.wait()








A_												=     {str(digit): digit**5 for digit in range(1_0)}





def    __UpperCamelCase      (    a) ->int:
					return sum(DIGITS_FIFTH_POWER[digit] for digit in str(a))





def    __UpperCamelCase      (    ) ->int:
					return sum(
					    number
					    for number in range(1000,     1000000)
					    if number == digits_fifth_powers_sum(a))


if __name__ == "__main__":
						print(solution())

