



'''simple docstring'''
from math import isclose, sqrt






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							):
						_UpperCamelCase :		List[Any]			    =       point_y / 4 / point_x
						_UpperCamelCase :		Tuple			    =       2 * normal_gradient / (1 + normal_gradient * normal_gradient)
						_UpperCamelCase :		List[Any]			    =       (1 - normal_gradient * normal_gradient) / (
						    1 + normal_gradient * normal_gradient
						)
						_UpperCamelCase :		Union[str, Any]			    =       (sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

						# to find the next point, solve the simultaeneous equations:
						# y^2 + 4x^2 = 100
						# y - b = m * (x - a)
						# ==> A x^2 + B x + C = 0
						_UpperCamelCase :		List[Any]			    =       outgoing_gradient**2 + 4
						_UpperCamelCase :		Optional[int]			    =       2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
						_UpperCamelCase :		int			    =       (point_y - outgoing_gradient * point_x) ** 2 - 1_0_0

						_UpperCamelCase :		Optional[int]			    =       (
						    -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term							)
						) / (2 * quadratic_term)
						_UpperCamelCase :		Tuple			    =       (
						    -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term							)
						) / (2 * quadratic_term)

						# two solutions, one of which is our input point
						_UpperCamelCase :		Any			    =       x_minus if isclose(lowerCamelCase__  ,  lowerCamelCase__							) else x_plus
						_UpperCamelCase :		Optional[int]			    =       point_y + outgoing_gradient * (next_x - point_x)

						return next_x, next_y, outgoing_gradient






def A__   (					UpperCAmelCase_ = 1.4  ,  UpperCAmelCase_ = -9.6							):
						_UpperCamelCase :		Optional[Any]			    =       0
						_UpperCamelCase :		List[Any]			    =       first_x_coord
						_UpperCamelCase :		Optional[Any]			    =       first_y_coord
						_UpperCamelCase :		Optional[int]			    =       (1_0.1 - point_y) / (0.0 - point_x)

						while not (-0.01 <= point_x <= 0.01 and point_y > 0):
												_UpperCamelCase    ,      _UpperCamelCase    ,      _UpperCamelCase :		Union[str, Any]			    =       next_point(lowerCamelCase__  ,  lowerCamelCase__  ,  lowerCamelCase__							)
												num_reflections += 1

						return num_reflections


if __name__ == "__main__":
					print(F"""{solution() = }""")







'''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}.""")


