
"""simple docstring"""




def     __magic_name__      ( )					->							Dict:
       lowercase       :							Optional[int]									=				[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

       lowercase       :							int									=				6
       lowercase       :							Optional[Any]									=				1
       lowercase       :							List[Any]									=				1901

       lowercase       :							Optional[int]									=				0

       while year < 2001:
              day += 7

              if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
                     if day > days_per_month[month - 1] and month != 2:
                            month += 1
                            lowercase       :							Dict									=				day - days_per_month[month - 2]
                     elif day > 29 and month == 2:
                            month += 1
                            lowercase       :							Optional[Any]									=				day - 29
              else:
                     if day > days_per_month[month - 1]:
                            month += 1
                            lowercase       :							Any									=				day - days_per_month[month - 2]

              if month > 12:
                     year += 1
                     lowercase       :							List[Any]									=				1

              if year < 2001 and day == 1:
                     sundays += 1
       return sundays


if __name__ == "__main__":
   print(solution())






import time
import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch, torch_device

from ..test_modeling_common import ids_tensor


if is_torch_available():
 import torch

 from transformers.generation import (
     MaxLengthCriteria,
     MaxNewTokensCriteria,
     MaxTimeCriteria,
     StoppingCriteriaList,
     validate_stopping_criteria,
 )




@require_torch
class A    (  unittest.TestCase	):






      def 			lowerCamelCase			(   self		:	Optional[int]     ,  lowercase_		:	int					)   ->		Optional[int]:
             """simple docstring"""




             _lowerCamelCase			:						List[str]            =3
             _lowerCamelCase			:						Dict            =250

             _lowerCamelCase			:						Tuple            =ids_tensor((batch_size, length)     ,  lowercase_					)
             _lowerCamelCase			:						str            =torch.ones((batch_size, length)     ,  device=lowercase_     ,  dtype=torch.float					) / length
             return input_ids, scores






      def 			lowerCamelCase			(   self		:	Optional[int]					)   ->		Optional[Any]:
             """simple docstring"""




             _lowerCamelCase      ,	_lowerCamelCase			:						Optional[Any]            =self._get_tensors(5					)

             _lowerCamelCase			:						Dict            =StoppingCriteriaList(
                 [
                     MaxLengthCriteria(max_length=10					),
                     MaxTimeCriteria(max_time=0.1					),
                 ]					)

             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase      ,	_lowerCamelCase			:						List[str]            =self._get_tensors(9					)
             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase      ,	_lowerCamelCase			:						Optional[int]            =self._get_tensors(10					)
             self.assertTrue(criteria(lowercase_     ,  lowercase_					)					)






      def 			lowerCamelCase			(   self		:	Optional[int]					)   ->		Tuple:
             """simple docstring"""




             _lowerCamelCase			:						Any            =MaxLengthCriteria(max_length=10					)

             _lowerCamelCase      ,	_lowerCamelCase			:						List[str]            =self._get_tensors(5					)
             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase      ,	_lowerCamelCase			:						Optional[int]            =self._get_tensors(9					)
             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase      ,	_lowerCamelCase			:						Optional[int]            =self._get_tensors(10					)
             self.assertTrue(criteria(lowercase_     ,  lowercase_					)					)






      def 			lowerCamelCase			(   self		:	List[str]					)   ->		Tuple:
             """simple docstring"""




             _lowerCamelCase			:						Union[str, Any]            =MaxNewTokensCriteria(start_length=5     ,  max_new_tokens=5					)

             _lowerCamelCase      ,	_lowerCamelCase			:						str            =self._get_tensors(5					)
             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase      ,	_lowerCamelCase			:						Union[str, Any]            =self._get_tensors(9					)
             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase      ,	_lowerCamelCase			:						Dict            =self._get_tensors(10					)
             self.assertTrue(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase			:						Optional[Any]            =StoppingCriteriaList([criteria]					)
             self.assertEqual(criteria_list.max_length     ,  10					)






      def 			lowerCamelCase			(   self		:	Optional[Any]					)   ->		str:
             """simple docstring"""




             _lowerCamelCase      ,	_lowerCamelCase			:						Optional[Any]            =self._get_tensors(5					)

             _lowerCamelCase			:						Tuple            =MaxTimeCriteria(max_time=0.1					)
             self.assertFalse(criteria(lowercase_     ,  lowercase_					)					)

             _lowerCamelCase			:						int            =MaxTimeCriteria(max_time=0.1     ,  initial_timestamp=time.time() - 0.2					)
             self.assertTrue(criteria(lowercase_     ,  lowercase_					)					)






      def 			lowerCamelCase			(   self		:	Optional[int]					)   ->		Optional[int]:
             """simple docstring"""




             validate_stopping_criteria(StoppingCriteriaList([MaxLengthCriteria(10					)]					)     ,  10					)

             with self.assertWarns(lowercase_					):
                    validate_stopping_criteria(StoppingCriteriaList([MaxLengthCriteria(10					)]					)     ,  11					)

             _lowerCamelCase			:						Optional[Any]            =validate_stopping_criteria(StoppingCriteriaList()     ,  11					)

             self.assertEqual(len(lowercase_					)     ,  1					)


