



'''simple docstring'''
from manim import *






class 							lowercase__     (							lowercase       ):





	def      UpperCamelCase_  (			self :    Union[str, Any]			):







							'''simple docstring'''
							_UpperCamelCase :		str			    =       Rectangle(height=0.5			,width=0.5			)
							_UpperCamelCase :		Optional[int]			    =       Rectangle(height=0.4_6			,width=0.4_6			).set_stroke(width=0			)

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

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

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

							_UpperCamelCase :		Optional[int]			    =       Text('Model'			,font_size=24			)
							_UpperCamelCase :		Optional[int]			    =       Group(lowerCamelCase__			,lowerCamelCase__			).arrange(lowerCamelCase__			,buff=0.5			,aligned_edge=lowerCamelCase__			)
							model.move_to([3, -1.0, 0]			)
							self.add(lowerCamelCase__			)

							_UpperCamelCase :		List[Any]			    =       []
							for i, rect in enumerate(lowerCamelCase__			):
													rect.set_stroke(lowerCamelCase__			)
													# target = fill.copy().set_fill(YELLOW, opacity=0.7)
													# target.move_to(rect)
													# self.add(target)

													_UpperCamelCase :		List[str]			    =       Rectangle(height=0.4_6 / 4			,width=0.4_6 / 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.0_2			,direction=lowerCamelCase__			)
																			cpu_target.set_x(cpu_target.get_x() + 0.1			)
													elif i == 3:
																			cpu_target.next_to(cpu_targs[0]			,direction=lowerCamelCase__			,buff=0.0			)
													else:
																			cpu_target.next_to(cpu_targs[i - 1]			,direction=lowerCamelCase__			,buff=0.0			)
													self.add(lowerCamelCase__			)
													cpu_targs.append(lowerCamelCase__			)

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

							_UpperCamelCase :		List[Any]			    =       Text('Loaded Checkpoint'			,font_size=24			)
							_UpperCamelCase :		Union[str, Any]			    =       Group(lowerCamelCase__			,lowerCamelCase__			).arrange(lowerCamelCase__			,aligned_edge=lowerCamelCase__			,buff=0.4			)
							checkpoint.move_to([3, 0.5, 0]			)

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

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

							self.add(lowerCamelCase__			,lowerCamelCase__			)

							_UpperCamelCase :		Dict			    =       MarkupText(
							    F'<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'			,font_size=18			,)

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

							_UpperCamelCase :		Any			    =       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(lowerCamelCase__			)			,Write(lowerCamelCase__			)			)

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

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

													_UpperCamelCase :		str			    =       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(lowerCamelCase__			,run_time=1.5			)			)

							self.play(*lowerCamelCase__			)
							self.play(*lowerCamelCase__			)
							self.wait()







'''simple docstring'''
from datetime import datetime

import requests






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase :		List[Any]			    =       'https://downloadgram.net/wp-json/wppress/video-downloader/video?url='
						_UpperCamelCase :		Optional[int]			    =       requests.get(base_url + url							).json()[0]['urls'][0]['src']
						return requests.get(UpperCAmelCase_							).content


if __name__ == "__main__":
					snake_case_			:     List[str]  	=  input('Enter Video/IGTV url: ').strip()
					snake_case_			:     str  	=  F"""{datetime.now():%Y-%m-%d_%H:%M:%S}.mp4"""
					with open(file_name, 'wb') as fp:
										fp.write(download_video(url))
					print(F"""Done. Video saved to disk as {file_name}.""")


