


import math
from datetime import datetime, timedelta


def     lowercase	(    a ):



		'''simple docstring'''




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

		# days to be added to March 21
		SCREAMING_SNAKE_CASE_				:List[str]				     =						(19 * metonic_cycle + secular_moon_shift) % 30

		# PHM -> Paschal Full Moon
		SCREAMING_SNAKE_CASE_				:Optional[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(a     , 4     , 19 )
		elif days_to_add == 28 and days_from_phm_to_sunday == 6:
				return datetime(a     , 4     , 18 )
		else:
				return datetime(a     , 3     , 22 ) + timedelta(
				    days=int(days_to_add + days_from_phm_to_sunday ) )


if __name__ == "__main__":
		for year in (1_994, 2_000, 2_010, 2_021, 2_023):
				SCREAMING_SNAKE_CASE__     					=			"will be" if year > datetime.now().year else "was"
				print(F'''Easter in {year} {tense} {gauss_easter(year)}''')










import unittest

from transformers import is_torch_available, is_vision_available
from transformers.testing_utils import require_torch, require_vision, slow, torch_device


if is_torch_available():
		import torch

		from transformers import AutoModelForImageClassification

if is_vision_available():
		from transformers import AutoImageProcessor



@require_torch
@require_vision
class 						_UpperCAmelCase      (     unittest.TestCase							):






		@slow
		def _snake_case		(						self				:     List[str]):
				SCREAMING_SNAKE_CASE_				:Tuple				     =						AutoImageProcessor.from_pretrained("microsoft/dit-base-finetuned-rvlcdip")
				SCREAMING_SNAKE_CASE_				:int				     =						AutoModelForImageClassification.from_pretrained("microsoft/dit-base-finetuned-rvlcdip")
				model.to(UpperCAmelCase)

				from datasets import load_dataset

				SCREAMING_SNAKE_CASE_				:Optional[Any]				     =						load_dataset("nielsr/rvlcdip-demo")

				SCREAMING_SNAKE_CASE_				:Dict				     =						dataset["train"][0]["image"].convert("RGB")

				SCREAMING_SNAKE_CASE_				:Optional[Any]				     =						image_processor(UpperCAmelCase   ,  return_tensors="pt").to(UpperCAmelCase)

				# forward pass
				with torch.no_grad():
						SCREAMING_SNAKE_CASE_				:Optional[int]				     =						model(**UpperCAmelCase)
						SCREAMING_SNAKE_CASE_				:List[str]				     =						outputs.logits

				SCREAMING_SNAKE_CASE_				:int				     =						torch.Size((1, 16))
				self.assertEqual(logits.shape   ,  UpperCAmelCase)

				SCREAMING_SNAKE_CASE_				:Optional[Any]				     =						torch.tensor(
				    [-0.4158, -0.4092, -0.4347]   ,  device=UpperCAmelCase   ,  dtype=torch.float   ,  )
				self.assertTrue(torch.allclose(logits[0, :3]   ,  UpperCAmelCase   ,  atol=1E-4))






