




import warnings
from typing import List

import numpy as np

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding
from ...utils import is_flax_available, is_tf_available, is_torch_available

class 		__lowerCAmelCase	(	__magic_name__ ):
							UpperCamelCase__					     =  ['''image_processor''', '''tokenizer''']
							UpperCamelCase__					     =  '''OwlViTImageProcessor'''
							UpperCamelCase__					     =  ('''CLIPTokenizer''', '''CLIPTokenizerFast''')
							def __init__(						self						:Dict		,      __magic_name__						:List[str]=None		,      __magic_name__						:Dict=None		,      **__magic_name__						:List[Any]				):







								'''simple docstring'''







								a										=							None
								if "feature_extractor" in kwargs:
									warnings.warn(
									    """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
									    """ instead."""		,      __magic_name__		,      )
									a										=							kwargs.pop("""feature_extractor"""				)

								a										=							image_processor if image_processor is not None else feature_extractor
								if image_processor is None:
									raise ValueError("""You need to specify an `image_processor`."""				)
								if tokenizer is None:
									raise ValueError("""You need to specify a `tokenizer`."""				)

								super().__init__(__magic_name__		,      __magic_name__				)
							def __call__(						self						:Union[str, Any]		,      __magic_name__						:int=None		,      __magic_name__						:List[Any]=None		,      __magic_name__						:Optional[int]=None		,      __magic_name__						:Optional[int]="max_length"		,      __magic_name__						:str="np"		,      **__magic_name__						:Dict				):







								'''simple docstring'''







								if text is None and query_images is None and images is None:
									raise ValueError(
									    """You have to specify at least one text or query image or image. All three cannot be none."""				)

								if text is not None:
									if isinstance(__magic_name__		,      __magic_name__				) or (isinstance(__magic_name__		,      __magic_name__				) and not isinstance(text[0]		,      __magic_name__				)):
										a										=							[self.tokenizer(__magic_name__		,      padding=__magic_name__		,      return_tensors=__magic_name__		,      **__magic_name__				)]

									elif isinstance(__magic_name__		,      __magic_name__				) and isinstance(text[0]		,      __magic_name__				):
										a										=							[]

										# Maximum number of queries across batch
										a										=							max([len(__magic_name__				) for t in text]				)

										# Pad all batch samples to max number of text queries
										for t in text:
											if len(__magic_name__				) != max_num_queries:
												a										=							t + [""" """] * (max_num_queries - len(__magic_name__				))

											a										=							self.tokenizer(__magic_name__		,      padding=__magic_name__		,      return_tensors=__magic_name__		,      **__magic_name__				)
											encodings.append(__magic_name__				)
									else:
										raise TypeError("""Input text should be a string, a list of strings or a nested list of strings"""				)

									if return_tensors == "np":
										a										=							np.concatenate([encoding["""input_ids"""] for encoding in encodings]		,      axis=0				)
										a										=							np.concatenate([encoding["""attention_mask"""] for encoding in encodings]		,      axis=0				)

									elif return_tensors == "jax" and is_flax_available():
										import jax.numpy as jnp

										a										=							jnp.concatenate([encoding["""input_ids"""] for encoding in encodings]		,      axis=0				)
										a										=							jnp.concatenate([encoding["""attention_mask"""] for encoding in encodings]		,      axis=0				)

									elif return_tensors == "pt" and is_torch_available():
										import torch

										a										=							torch.cat([encoding["""input_ids"""] for encoding in encodings]		,      dim=0				)
										a										=							torch.cat([encoding["""attention_mask"""] for encoding in encodings]		,      dim=0				)

									elif return_tensors == "tf" and is_tf_available():
										import tensorflow as tf

										a										=							tf.stack([encoding["""input_ids"""] for encoding in encodings]		,      axis=0				)
										a										=							tf.stack([encoding["""attention_mask"""] for encoding in encodings]		,      axis=0				)

									else:
										raise ValueError("""Target return tensor type could not be returned"""				)

									a										=							BatchEncoding()
									a										=							input_ids
									a										=							attention_mask

								if query_images is not None:
									a										=							BatchEncoding()
									a										=							self.image_processor(
									    __magic_name__		,      return_tensors=__magic_name__		,      **__magic_name__				).pixel_values
									a										=							query_pixel_values

								if images is not None:
									a										=							self.image_processor(__magic_name__		,      return_tensors=__magic_name__		,      **__magic_name__				)

								if text is not None and images is not None:
									a										=							image_features.pixel_values
									return encoding
								elif query_images is not None and images is not None:
									a										=							image_features.pixel_values
									return encoding
								elif text is not None or query_images is not None:
									return encoding
								else:
									return BatchEncoding(data=dict(**__magic_name__				)		,      tensor_type=__magic_name__				)
							def       lowerCamelCase__							(						self						:Tuple		,      *__magic_name__						:Optional[int]		,      **__magic_name__						:List[Any]				):







								'''simple docstring'''







								return self.image_processor.post_process(*__magic_name__		,      **__magic_name__				)
							def       lowerCamelCase__							(						self						:str		,      *__magic_name__						:List[Any]		,      **__magic_name__						:str				):







								'''simple docstring'''







								return self.image_processor.post_process_object_detection(*__magic_name__		,      **__magic_name__				)
							def       lowerCamelCase__							(						self						:str		,      *__magic_name__						:Optional[Any]		,      **__magic_name__						:Union[str, Any]				):







								'''simple docstring'''







								return self.image_processor.post_process_image_guided_detection(*__magic_name__		,      **__magic_name__				)
							def       lowerCamelCase__							(						self						:Tuple		,      *__magic_name__						:int		,      **__magic_name__						:Union[str, Any]				):







								'''simple docstring'''







								return self.tokenizer.batch_decode(*__magic_name__		,      **__magic_name__				)
							def       lowerCamelCase__							(						self						:str		,      *__magic_name__						:List[str]		,      **__magic_name__						:str				):







								'''simple docstring'''







								return self.tokenizer.decode(*__magic_name__		,      **__magic_name__				)
							@property
							def       lowerCamelCase__							(						self						:Dict				):







								'''simple docstring'''







								warnings.warn(
								    """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."""		,      __magic_name__		,      )
								return self.image_processor_class





							@property
							def       lowerCamelCase__							(						self						:Dict				):







								'''simple docstring'''







								warnings.warn(
								    """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""		,      __magic_name__		,      )
								return self.image_processor







import math
from datetime import datetime, timedelta





def 		__A		(	__lowerCamelCase    )      ->       datetime:
	a										=							year % 19
	a										=							year % 4
	a										=							year % 7
	a										=							math.floor(year / 100    )
	a										=							math.floor((13 + 8 * leap_day_inhibits) / 25    )
	a										=							leap_day_inhibits / 4
	a										=							(
	    15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
	) % 30
	a										=							(4 + leap_day_inhibits - leap_day_reinstall_number) % 7

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

	# PHM -> Paschal Full Moon
	a										=							(
	    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(__lowerCamelCase							,			4							,			19    )
	elif days_to_add == 28 and days_from_phm_to_sunday == 6:
		return datetime(__lowerCamelCase							,			4							,			18    )
	else:
		return datetime(__lowerCamelCase							,			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):
				__UpperCamelCase					:       Tuple    					=      "will be" if year > datetime.now().year else "was"
				print(F'Easter in {year} {tense} {gauss_easter(year)}')

