




"""simple docstring"""







import unittest

from transformers import AutoConfig, AutoTokenizer, BertConfig, TensorType, is_flax_available
from transformers.testing_utils import DUMMY_UNKNOWN_IDENTIFIER, require_flax, slow


if is_flax_available():
		import jax

		from transformers.models.auto.modeling_flax_auto import FlaxAutoModel
		from transformers.models.bert.modeling_flax_bert import FlaxBertModel
		from transformers.models.roberta.modeling_flax_roberta import FlaxRobertaModel






@require_flax
class    SCREAMING_SNAKE_CASE__       (       unittest.TestCase       ):


						@slow
						def 	__lowercase			(				self					:      List[str]       ):
										for model_name in ["bert-base-cased", "bert-large-uncased"]:
														with self.subTest(_UpperCAmelCase       ):
																		lowerCAmelCase						=					AutoConfig.from_pretrained(_UpperCAmelCase       )
																		self.assertIsNotNone(_UpperCAmelCase       )
																		self.assertIsInstance(_UpperCAmelCase    ,    _UpperCAmelCase       )

																		lowerCAmelCase						=					FlaxAutoModel.from_pretrained(_UpperCAmelCase       )
																		self.assertIsNotNone(_UpperCAmelCase       )
																		self.assertIsInstance(_UpperCAmelCase    ,    _UpperCAmelCase       )


						@slow
						def 	__lowercase			(				self					:      Dict       ):
										for model_name in ["roberta-base", "roberta-large"]:
														with self.subTest(_UpperCAmelCase       ):
																		lowerCAmelCase						=					AutoConfig.from_pretrained(_UpperCAmelCase       )
																		self.assertIsNotNone(_UpperCAmelCase       )
																		self.assertIsInstance(_UpperCAmelCase    ,    _UpperCAmelCase       )

																		lowerCAmelCase						=					FlaxAutoModel.from_pretrained(_UpperCAmelCase       )
																		self.assertIsNotNone(_UpperCAmelCase       )
																		self.assertIsInstance(_UpperCAmelCase    ,    _UpperCAmelCase       )


						@slow
						def 	__lowercase			(				self					:      Tuple       ):
										for model_name in ["bert-base-cased", "bert-large-uncased"]:
														lowerCAmelCase						=					AutoTokenizer.from_pretrained(_UpperCAmelCase       )
														lowerCAmelCase						=					FlaxBertModel.from_pretrained(_UpperCAmelCase       )
														lowerCAmelCase						=					tokenizer("""Do you support jax jitted function?"""    ,    return_tensors=TensorType.JAX       )

														@jax.jit
														def eval(**lowerCAmelCase					:      int       ):
																		return model(**_UpperCAmelCase       )

														eval(**_UpperCAmelCase       ).block_until_ready()


						@slow
						def 	__lowercase			(				self					:      Union[str, Any]       ):
										for model_name in ["roberta-base", "roberta-large"]:
														lowerCAmelCase						=					AutoTokenizer.from_pretrained(_UpperCAmelCase       )
														lowerCAmelCase						=					FlaxRobertaModel.from_pretrained(_UpperCAmelCase       )
														lowerCAmelCase						=					tokenizer("""Do you support jax jitted function?"""    ,    return_tensors=TensorType.JAX       )

														@jax.jit
														def eval(**lowerCAmelCase					:      Optional[Any]       ):
																		return model(**_UpperCAmelCase       )

														eval(**_UpperCAmelCase       ).block_until_ready()


						def 	__lowercase			(				self					:      Union[str, Any]       ):
										with self.assertRaisesRegex(
										    _UpperCAmelCase    ,    """bert-base is not a local folder and is not a valid model identifier"""       ):
														lowerCAmelCase						=					FlaxAutoModel.from_pretrained("""bert-base"""       )


						def 	__lowercase			(				self					:      Tuple       ):
										with self.assertRaisesRegex(
										    _UpperCAmelCase    ,    R"""aaaaaa is not a valid git identifier \(branch name, tag name or commit id\)"""       ):
														lowerCAmelCase						=					FlaxAutoModel.from_pretrained(_UpperCAmelCase    ,    revision="""aaaaaa"""       )


						def 	__lowercase			(				self					:      Tuple       ):
										with self.assertRaisesRegex(
										    _UpperCAmelCase    ,    """hf-internal-testing/config-no-model does not appear to have a file named flax_model.msgpack"""    ,    ):
														lowerCAmelCase						=					FlaxAutoModel.from_pretrained("""hf-internal-testing/config-no-model"""       )




						def 	__lowercase			(				self					:      Tuple       ):
										with self.assertRaisesRegex(_UpperCAmelCase    ,    """Use `from_pt=True` to load this model"""       ):
														lowerCAmelCase						=					FlaxAutoModel.from_pretrained("""hf-internal-testing/tiny-bert-pt-only"""       )













import math
from datetime import datetime, timedelta






def      _snake_case     (__lowercase):
   UpperCamelCase_						=  year % 19
   UpperCamelCase_						=  year % 4
   UpperCamelCase_						=  year % 7
   UpperCamelCase_						=  math.floor(year / 100)
   UpperCamelCase_						=  math.floor((13 + 8 * leap_day_inhibits) / 25)
   UpperCamelCase_						=  leap_day_inhibits / 4
   UpperCamelCase_						=  (
       15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
   ) % 30
   UpperCamelCase_						=  (4 + leap_day_inhibits - leap_day_reinstall_number) % 7

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

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


if __name__ == "__main__":
 for year in (1_9_9_4, 2_0_0_0, 2_0_1_0, 2_0_2_1, 2_0_2_3):
  snake_case__   :						Dict													=   """will be""" if year > datetime.now().year else """was"""
  print(f'Easter in {year} {tense} {gauss_easter(year)}')





