


"""simple docstring"""



import argparse
import datetime







def 						__lowerCAmelCase		(		lowercase						:						List[Any]				)			->		str:


				"""simple docstring"""





				snake_case					:   int         =					{
				    '0': 'Sunday',
				    '1': 'Monday',
				    '2': 'Tuesday',
				    '3': 'Wednesday',
				    '4': 'Thursday',
				    '5': 'Friday',
				    '6': 'Saturday',
				}

				snake_case					:   str         =					{0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

				# Validate
				if not 0 < len(lowerCamelCase_				) < 11:
								raise ValueError("Must be 10 characters long"				)

				# Get month
				snake_case					:   int         =					int(date_input[0] + date_input[1]				)
				# Validate
				if not 0 < m < 13:
								raise ValueError("Month must be between 1 - 12"				)

				snake_case					:   str         =					date_input[2]
				# Validate
				if sep_a not in ["-", "/"]:
								raise ValueError("Date separator must be \'-\' or \'/\'"				)

				# Get day
				snake_case					:   int         =					int(date_input[3] + date_input[4]				)
				# Validate
				if not 0 < d < 32:
								raise ValueError("Date must be between 1 - 31"				)

				# Get second separator
				snake_case					:   str         =					date_input[5]
				# Validate
				if sep_a not in ["-", "/"]:
								raise ValueError("Date separator must be \'-\' or \'/\'"				)

				# Get year
				snake_case					:   int         =					int(date_input[6] + date_input[7] + date_input[8] + date_input[9]				)
				# Arbitrary year range
				if not 45 < y < 8500:
								raise ValueError(
								    "Year out of range. There has to be some sort of limit...right?"				)

				# Get datetime obj for validation
				snake_case					:   int         =					datetime.date(int(lowerCamelCase_				)		,							int(lowerCamelCase_				)		,							int(lowerCamelCase_				)				)

				# Start math
				if m <= 2:
								snake_case					:   int         =					y - 1
								snake_case					:   List[Any]         =					m + 12
				# maths var
				snake_case					:   int         =					int(str(lowerCamelCase_				)[:2]				)
				snake_case					:   int         =					int(str(lowerCamelCase_				)[2:]				)
				snake_case					:   int         =					int(2.6 * m - 5.39				)
				snake_case					:   int         =					int(c / 4				)
				snake_case					:   int         =					int(k / 4				)
				snake_case					:   int         =					int(d + k				)
				snake_case					:   int         =					int(t + u + v + x				)
				snake_case					:   int         =					int(z - (2 * c)				)
				snake_case					:   int         =					round(w % 7				)
				# End math

				# Validate math
				if f != convert_datetime_days[dt_ck.weekday()]:
								raise AssertionError("The date was evaluated incorrectly. Contact developer."				)

				# Response
				snake_case					:   str         =					F'Your date {date_input}, is a {days[str(lowerCamelCase_				)]}!'
				return response


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		__snake_case         =					argparse.ArgumentParser(
		    description=(
		        """Find out what day of the week nearly any date is or was. Enter """
		        """date as a string in the mm-dd-yyyy or mm/dd/yyyy format"""
		    )
		)
		parser.add_argument(
		    """date_input""", type=str, help="""Date as a string (mm-dd-yyyy or mm/dd/yyyy)"""
		)
		__snake_case         =					parser.parse_args()
		zeller(args.date_input)









"""simple docstring"""



import numpy as np







class _lowerCAmelCase       :







   def __init__(			self		)			->	int:

       '''simple docstring'''




       snake_case					:   Optional[int]         =					(0, 0)
       snake_case					:   str         =					None
       snake_case					:   int         =					0
       snake_case					:   Optional[Any]         =					0
       snake_case					:   Tuple         =					0







   def __eq__(			self		,			UpperCamelCase__		)			->	Dict:

       '''simple docstring'''




       return self.position == cell.position







   def 				lowerCamelCase	(			self		)			->	str:

       '''simple docstring'''




       print(self.position		)







class _lowerCAmelCase       :







   def __init__(			self		,			UpperCamelCase__=(5, 5)		)			->	List[Any]:

       '''simple docstring'''




       snake_case					:   Optional[Any]         =					np.zeros(UpperCamelCase__		)
       snake_case					:   str         =					world_size[0]
       snake_case					:   str         =					world_size[1]







   def 				lowerCamelCase	(			self		)			->	int:

       '''simple docstring'''




       print(self.w		)







   def 				lowerCamelCase	(			self		,			UpperCamelCase__		)			->	List[str]:

       '''simple docstring'''




       snake_case					:   Optional[int]         =					[
           (-1, -1),
           (-1, 0),
           (-1, 1),
           (0, -1),
           (0, 1),
           (1, -1),
           (1, 0),
           (1, 1),
       ]
       snake_case					:   Tuple         =					cell.position[0]
       snake_case					:   str         =					cell.position[1]
       snake_case					:   List[Any]         =					[]
       for n in neughbour_cord:
           snake_case					:   Any         =					current_x + n[0]
           snake_case					:   List[str]         =					current_y + n[1]
           if 0 <= x < self.world_x_limit and 0 <= y < self.world_y_limit:
               snake_case					:   Tuple         =					Cell()
               snake_case					:   int         =					(x, y)
               snake_case					:   List[Any]         =					cell
               neighbours.append(UpperCamelCase__		)
       return neighbours







def 						__lowerCAmelCase		(		lowercase						:						Union[str, Any]		,							lowercase						:						Union[str, Any]		,							lowercase						:						Union[str, Any]				)			->		Any:


    """simple docstring"""





    snake_case					:   Tuple         =					[]
    snake_case					:   List[Any]         =					[]
    _open.append(lowercase				)

    while _open:
        snake_case					:   Union[str, Any]         =					np.argmin([n.f for n in _open]				)
        snake_case					:   Tuple         =					_open[min_f]
        _closed.append(_open.pop(lowercase				)				)
        if current == goal:
            break
        for n in world.get_neigbours(lowercase				):
            for c in _closed:
                if c == n:
                    continue
            snake_case					:   int         =					current.g + 1
            snake_case      ,snake_case					:   Any         =					n.position
            snake_case      ,snake_case					:   Any         =					goal.position
            snake_case					:   int         =					(ya - ya) ** 2 + (xa - xa) ** 2
            snake_case					:   List[Any]         =					n.h + n.g

            for c in _open:
                if c == n and c.f < n.f:
                    continue
            _open.append(lowercase				)
    snake_case					:   str         =					[]
    while current.parent is not None:
        path.append(current.position				)
        snake_case					:   List[str]         =					current.parent
    path.append(current.position				)
    return path[::-1]


if __name__ == "__main__":
  __snake_case         =					Gridworld()
  # Start position and goal
  __snake_case         =					Cell()
  __snake_case         =					(0, 0)
  __snake_case         =					Cell()
  __snake_case         =					(4, 4)
  print(F'''path from {start.position} to {goal.position}''')
  __snake_case         =					astar(world, start, goal)
  #   Just for visual reasons.
  for i in s:
    __snake_case         =					1
  print(world.w)





