


'''simple docstring'''







lowerCAmelCase    :     str					=						[4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowerCAmelCase    :     List[Any]					=						[3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
lowerCAmelCase    :     Union[str, Any]					=						{
    0: "Sunday",
    1: "Monday",
    2: "Tuesday",
    3: "Wednesday",
    4: "Thursday",
    5: "Friday",
    6: "Saturday",
}






def 			lowercase				(_A   ,						_A   ,						_A					):







       """simple docstring"""







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

       # Doomsday algorithm:
       _lowerCAmelCase    :							int   			=       year // 1_0_0
       _lowerCAmelCase    :							int   			=       (5 * (century % 4) + 2) % 7
       _lowerCAmelCase    :							Optional[int]   			=       year % 1_0_0
       _lowerCAmelCase    :							List[Any]   			=       centurian % 1_2
       _lowerCAmelCase    :							Optional[int]   			=       (
           (centurian // 1_2) + centurian_m + (centurian_m // 4) + century_anchor
       ) % 7
       _lowerCAmelCase    :							Union[str, Any]   			=       (
           DOOMSDAY_NOT_LEAP[month - 1]
           if (year % 4 != 0) or (centurian == 0 and (year % 4_0_0) == 0)
           else DOOMSDAY_LEAP[month - 1]
       )
       _lowerCAmelCase    :							Tuple   			=       (dooms_day + day - day_anchor) % 7
       return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
     import doctest

     doctest.testmod()





'''simple docstring'''







import unittest

from transformers import AutoTokenizer, is_flax_available
from transformers.testing_utils import require_flax, require_sentencepiece, require_tokenizers, slow


if is_flax_available():
       import jax.numpy as jnp

       from transformers import FlaxXLMRobertaModel
@require_sentencepiece
@require_tokenizers
@require_flax
class 	UpperCamelCase__					( unittest.TestCase	):



     """simple docstring"""






     @slow
     def a	( self   ):

            '''simple docstring'''

            _lowerCAmelCase    :							List[str]   			=       FlaxXLMRobertaModel.from_pretrained('xlm-roberta-base'   )
            _lowerCAmelCase    :							Optional[Any]   			=       AutoTokenizer.from_pretrained('xlm-roberta-base'   )
            _lowerCAmelCase    :							Dict   			=       'The dog is cute and lives in the garden house'
            _lowerCAmelCase    :							List[str]   			=       jnp.array([tokenizer.encode(snake_case__   )]   )

            _lowerCAmelCase    :							Optional[int]   			=       (1, 12, 768)  # batch_size, sequence_length, embedding_vector_dim
            _lowerCAmelCase    :							Tuple   			=       jnp.array(
                [[-0.0101, 0.1218, -0.0803, 0.0801, 0.1327, 0.0776, -0.1215, 0.2383, 0.3338, 0.3106, 0.0300, 0.0252]]   )

            _lowerCAmelCase    :							Union[str, Any]   			=       model(snake_case__   )['last_hidden_state']
            self.assertEqual(output.shape      ,	snake_case__   )
            # compare the actual values for a slice of last dim
            self.assertTrue(jnp.allclose(output[:, :, -1]      ,	snake_case__      ,	atol=1E-3   )   )

