






"""simple docstring"""
def 				lowercase__		(					lowerCamelCase       ):
				return 10 - x * x





def 				lowercase__		(					lowerCamelCase,						lowerCamelCase       ):
				# Bolzano theory in order to find if there is a root between a and b
				if equation(lowerCamelCase       ) * equation(lowerCamelCase       ) >= 0:
								raise ValueError('Wrong space!'       )

				_SCREAMING_SNAKE_CASE   :		Any       		=    a
				while (b - a) >= 0.01:
								# Find middle point
								_SCREAMING_SNAKE_CASE   :		Any       		=    (a + b) / 2
								# Check if middle point is root
								if equation(lowerCamelCase       ) == 0.0:
												break
								# Decide the side to repeat the steps
								if equation(lowerCamelCase       ) * equation(lowerCamelCase       ) < 0:
												_SCREAMING_SNAKE_CASE   :		int       		=    c
								else:
												_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    c
				return c


if __name__ == "__main__":
			import doctest

			doctest.testmod()

			print(bisection(-2, 5))
			print(bisection(0, 6))









"""simple docstring"""
from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
			lowerCAmelCase__    						=			input('Enter image url: ').strip()
			print(F'Downloading image from {url} ...')
			lowerCAmelCase__    						=			BeautifulSoup(requests.get(url).content, 'html.parser')
			# The image URL is in the content field of the first meta tag with property og:image
			lowerCAmelCase__    						=			soup.find('meta', {'property': 'og:image'})['content']
			lowerCAmelCase__    						=			requests.get(image_url).content
			lowerCAmelCase__    						=			F'{datetime.now():%Y-%m-%d_%H:%M:%S}.jpg'
			with open(file_name, 'wb') as fp:
						fp.write(image_data)
			print(F'Done. Image saved to disk as {file_name}.')

