
"""simple docstring"""





import argparse
import datetime



def  lowerCamelCase__						(     __snake_case      )				->						str:


					"""simple docstring"""





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

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

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

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

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

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

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

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

					# Get datetime obj for validation
					_UpperCamelCase									=    datetime.date(int(__snake_case      ),	int(__snake_case      ),	int(__snake_case      )      )

					# Start math
					if m <= 2:
										_UpperCamelCase									=    y - 1
										_UpperCamelCase									=    m + 12
					# maths var
					_UpperCamelCase									=    int(str(__snake_case      )[:2]      )
					_UpperCamelCase									=    int(str(__snake_case      )[2:]      )
					_UpperCamelCase									=    int(2.6 * m - 5.39      )
					_UpperCamelCase									=    int(c / 4      )
					_UpperCamelCase									=    int(k / 4      )
					_UpperCamelCase									=    int(d + k      )
					_UpperCamelCase									=    int(t + u + v + x      )
					_UpperCamelCase									=    int(z - (2 * c)      )
					_UpperCamelCase									=    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
					_UpperCamelCase									=    F'''Your date {date_input}, is a {days[str(__snake_case      )]}!'''
					return response


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				_a								=						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)"""
				)
				_a								=						parser.parse_args()
				zeller(args.date_input)








"""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


_a								=						logging.get_logger(__name__)

_a								=						{
    """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        _UpperCAmelCase(       lowerCamelCase      ):
		lowercase__         = 'detr'
		lowercase__         = ['past_key_values']
		lowercase__         = {
		    'hidden_size': 'd_model',
		    'num_attention_heads': 'encoder_attention_heads',
		}



		def __init__(   self							,						__a=True							,						__a=None							,						__a=3							,						__a=1_00							,						__a=6							,						__a=20_48							,						__a=8							,						__a=6							,						__a=20_48							,						__a=8							,						__a=0.0							,						__a=0.0							,						__a=True							,						__a="relu"							,						__a=2_56							,						__a=0.1							,						__a=0.0							,						__a=0.0							,						__a=0.02							,						__a=1.0							,						__a=False							,						__a="sine"							,						__a="resnet50"							,						__a=True							,						__a=False							,						__a=1							,						__a=5							,						__a=2							,						__a=1							,						__a=1							,						__a=5							,						__a=2							,						__a=0.1							,						**__a							,						)			->			int:






							'''simple docstring'''
							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									=    CONFIG_MAPPING['''resnet'''](out_features=['''stage4'''])
												elif isinstance(__a							,						__a):
																	_UpperCamelCase									=    backbone_config.get('''model_type''')
																	_UpperCamelCase									=    CONFIG_MAPPING[backbone_model_type]
																	_UpperCamelCase									=    config_class.from_dict(__a)
												# set timm attributes to None
												_UpperCamelCase					,    _UpperCamelCase					,    _UpperCamelCase									=    None, None, None

							_UpperCamelCase									=    use_timm_backbone
							_UpperCamelCase									=    backbone_config
							_UpperCamelCase									=    num_channels
							_UpperCamelCase									=    num_queries
							_UpperCamelCase									=    d_model
							_UpperCamelCase									=    encoder_ffn_dim
							_UpperCamelCase									=    encoder_layers
							_UpperCamelCase									=    encoder_attention_heads
							_UpperCamelCase									=    decoder_ffn_dim
							_UpperCamelCase									=    decoder_layers
							_UpperCamelCase									=    decoder_attention_heads
							_UpperCamelCase									=    dropout
							_UpperCamelCase									=    attention_dropout
							_UpperCamelCase									=    activation_dropout
							_UpperCamelCase									=    activation_function
							_UpperCamelCase									=    init_std
							_UpperCamelCase									=    init_xavier_std
							_UpperCamelCase									=    encoder_layerdrop
							_UpperCamelCase									=    decoder_layerdrop
							_UpperCamelCase									=    encoder_layers
							_UpperCamelCase									=    auxiliary_loss
							_UpperCamelCase									=    position_embedding_type
							_UpperCamelCase									=    backbone
							_UpperCamelCase									=    use_pretrained_backbone
							_UpperCamelCase									=    dilation
							# Hungarian matcher
							_UpperCamelCase									=    class_cost
							_UpperCamelCase									=    bbox_cost
							_UpperCamelCase									=    giou_cost
							# Loss coefficients
							_UpperCamelCase									=    mask_loss_coefficient
							_UpperCamelCase									=    dice_loss_coefficient
							_UpperCamelCase									=    bbox_loss_coefficient
							_UpperCamelCase									=    giou_loss_coefficient
							_UpperCamelCase									=    eos_coefficient
							super().__init__(is_encoder_decoder=__a							,						**__a)



		@property
		def 		UpperCAmelCase				(   self)			->			int:






							'''simple docstring'''
							return self.encoder_attention_heads



		@property
		def 		UpperCAmelCase				(   self)			->			int:






							'''simple docstring'''
							return self.d_model



		@classmethod
		def 		UpperCAmelCase				(   cls							,						__a							,						**__a)			->			int:






							'''simple docstring'''
							return cls(backbone_config=__a							,						**__a)




		def 		UpperCAmelCase				(   self)			->			Dict[str, any]:






							'''simple docstring'''
							_UpperCamelCase									=    copy.deepcopy(self.__dict__)
							if output["backbone_config"] is not None:
												_UpperCamelCase									=    self.backbone_config.to_dict()
							_UpperCamelCase									=    self.__class__.model_type
							return output






class        _UpperCAmelCase(       lowerCamelCase      ):
		lowercase__         = version.parse('1.11'      )



		@property
		def 		UpperCAmelCase				(   self)			->			Mapping[str, Mapping[int, str]]:






							'''simple docstring'''
							return OrderedDict(
							    [
							        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
							        ('''pixel_mask''', {0: '''batch'''}),
							    ])



		@property
		def 		UpperCAmelCase				(   self)			->			float:






							'''simple docstring'''
							return 1e-5




		@property
		def 		UpperCAmelCase				(   self)			->			int:






							'''simple docstring'''
							return 12






