


A	:		Optional[int]    =       [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
A	:		int    =       [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
A	:		Dict    =       {
    0: 'Sunday',
    1: 'Monday',
    2: 'Tuesday',
    3: 'Wednesday',
    4: 'Thursday',
    5: 'Friday',
    6: 'Saturday',
}






def 			UpperCamelCase (     __magic_name__					:							int   ,   __magic_name__					:							int   ,   __magic_name__					:							int					)       ->  str:
		"""simple docstring"""




		assert len(str(__magic_name__					)					) > 2, "year should be in YYYY format"
		assert 1 <= month <= 12, "month should be between 1 to 12"
		assert 1 <= day <= 31, "day should be between 1 to 31"

		# Doomsday algorithm:
		lowercase__					      =		year // 100
		lowercase__					      =		(5 * (century % 4) + 2) % 7
		lowercase__					      =		year % 100
		lowercase__					      =		centurian % 12
		lowercase__					      =		(
		    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
		) % 7
		lowercase__					      =		(
		    DOOMSDAY_NOT_LEAP[month - 1]
		    if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
		    else DOOMSDAY_LEAP[month - 1]
		)
		lowercase__					      =		(dooms_day + day - day_anchor) % 7
		return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
	import doctest

	doctest.testmod()





from __future__ import annotations

import unittest

from transformers import is_tf_available
from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow


if is_tf_available():
	import numpy as np
	import tensorflow as tf

	from transformers import TFXLMRobertaModel



@require_tf
@require_sentencepiece
@require_tokenizers
class 							A   (	unittest.TestCase							):
					'''simple docstring'''






					@slow
					def   lowerCamelCase__					(self   :						Any		)						->       Union[str, Any]:




							"""simple docstring"""


							lowercase__					      =		TFXLMRobertaModel.from_pretrained("""jplu/tf-xlm-roberta-base"""		)

							lowercase__					      =		{
							    """input_ids""": tf.convert_to_tensor([[0, 2646, 1_0269, 83, 9_9942, 2]]				, dtype=tf.intaa		),  # "My dog is cute"
							    """attention_mask""": tf.convert_to_tensor([[1, 1, 1, 1, 1, 1]]				, dtype=tf.intaa		),
							}

							lowercase__					      =		model(_UpperCAmelCase		)["""last_hidden_state"""]
							lowercase__					      =		tf.TensorShape((1, 6, 768)		)
							self.assertEqual(output.shape				, _UpperCAmelCase		)
							# compare the actual values for a slice.
							lowercase__					      =		tf.convert_to_tensor(
							    [
							        [
							            [0.0_681_762, 0.10_894_451, 0.06_772_504],
							            [-0.06_423_668, 0.02_366_615, 0.04_329_344],
							            [-0.06_057_295, 0.09_974_135, -0.00_070_584],
							        ]
							    ]				, dtype=tf.floataa				, )

							self.assertTrue(np.allclose(output[:, :3, :3].numpy()				, expected_slice.numpy()				, atol=1E-4		)		)

