




"""simple docstring"""






from manim import *






class lowerCAmelCase__	(     lowercase						):






			'''simple docstring'''



			def 					A_    (  self  ):
							_lowerCamelCase     :			List[str]    =    Rectangle(height=0.5  ,      width=0.5  )
							_lowerCamelCase     :			Union[str, Any]    =    Rectangle(height=0.46  ,      width=0.46  ).set_stroke(width=0  )

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

							_lowerCamelCase     :			Dict    =    [mem.copy() for i in range(4  )]
							_lowerCamelCase     :			Tuple    =    VGroup(*lowercase  ).arrange(lowercase  ,      buff=0  )
							_lowerCamelCase     :			Union[str, Any]    =    Text('GPU'  ,      font_size=24  )
							_lowerCamelCase     :			List[Any]    =    Group(lowercase  ,      lowercase  ).arrange(lowercase  ,      buff=0.5  ,      aligned_edge=lowercase  )
							gpu.move_to([-1, -1, 0]  )
							self.add(lowercase  )

							_lowerCamelCase     :			List[Any]    =    [mem.copy() for i in range(6  )]
							_lowerCamelCase     :			Any    =    VGroup(*lowercase  ).arrange(lowercase  ,      buff=0  )

							_lowerCamelCase     :			Union[str, Any]    =    Text('Model'  ,      font_size=24  )
							_lowerCamelCase     :			Tuple    =    Group(lowercase  ,      lowercase  ).arrange(lowercase  ,      buff=0.5  ,      aligned_edge=lowercase  )
							model.move_to([3, -1.0, 0]  )
							self.add(lowercase  )

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

											_lowerCamelCase     :			Union[str, Any]    =    Rectangle(height=0.46 / 4  ,      width=0.46 / 3  ).set_stroke(width=0.0  ).set_fill(lowercase  ,      opacity=0.7  )

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

							_lowerCamelCase     :			List[str]    =    [mem.copy() for i in range(6  )]
							_lowerCamelCase     :			Optional[Any]    =    VGroup(*lowercase  ).arrange(lowercase  ,      buff=0  )

							_lowerCamelCase     :			Any    =    Text('Loaded Checkpoint'  ,      font_size=24  )
							_lowerCamelCase     :			Any    =    Group(lowercase  ,      lowercase  ).arrange(lowercase  ,      aligned_edge=lowercase  ,      buff=0.4  )
							checkpoint.move_to([3, 0.5, 0]  )

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

							_lowerCamelCase     :			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]  )

							self.add(lowercase  ,      lowercase  )

							_lowerCamelCase     :			Optional[Any]    =    MarkupText(
							    F'''<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'''  ,      font_size=18  ,      )

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

							_lowerCamelCase     :			Optional[int]    =    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(lowercase  )  ,      Write(lowercase  )  )

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

							_lowerCamelCase     :			List[str]    =    []
							_lowerCamelCase     :			Any    =    []
							for i, rect in enumerate(lowercase  ):
											_lowerCamelCase     :			str    =    fill.copy().set_fill(lowercase  ,      opacity=0.7  )
											target.move_to(lowercase  )
											first_animations.append(GrowFromCenter(lowercase  ,      run_time=1  )  )

											_lowerCamelCase     :			Union[str, Any]    =    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(lowercase  ,      run_time=1.5  )  )

							self.play(*lowercase  )
							self.play(*lowercase  )
							self.wait()





"""simple docstring"""






import socket







def      _snake_case			(				):
				_lowerCamelCase     :			List[Any]    =    socket.socket(socket.AF_INET							,    socket.SOCK_STREAM		)
				_lowerCamelCase     :			Union[str, Any]    =    socket.gethostname()
				_lowerCamelCase     :			List[Any]    =    12312

				sock.connect((host, port)		)
				sock.send(B'Hello server!'		)

				with open('Received_file'							,    'wb'		) as out_file:
								print('File opened'		)
								print('Receiving data...'		)
								while True:
												_lowerCamelCase     :			int    =    sock.recv(1024		)
												if not data:
																break
												out_file.write(lowercase__		)

				print('Successfully received the file'		)
				sock.close()
				print('Connection closed'		)


if __name__ == "__main__":
			main()