


'''simple docstring'''


lowerCamelCase__    	=     [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowerCamelCase__    	=     [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowerCamelCase__    	=     {
    0: 'Sunday',
    1: 'Monday',
    2: 'Tuesday',
    3: 'Wednesday',
    4: 'Thursday',
    5: 'Friday',
    6: 'Saturday',
}






def  __lowerCAmelCase (__lowerCAmelCase      , __lowerCAmelCase      , __lowerCAmelCase   ):
		assert len(str(__lowerCAmelCase   )   ) > 2, "year should be in YYYY format"
		assert 1 <= month <= 12, "month should be between 1 to 12"
		assert 1 <= day <= 31, "day should be between 1 to 31"

		# Doomsday algorithm:
		_UpperCAmelCase		:       List[Any]								=      year // 100
		_UpperCAmelCase		:       Dict								=      (5 * (century % 4) + 2) % 7
		_UpperCAmelCase		:       int								=      year % 100
		_UpperCAmelCase		:       Dict								=      centurian % 12
		_UpperCAmelCase		:       Union[str, Any]								=      (
		    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
		) % 7
		_UpperCAmelCase		:       int								=      (
		    DOOMSDAY_NOT_LEAP[month - 1]
		    if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
		    else DOOMSDAY_LEAP[month - 1]
		)
		_UpperCAmelCase		:       Optional[Any]								=      (dooms_day + day - day_anchor) % 7
		return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
						import doctest

						doctest.testmod()







'''simple docstring'''


from __future__ import annotations

import math

import numpy as np
from numpy.linalg import norm






def  __lowerCAmelCase (__lowerCAmelCase      , __lowerCAmelCase   ):
		return math.sqrt(sum(pow(a - b      , 2   ) for a, b in zip(__lowerCAmelCase      , __lowerCAmelCase   )   )   )






def  __lowerCAmelCase (__lowerCAmelCase      , __lowerCAmelCase   ):

		if dataset.ndim != value_array.ndim:
				_UpperCAmelCase		:       Optional[Any]								=      (
				    "Wrong input data's dimensions... "
				    F"""dataset : {dataset.ndim}, value_array : {value_array.ndim}"""
				)
				raise ValueError(__lowerCAmelCase   )

		try:
				if dataset.shape[1] != value_array.shape[1]:
						_UpperCAmelCase		:       Optional[int]								=      (
						    "Wrong input data's shape... "
						    F"""dataset : {dataset.shape[1]}, value_array : {value_array.shape[1]}"""
						)
						raise ValueError(__lowerCAmelCase   )
		except IndexError:
				if dataset.ndim != value_array.ndim:
						raise TypeError("Wrong shape"   )

		if dataset.dtype != value_array.dtype:
				_UpperCAmelCase		:       Union[str, Any]								=      (
				    "Input data have different datatype... "
				    F"""dataset : {dataset.dtype}, value_array : {value_array.dtype}"""
				)
				raise TypeError(__lowerCAmelCase   )

		_UpperCAmelCase		:       Optional[int]								=      []

		for value in value_array:
				_UpperCAmelCase		:       List[str]								=      euclidean(__lowerCAmelCase      , dataset[0]   )
				_UpperCAmelCase		:       Dict								=      dataset[0].tolist()

				for dataset_value in dataset[1:]:
						_UpperCAmelCase		:       int								=      euclidean(__lowerCAmelCase      , __lowerCAmelCase   )

						if dist > temp_dist:
								_UpperCAmelCase		:       Tuple								=      temp_dist
								_UpperCAmelCase		:       Dict								=      dataset_value.tolist()

				answer.append([vector, dist]   )

		return answer






def  __lowerCAmelCase (__lowerCAmelCase      , __lowerCAmelCase   ):
		return np.dot(__lowerCAmelCase      , __lowerCAmelCase   ) / (norm(__lowerCAmelCase   ) * norm(__lowerCAmelCase   ))


if __name__ == "__main__":
						import doctest

						doctest.testmod()



