





import copy
from typing import TYPE_CHECKING, Any, Mapping, Optional, OrderedDict

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


if TYPE_CHECKING:
							from ... import PreTrainedTokenizerBase, TensorType

_UpperCamelCase							=      logging.get_logger(__name__)
class 		SCREAMING_SNAKE_CASE_							(    _snake_case   ):
				"""simple docstring"""
				__snake_case   :       Any	 =		"""vision-encoder-decoder"""
				__snake_case   :       Union[str, Any]	 =		True




				def __init__(     self  :List[str]						,    **__lowercase  :Union[str, Any]			):
											super().__init__(**snake_case_			)
											if "encoder" not in kwargs or "decoder" not in kwargs:
																		raise ValueError(
																		    f'A configuraton of type {self.model_type} cannot be instantiated because '
																		    f'not both `encoder` and `decoder` sub-configurations are passed, but only {kwargs}'			)

											__lowerCamelCase      :      Optional[int]         =kwargs.pop('''encoder'''			)
											__lowerCamelCase      :      Dict         =encoder_config.pop('''model_type'''			)
											__lowerCamelCase      :      Optional[int]         =kwargs.pop('''decoder'''			)
											__lowerCamelCase      :      Optional[int]         =decoder_config.pop('''model_type'''			)

											__lowerCamelCase      :      Optional[Any]         =AutoConfig.for_model(snake_case_						,    **snake_case_			)
											__lowerCamelCase      :      Dict         =AutoConfig.for_model(snake_case_						,    **snake_case_			)
											__lowerCamelCase      :      Any         =True




				@classmethod
				def 					__lowercase  (     cls  :Optional[Any]						,    __lowercase  :List[str]						,    __lowercase  :Any						,    **__lowercase  :int			):
											logger.info('''Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config'''			)
											__lowerCamelCase      :      Union[str, Any]         =True
											__lowerCamelCase      :      Dict         =True

											return cls(encoder=encoder_config.to_dict()						,    decoder=decoder_config.to_dict()						,    **snake_case_			)




				def 					__lowercase  (     self  :str			):
											__lowerCamelCase      :      str         =copy.deepcopy(self.__dict__			)
											__lowerCamelCase      :      Tuple         =self.encoder.to_dict()
											__lowerCamelCase      :      List[str]         =self.decoder.to_dict()
											__lowerCamelCase      :      Optional[Any]         =self.__class__.model_type
											return output

class 		SCREAMING_SNAKE_CASE_							(    _snake_case   ):
				"""simple docstring"""
				__snake_case   :       Optional[Any]	 =		version.parse("""1.11"""   )




				@property
				def 					__lowercase  (     self  :str			):
											return OrderedDict(
											    [
											        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
											    ]			)




				@property
				def 					__lowercase  (     self  :Optional[int]			):
											return 1e-4




				@property
				def 					__lowercase  (     self  :Any			):
											return OrderedDict({'''last_hidden_state''': {0: '''batch''', 1: '''encoder_sequence'''}}			)

class 		SCREAMING_SNAKE_CASE_							(    _snake_case   ):
				"""simple docstring"""




				@property
				def 					__lowercase  (     self  :Optional[Any]			):
											__lowerCamelCase      :      Dict         =OrderedDict()
											__lowerCamelCase      :      List[str]         ={0: "batch", 1: "past_decoder_sequence + sequence"}
											__lowerCamelCase      :      Tuple         ={0: "batch", 1: "past_decoder_sequence + sequence"}
											__lowerCamelCase      :      Dict         ={0: "batch", 1: "encoder_sequence"}

											return common_inputs




				def 					__lowercase  (     self  :int						,    __lowercase  :List[str]						,    __lowercase  :List[str] = -1						,    __lowercase  :List[Any] = -1						,    __lowercase  :int = False						,    __lowercase  :Union[str, Any] = None						,    ):
											import torch

											__lowerCamelCase      :      Optional[Any]         =OrderedDict()

											__lowerCamelCase      :      Any         =super().generate_dummy_inputs(
											    snake_case_						,    batch_size=snake_case_						,    seq_length=snake_case_						,    is_pair=snake_case_						,    framework=snake_case_			)

											__lowerCamelCase      :      str         =dummy_input["input_ids"].shape
											__lowerCamelCase      :      List[Any]         =(batch, encoder_sequence, self._config.encoder_hidden_size)
											__lowerCamelCase      :      Dict         =dummy_input.pop('''input_ids'''			)
											__lowerCamelCase      :      List[Any]         =dummy_input.pop('''attention_mask'''			)
											__lowerCamelCase      :      Optional[Any]         =torch.zeros(snake_case_			)

											return common_inputs

class 		SCREAMING_SNAKE_CASE_							(    _snake_case   ):
				"""simple docstring"""




				@property
				def 					__lowercase  (     self  :Optional[int]			):
											pass




				def 					__lowercase  (     self  :Optional[Any]						,    __lowercase  :Union[str, Any]			):
											return VisionEncoderDecoderEncoderOnnxConfig(snake_case_			)




				def 					__lowercase  (     self  :List[Any]						,    __lowercase  :Dict						,    __lowercase  :Any						,    __lowercase  :int = "default"			):
											__lowerCamelCase      :      Any         =encoder_config.hidden_size
											return VisionEncoderDecoderDecoderOnnxConfig(snake_case_						,    snake_case_			)











"""simple docstring"""





import math
from datetime import datetime, timedelta



def 				lowerCAmelCase_			(      SCREAMING_SNAKE_CASE       :							int   ):


							'''simple docstring'''







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

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

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


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




