





from manim import *

class 							__SCREAMING_SNAKE_CASE       (  _a							):






							def 					_lowerCamelCase		(    self	):
														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'''
def 	_A  (       A							)  ->				list:
	lowercase						:		str   					=		int(A							)
	if n_element < 1:
		lowercase						:		List[Any]   					=		ValueError("a should be a positive number"							)
		raise my_error

	lowercase						:		List[Any]   					=		[1]
	lowercase					,		lowercase					,		lowercase						:		Tuple   					=		(0, 0, 0)
	lowercase						:		Dict   					=		1
	while index < n_element:
		while hamming_list[i] * 2 <= hamming_list[-1]:
			i += 1
		while hamming_list[j] * 3 <= hamming_list[-1]:
			j += 1
		while hamming_list[k] * 5 <= hamming_list[-1]:
			k += 1
		hamming_list.append(
		    min(hamming_list[i] * 2							,hamming_list[j] * 3							,hamming_list[k] * 5							)							)
		index += 1
	return hamming_list


if __name__ == "__main__":
					lowerCAmelCase   : Union[str, Any]             =				input("""Enter the last number (nth term) of the Hamming Number Series: """)
					print("""Formula of Hamming Number Series => 2^i * 3^j * 5^k""")
					lowerCAmelCase   : Tuple             =				hamming(int(n))
					print("""-----------------------------------------------------""")
					print(F'''The list with nth numbers is: {hamming_numbers}''')
					print("""-----------------------------------------------------""")


