"""simple docstring"""





import numpy as np
from matplotlib import pyplot as plt
from sklearn import datasets


def    lowercase_   (   _lowerCamelCase:	Any      ) ->      Optional[Any]:



							'''simple docstring'''

							return 1 / (1 + np.exp(-z      ))


def    lowercase_   (   _lowerCamelCase:	Union[str, Any]						,   _lowerCamelCase:	Any      ) ->      Dict:



							'''simple docstring'''

							return (-y * np.log(_lowerCamelCase      ) - (1 - y) * np.log(1 - h      )).mean()


def    lowercase_   (   _lowerCamelCase:	str						,   _lowerCamelCase:	Optional[int]						,   _lowerCamelCase:	str      ) ->      str:



							'''simple docstring'''

							__lowerCamelCase					:		Tuple		   =     np.dot(_lowerCamelCase						,   _lowerCamelCase      )
							return np.sum(y * scores - np.log(1 + np.exp(_lowerCamelCase      )      )      )


def    lowercase_   (   _lowerCamelCase:	Any						,   _lowerCamelCase:	Optional[int]						,   _lowerCamelCase:	Optional[int]						,   _lowerCamelCase:	Optional[Any]=70000      ) ->      str:



							'''simple docstring'''

							__lowerCamelCase					:		int		   =     np.zeros(x.shape[1]      )

							for iterations in range(_lowerCamelCase      ):
														__lowerCamelCase					:		List[str]		   =     np.dot(_lowerCamelCase						,   _lowerCamelCase      )
														__lowerCamelCase					:		Optional[Any]		   =     sigmoid_function(_lowerCamelCase      )
														__lowerCamelCase					:		Optional[int]		   =     np.dot(x.T						,   h - y      ) / y.size
														__lowerCamelCase					:		Union[str, Any]		   =     theta - alpha * gradient  # updating the weights
														__lowerCamelCase					:		List[str]		   =     np.dot(_lowerCamelCase						,   _lowerCamelCase      )
														__lowerCamelCase					:		List[Any]		   =     sigmoid_function(_lowerCamelCase      )
														__lowerCamelCase					:		int		   =     cost_function(_lowerCamelCase						,   _lowerCamelCase      )
														if iterations % 100 == 0:
																					print(F"""loss: {j} \t"""      )  # printing the loss after every 100 iterations
							return theta


# In[68]:

if __name__ == "__main__":
				__A  =				datasets.load_iris()
				__A  =				iris.data[:, :2]
				__A  =				(iris.target != 0) * 1

				__A  =				0.1
				__A  =				logistic_reg(alpha, x, y, max_iterations=70000)
				print('''theta: ''', theta)  # printing the theta i.e our weights vector


				def    lowercase_   (   _lowerCamelCase:	List[str]      ) ->      str:



											'''simple docstring'''

											return sigmoid_function(
											    np.dot(_lowerCamelCase						,   _lowerCamelCase      )      )  # predicting the value of probability from the logistic regression algorithm

				plt.figure(figsize=(10, 6))
				plt.scatter(x[y == 0][:, 0], x[y == 0][:, 1], color='''b''', label='''0''')
				plt.scatter(x[y == 1][:, 0], x[y == 1][:, 1], color='''r''', label='''1''')
				((__A),		(__A))  =				(x[:, 0].min(), x[:, 0].max())
				((__A),		(__A))  =				(x[:, 1].min(), x[:, 1].max())
				((__A),		(__A))  =				np.meshgrid(np.linspace(xa_min, xa_max), np.linspace(xa_min, xa_max))
				__A  =				np.c_[xxa.ravel(), xxa.ravel()]
				__A  =				predict_prob(grid).reshape(xxa.shape)
				plt.contour(xxa, xxa, probs, [0.5], linewidths=1, colors='''black''')

				plt.legend()







				plt.show()
"""simple docstring"""





import math
from datetime import datetime, timedelta


def    lowercase_   (   _lowerCamelCase:	int      ) ->      datetime:



							'''simple docstring'''

							__lowerCamelCase					:		List[Any]		   =     year % 19
							__lowerCamelCase					:		List[str]		   =     year % 4
							__lowerCamelCase					:		Dict		   =     year % 7
							__lowerCamelCase					:		Optional[Any]		   =     math.floor(year / 100      )
							__lowerCamelCase					:		Tuple		   =     math.floor((13 + 8 * leap_day_inhibits) / 25      )
							__lowerCamelCase					:		List[str]		   =     leap_day_inhibits / 4
							__lowerCamelCase					:		Optional[Any]		   =     (
							    15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
							) % 30
							__lowerCamelCase					:		Union[str, Any]		   =     (4 + leap_day_inhibits - leap_day_reinstall_number) % 7

							# days to be added to March 21
							__lowerCamelCase					:		Union[str, Any]		   =     (19 * metonic_cycle + secular_moon_shift) % 30

							# PHM -> Paschal Full Moon
							__lowerCamelCase					:		List[Any]		   =     (
							    2 * julian_leap_year
							    + 4 * non_leap_year
							    + 6 * days_to_add
							    + century_starting_point
							) % 7

							if days_to_add == 29 and days_from_phm_to_sunday == 6:
														return datetime(_lowerCamelCase						,   4						,   19      )
							elif days_to_add == 28 and days_from_phm_to_sunday == 6:
														return datetime(_lowerCamelCase						,   4						,   18      )
							else:
														return datetime(_lowerCamelCase						,   3						,   22      ) + timedelta(
														    days=int(days_to_add + days_from_phm_to_sunday      )      )


if __name__ == "__main__":
				for year in (1994, 2000, 2010, 2021, 2023):
								__A  =				'''will be''' if year > datetime.now().year else '''was'''
								print(F"""Easter in {year} {tense} {gauss_easter(year)}""")