



'''simple docstring'''






import copy
from collections import OrderedDict
from typing import Dict, Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ..auto import CONFIG_MAPPING


UpperCamelCase__:   str								=			logging.get_logger(__name__)

UpperCamelCase__:   List[Any]								=			{
    "facebook/detr-resnet-50": "https://huggingface.co/facebook/detr-resnet-50/resolve/main/config.json",
    # See all DETR models at https://huggingface.co/models?filter=detr
}

class 				SCREAMING_SNAKE_CASE(							A__			):







	"""simple docstring"""






	lowerCamelCase__			 =       """detr"""
	lowerCamelCase__			 =       ["""past_key_values"""]
	lowerCamelCase__			 =       {
	    """hidden_size""": """d_model""",
	    """num_attention_heads""": """encoder_attention_heads""",
	}







	def __init__(						self			:     Tuple		,			__snake_case			:     Any=True		,			__snake_case			:     int=None		,			__snake_case			:     Dict=3		,			__snake_case			:     Optional[Any]=100		,			__snake_case			:     str=6		,			__snake_case			:     Tuple=2048		,			__snake_case			:     int=8		,			__snake_case			:     List[Any]=6		,			__snake_case			:     Optional[int]=2048		,			__snake_case			:     Tuple=8		,			__snake_case			:     Tuple=0.0		,			__snake_case			:     Union[str, Any]=0.0		,			__snake_case			:     str=True		,			__snake_case			:     Tuple="relu"		,			__snake_case			:     Optional[Any]=256		,			__snake_case			:     Optional[Any]=0.1		,			__snake_case			:     Dict=0.0		,			__snake_case			:     Any=0.0		,			__snake_case			:     Union[str, Any]=0.02		,			__snake_case			:     Tuple=1.0		,			__snake_case			:     Optional[int]=False		,			__snake_case			:     Union[str, Any]="sine"		,			__snake_case			:     Optional[Any]="resnet50"		,			__snake_case			:     str=True		,			__snake_case			:     List[Any]=False		,			__snake_case			:     Tuple=1		,			__snake_case			:     Union[str, Any]=5		,			__snake_case			:     Optional[int]=2		,			__snake_case			:     int=1		,			__snake_case			:     Optional[int]=1		,			__snake_case			:     Union[str, Any]=5		,			__snake_case			:     Any=2		,			__snake_case			:     Optional[int]=0.1		,			**__snake_case			:     Any		,			)			->		Any:
								if backbone_config is not None and use_timm_backbone:
															raise ValueError('''You can\'t specify both `backbone_config` and `use_timm_backbone`.'''		)

								if not use_timm_backbone:
															if backbone_config is None:
																						logger.info('''`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'''		)
																						UpperCAmelCase :       Optional[Any] 							=		CONFIG_MAPPING['''resnet'''](out_features=['''stage4''']		)
															elif isinstance(__snake_case		,			__snake_case		):
																						UpperCAmelCase :       Union[str, Any] 							=		backbone_config.get('''model_type'''		)
																						UpperCAmelCase :       List[Any] 							=		CONFIG_MAPPING[backbone_model_type]
																						UpperCAmelCase :       int 							=		config_class.from_dict(__snake_case		)
															# set timm attributes to None
															UpperCAmelCase							,		UpperCAmelCase							,		UpperCAmelCase :       List[Any] 							=		None, None, None

								UpperCAmelCase :       Optional[Any] 							=		use_timm_backbone
								UpperCAmelCase :       Union[str, Any] 							=		backbone_config
								UpperCAmelCase :       List[str] 							=		num_channels
								UpperCAmelCase :       Optional[Any] 							=		num_queries
								UpperCAmelCase :       str 							=		d_model
								UpperCAmelCase :       List[Any] 							=		encoder_ffn_dim
								UpperCAmelCase :       Tuple 							=		encoder_layers
								UpperCAmelCase :       str 							=		encoder_attention_heads
								UpperCAmelCase :       List[Any] 							=		decoder_ffn_dim
								UpperCAmelCase :       List[Any] 							=		decoder_layers
								UpperCAmelCase :       List[str] 							=		decoder_attention_heads
								UpperCAmelCase :       List[str] 							=		dropout
								UpperCAmelCase :       Union[str, Any] 							=		attention_dropout
								UpperCAmelCase :       int 							=		activation_dropout
								UpperCAmelCase :       Union[str, Any] 							=		activation_function
								UpperCAmelCase :       Any 							=		init_std
								UpperCAmelCase :       List[str] 							=		init_xavier_std
								UpperCAmelCase :       Dict 							=		encoder_layerdrop
								UpperCAmelCase :       Optional[int] 							=		decoder_layerdrop
								UpperCAmelCase :       Optional[int] 							=		encoder_layers
								UpperCAmelCase :       Tuple 							=		auxiliary_loss
								UpperCAmelCase :       Union[str, Any] 							=		position_embedding_type
								UpperCAmelCase :       Union[str, Any] 							=		backbone
								UpperCAmelCase :       Optional[int] 							=		use_pretrained_backbone
								UpperCAmelCase :       Optional[Any] 							=		dilation
								# Hungarian matcher
								UpperCAmelCase :       Optional[int] 							=		class_cost
								UpperCAmelCase :       Optional[int] 							=		bbox_cost
								UpperCAmelCase :       Tuple 							=		giou_cost
								# Loss coefficients
								UpperCAmelCase :       List[str] 							=		mask_loss_coefficient
								UpperCAmelCase :       Union[str, Any] 							=		dice_loss_coefficient
								UpperCAmelCase :       Optional[Any] 							=		bbox_loss_coefficient
								UpperCAmelCase :       Tuple 							=		giou_loss_coefficient
								UpperCAmelCase :       Dict 							=		eos_coefficient
								super().__init__(is_encoder_decoder=__snake_case		,			**__snake_case		)







	@property
	def      A	(						self			:     Optional[Any]		)			->		int:
								return self.encoder_attention_heads







	@property
	def      A	(						self			:     int		)			->		int:
								return self.d_model







	@classmethod
	def      A	(						cls			:     List[Any]		,			__snake_case			:     PretrainedConfig		,			**__snake_case			:     str		)			->		str:
								return cls(backbone_config=__snake_case		,			**__snake_case		)







	def      A	(						self			:     Union[str, Any]		)			->		Dict[str, any]:
								UpperCAmelCase :       List[str] 							=		copy.deepcopy(self.__dict__		)
								if output["backbone_config"] is not None:
															UpperCAmelCase :       Any 							=		self.backbone_config.to_dict()
								UpperCAmelCase :       int 							=		self.__class__.model_type
								return output

class 				SCREAMING_SNAKE_CASE(							A__			):







	"""simple docstring"""






	lowerCamelCase__			 =       version.parse("""1.11"""			)







	@property
	def      A	(						self			:     Tuple		)			->		Mapping[str, Mapping[int, str]]:
								return OrderedDict(
								    [
								        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
								        ('''pixel_mask''', {0: '''batch'''}),
								    ]		)







	@property
	def      A	(						self			:     List[str]		)			->		float:
								return 1E-5







	@property
	def      A	(						self			:     str		)			->		int:
								return 12






import math
from datetime import datetime, timedelta


def    a__       (						__UpperCamelCase ):
      SCREAMING_SNAKE_CASE_      =     year % 1_9
      SCREAMING_SNAKE_CASE_      =     year % 4
      SCREAMING_SNAKE_CASE_      =     year % 7
      SCREAMING_SNAKE_CASE_      =     math.floor(year / 1_0_0 )
      SCREAMING_SNAKE_CASE_      =     math.floor((1_3 + 8 * leap_day_inhibits) / 2_5 )
      SCREAMING_SNAKE_CASE_      =     leap_day_inhibits / 4
      SCREAMING_SNAKE_CASE_      =     (
          1_5 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
      ) % 3_0
      SCREAMING_SNAKE_CASE_      =     (4 + leap_day_inhibits - leap_day_reinstall_number) % 7

      # days to be added to March 21
      SCREAMING_SNAKE_CASE_      =     (1_9 * metonic_cycle + secular_moon_shift) % 3_0

      # PHM -> Paschal Full Moon
      SCREAMING_SNAKE_CASE_      =     (
          2 * julian_leap_year
          + 4 * non_leap_year
          + 6 * days_to_add
          + century_starting_point
      ) % 7

      if days_to_add == 2_9 and days_from_phm_to_sunday == 6:
            return datetime(__UpperCamelCase   ,					4   ,					1_9 )
      elif days_to_add == 2_8 and days_from_phm_to_sunday == 6:
            return datetime(__UpperCamelCase   ,					4   ,					1_8 )
      else:
            return datetime(__UpperCamelCase   ,					3   ,					2_2 ) + timedelta(
                days=int(days_to_add + days_from_phm_to_sunday ) )


if __name__ == "__main__":
      for year in (19_94, 20_00, 20_10, 20_21, 20_23):
            A   :     Dict       =				"will be" if year > datetime.now().year else "was"
            print(f"Easter in {year} {tense} {gauss_easter(year)}")


