



"""simple docstring"""
import unittest

from transformers.testing_utils import require_bsa
from transformers.utils import is_bsa_available

from ...test_feature_extraction_common import FeatureExtractionSavingTestMixin


if is_bsa_available():
      from transformers import MarkupLMFeatureExtractor



class    SCREAMING_SNAKE_CASE__						(      unittest.TestCase				):

   def __init__(     self   ,  _SCREAMING_SNAKE_CASE		)						->   Dict:





    '''simple docstring'''




    UpperCAmelCase			:      Any			=			parent




   def 			SCREAMING_SNAKE_CASE  (     self		)						->   Union[str, Any]:





    '''simple docstring'''




    return {}

def    _snake_case		(		):
 UpperCAmelCase			:      Dict			=			"""<HTML>

    <HEAD>
    <TITLE>sample document</TITLE>
    </HEAD>

    <BODY BGCOLOR=\"FFFFFF\">
    <HR>
    <a href=\"http://google.com\">Goog</a>
    <H1>This is one header</H1>
    <H2>This is a another Header</H2>
    <P>Travel from
        <P>
        <B>SFO to JFK</B>
        <BR>
        <B><I>on May 2, 2015 at 2:00 pm. For details go to confirm.com </I></B>
        <HR>
        <div style=\"color:#0000FF\">
            <h3>Traveler <b> name </b> is
            <p> John Doe </p>
        </div>"""

 UpperCAmelCase			:      int			=			"""
    <!DOCTYPE html>
    <html>
    <body>

    <h1>My First Heading</h1>
    <p>My first paragraph.</p>

    </body>
    </html>
    """

 return [html_string_a, html_string_a]



@require_bsa
class    SCREAMING_SNAKE_CASE__						(      __UpperCAmelCase   ,    unittest.TestCase				):
   __lowerCAmelCase						:     Union[str, Any]		=		MarkupLMFeatureExtractor if is_bsa_available() else None

   def 			SCREAMING_SNAKE_CASE  (     self		)						->   List[Any]:





    '''simple docstring'''




    UpperCAmelCase			:      List[Any]			=			MarkupLMFeatureExtractionTester(self		)

   @property
   def 			SCREAMING_SNAKE_CASE  (     self		)						->   int:





    '''simple docstring'''




    return self.feature_extract_tester.prepare_feat_extract_dict()




   def 			SCREAMING_SNAKE_CASE  (     self		)						->   Dict:





    '''simple docstring'''




    UpperCAmelCase			:      Optional[int]			=			self.feature_extraction_class()

    # Test not batched input
    UpperCAmelCase			:      List[str]			=			get_html_strings()[0]
    UpperCAmelCase			:      Optional[Any]			=			feature_extractor(__SCREAMING_SNAKE_CASE		)

    # fmt: off
    UpperCAmelCase			:      Any			=			[["""sample document""", """Goog""", """This is one header""", """This is a another Header""", """Travel from""", """SFO to JFK""", """on May 2, 2015 at 2:00 pm. For details go to confirm.com""", """Traveler""", """name""", """is""", """John Doe"""]]
    UpperCAmelCase			:      Any			=			[["""/html/head/title""", """/html/body/a""", """/html/body/h1""", """/html/body/h2""", """/html/body/p""", """/html/body/p/p/b[1]""", """/html/body/p/p/b[2]/i""", """/html/body/p/p/div/h3""", """/html/body/p/p/div/h3/b""", """/html/body/p/p/div/h3""", """/html/body/p/p/div/h3/p"""]]
    # fmt: on

    self.assertEqual(encoding.nodes   ,  __SCREAMING_SNAKE_CASE		)
    self.assertEqual(encoding.xpaths   ,  __SCREAMING_SNAKE_CASE		)

    # Test batched
    UpperCAmelCase			:      Optional[Any]			=			get_html_strings()
    UpperCAmelCase			:      Any			=			feature_extractor(__SCREAMING_SNAKE_CASE		)

    # fmt: off
    UpperCAmelCase			:      int			=			expected_nodes + [["""My First Heading""", """My first paragraph."""]]
    UpperCAmelCase			:      Optional[Any]			=			expected_xpaths + [["""/html/body/h1""", """/html/body/p"""]]

    self.assertEqual(len(encoding.nodes		)   ,  2		)
    self.assertEqual(len(encoding.xpaths		)   ,  2		)

    self.assertEqual(encoding.nodes   ,  __SCREAMING_SNAKE_CASE		)
    self.assertEqual(encoding.xpaths   ,  __SCREAMING_SNAKE_CASE		)











"""simple docstring"""
import math
from datetime import datetime, timedelta

def    _snake_case		(		UpperCamelCase		:	int		):
 UpperCAmelCase			:      Any			=			year % 19
 UpperCAmelCase			:      Any			=			year % 4
 UpperCAmelCase			:      str			=			year % 7
 UpperCAmelCase			:      Union[str, Any]			=			math.floor(year / 100		)
 UpperCAmelCase			:      Optional[Any]			=			math.floor((13 + 8 * leap_day_inhibits) / 25		)
 UpperCAmelCase			:      int			=			leap_day_inhibits / 4
 UpperCAmelCase			:      int			=			(
     15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
 ) % 30
 UpperCAmelCase			:      Tuple			=			(4 + leap_day_inhibits - leap_day_reinstall_number) % 7

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

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