




from manim import *




class 		__A      (			UpperCamelCase__			):

						def     A__						(		self   :List[str] ):
										'''simple docstring'''

										__magic_name__	:	Union[str, Any]								=Rectangle(height=0.5    , width=0.5 )
										__magic_name__	:	Dict								=Rectangle(height=0.46    , width=0.46 ).set_stroke(width=0 )

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

										__magic_name__	:	Optional[int]								=[mem.copy() for i in range(4 )]
										__magic_name__	:	str								=VGroup(*__snake_case ).arrange(__snake_case    , buff=0 )
										__magic_name__	:	int								=Text("""GPU"""    , font_size=24 )
										__magic_name__	:	Optional[Any]								=Group(__snake_case    , __snake_case ).arrange(__snake_case    , buff=0.5    , aligned_edge=__snake_case )
										gpu.move_to([-1, -1, 0] )
										self.add(__snake_case )

										__magic_name__	:	Optional[Any]								=[mem.copy() for i in range(6 )]
										__magic_name__	:	Dict								=VGroup(*__snake_case ).arrange(__snake_case    , buff=0 )

										__magic_name__	:	List[str]								=Text("""Model"""    , font_size=24 )
										__magic_name__	:	List[str]								=Group(__snake_case    , __snake_case ).arrange(__snake_case    , buff=0.5    , aligned_edge=__snake_case )
										model.move_to([3, -1.0, 0] )
										self.add(__snake_case )

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

														__magic_name__	:	str								=Rectangle(height=0.46 / 4    , width=0.46 / 3 ).set_stroke(width=0.0 ).set_fill(__snake_case    , opacity=0.7 )

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

										__magic_name__	:	List[Any]								=[mem.copy() for i in range(6 )]
										__magic_name__	:	Union[str, Any]								=VGroup(*__snake_case ).arrange(__snake_case    , buff=0 )

										__magic_name__	:	int								=Text("""Loaded Checkpoint"""    , font_size=24 )
										__magic_name__	:	int								=Group(__snake_case    , __snake_case ).arrange(__snake_case    , aligned_edge=__snake_case    , buff=0.4 )
										checkpoint.move_to([3, 0.5, 0] )

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

										__magic_name__	:	int								=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(__snake_case    , __snake_case )

										__magic_name__	:	Optional[Any]								=MarkupText(
										    f"<span fgcolor='{BLUE}'>●</span> Checkpoint"    , font_size=18    , )

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

										__magic_name__	:	Tuple								=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(__snake_case )    , Write(__snake_case ) )

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

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

														__magic_name__	:	Optional[int]								=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(__snake_case    , run_time=1.5 ) )

										self.play(*__snake_case )
										self.play(*__snake_case )
										self.wait()










from math import pow, sqrt




def 		lowerCAmelCase_   (	*lowerCamelCase   ):
				__magic_name__	:	Tuple								=len(lowerCamelCase   ) > 0 and all(value > 0.0 for value in values   )
				return result




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase   )
				    else ValueError("""Input Error: Molar mass values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(effusion_rate * sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(effusion_rate / sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(molar_mass / pow(effusion_rate_a / effusion_rate_a	,     2   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(pow(effusion_rate_a / effusion_rate_a	,     2   ) / molar_mass	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




