






'''simple docstring'''

from manim import *






class 							__magic_name__     (	__a				):







	"""simple docstring"""



	def        lowerCamelCase__		(							self       )						->  str:
							lowercase_      :   Any        =			Rectangle(height=0.5  ,      width=0.5       )
							lowercase_      :   Any        =			Rectangle(height=0.46  ,      width=0.46       ).set_stroke(width=0       )

							lowercase_      :   Union[str, Any]        =			[mem.copy() for i in range(6       )]
							lowercase_      :   Any        =			[mem.copy() for i in range(6       )]
							lowercase_      :   Optional[Any]        =			VGroup(*A__       ).arrange(A__  ,      buff=0       )
							lowercase_      :   Tuple        =			VGroup(*A__       ).arrange(A__  ,      buff=0       )
							lowercase_      :   Union[str, Any]        =			VGroup(A__  ,      A__       ).arrange(A__  ,      buff=0       )
							lowercase_      :   Dict        =			Text('CPU'  ,      font_size=24       )
							lowercase_      :   str        =			Group(A__  ,      A__       ).arrange(A__  ,      buff=0.5  ,      aligned_edge=A__       )
							cpu.move_to([-2.5, -0.5, 0]       )
							self.add(A__       )

							lowercase_      :   int        =			[mem.copy() for i in range(1       )]
							lowercase_      :   Dict        =			VGroup(*A__       ).arrange(A__  ,      buff=0       )
							lowercase_      :   str        =			Text('GPU'  ,      font_size=24       )
							lowercase_      :   Union[str, Any]        =			Group(A__  ,      A__       ).arrange(A__  ,      buff=0.5  ,      aligned_edge=A__       )
							gpu.align_to(A__  ,      A__       )
							gpu.set_x(gpu.get_x() - 1       )

							self.add(A__       )

							lowercase_      :   Optional[Any]        =			[mem.copy() for i in range(6       )]
							lowercase_      :   int        =			VGroup(*A__       ).arrange(A__  ,      buff=0       )

							lowercase_      :   Any        =			Text('Model'  ,      font_size=24       )
							lowercase_      :   Optional[int]        =			Group(A__  ,      A__       ).arrange(A__  ,      buff=0.5  ,      aligned_edge=A__       )
							model.move_to([3, -1.0, 0]       )

							self.play(
							    Create(A__  ,      run_time=1       )  ,      Create(A__  ,      run_time=1       )  ,      Create(A__  ,      run_time=1       )  ,      )

							lowercase_      :   List[str]        =			MarkupText(
							    f"First, an empty model skeleton is loaded\ninto <span fgcolor='{YELLOW}'>memory</span> without using much RAM."  ,      font_size=24  ,      )

							lowercase_      :   Optional[Any]        =			Square(side_length=2.2       )
							key.move_to([-5, 2, 0]       )

							lowercase_      :   List[Any]        =			MarkupText(
							    f"<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model"  ,      font_size=18  ,      )

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

							step_a.move_to([2, 2, 0]       )
							self.play(Write(A__  ,      run_time=2.5       )  ,      Write(A__       )  ,      Write(A__       )       )

							self.add(A__       )

							lowercase_      :   int        =			[]
							lowercase_      :   str        =			[]
							lowercase_      :   Union[str, Any]        =			[]
							for i, rect in enumerate(A__       ):
													lowercase_      :   Optional[Any]        =			Rectangle(height=0.46  ,      width=0.46       ).set_stroke(width=0.0       ).set_fill(A__  ,      opacity=0.7       )
													cpu_target.move_to(A__       )
													cpu_target.generate_target()
													lowercase_      :   Tuple        =			0.46 / 4
													lowercase_      :   Any        =			0.46 / 3

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

													first_animations.append(rect.animate(run_time=0.5       ).set_stroke(A__       )       )
													second_animations.append(MoveToTarget(A__  ,      run_time=1.5       )       )

							self.play(*A__       )
							self.play(*A__       )

							self.wait()








'''simple docstring'''

import argparse


A:      List[Any]  				=				"docs/source/_static/js/custom.js"






def 	_UpperCAmelCase    (  a		:	Optional[Any]							)			->			Optional[Any]:





						"""simple docstring"""
						with open(a						,			encoding='utf-8'						,			newline='\n'							) as f:
												lowercase_      :   List[Any]        =			f.readlines()
						lowercase_      :   Dict        =			0

						# First let's put the right version
						while not lines[index].startswith('const stableVersion ='							):
												index += 1
						lowercase_      :   Dict        =			f"const stableVersion = \"v{version}\"\n"

						# Then update the dictionary
						while not lines[index].startswith('const versionMapping = {'							):
												index += 1

						# We go until the end
						while not lines[index].startswith('}'							):
												index += 1
						# We add the new version at the end
						lines[index - 1] += f"    \"v{version}\": \"v{version}\",\n"

						with open(a						,			'w'						,			encoding='utf-8'						,			newline='\n'							) as f:
												f.writelines(a							)


if __name__ == "__main__":
						A:      str  				=				argparse.ArgumentParser()
						parser.add_argument("--version", help="Release version.")
						A:      List[str]  				=				parser.parse_args()
						update_custom_js(args.version)
