


'''simple docstring'''



import math
from datetime import datetime, timedelta



def      UpperCAmelCase__   (      UpperCAmelCase_       :							int				)	->						datetime:
     __lowerCamelCase  :      Union[str, Any]														=						year % 19
     __lowerCamelCase  :      List[str]														=						year % 4
     __lowerCamelCase  :      Union[str, Any]														=						year % 7
     __lowerCamelCase  :      Tuple														=						math.floor(year / 1_00				)
     __lowerCamelCase  :      str														=						math.floor((13 + 8 * leap_day_inhibits) / 25				)
     __lowerCamelCase  :      Dict														=						leap_day_inhibits / 4
     __lowerCamelCase  :      Optional[Any]														=						(
         15 - lunar_orbit_correction + leap_day_inhibits - leap_day_reinstall_number
     ) % 30
     __lowerCamelCase  :      int														=						(4 + leap_day_inhibits - leap_day_reinstall_number) % 7

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

     # PHM -> Paschal Full Moon
     __lowerCamelCase  :      Union[str, Any]														=						(
         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 (1994, 2000, 2010, 2021, 2023):
            A__						:   Optional[int]				=    """will be""" if year > datetime.now().year else """was"""
            print(f'''Easter in {year} {tense} {gauss_easter(year)}''')









"""simple docstring"""





import os
from argparse import ArgumentParser
from typing import List

import torch.utils.data

from datasets import Dataset, IterableDataset
from datasets.distributed import split_dataset_by_node


__UpperCamelCase    : str				 =						4
__UpperCamelCase    : List[str]				 =						3







class 							SCREAMING_SNAKE_CASE   (						a_			):






					"""simple docstring"""



					pass

def     __SCREAMING_SNAKE_CASE    ( A_					):
	for shard in shards:
		for i in range(A_					):
			yield {"i": i, "shard": shard}

def     __SCREAMING_SNAKE_CASE    ( ):
	lowerCAmelCase__      :		List[str]    							=      int(os.environ['''RANK''']					)
	lowerCAmelCase__      :		Union[str, Any]    							=      int(os.environ['''WORLD_SIZE''']					)

	lowerCAmelCase__      :		Tuple    							=      ArgumentParser()
	parser.add_argument('''--streaming'''		,	type=A_					)
	parser.add_argument('''--local_rank'''		,	type=A_					)
	parser.add_argument('''--num_workers'''		,	type=A_		,	default=0					)
	lowerCAmelCase__      :		Tuple    							=      parser.parse_args()
	lowerCAmelCase__      :		Tuple    							=      args.streaming
	lowerCAmelCase__      :		Any    							=      args.num_workers

	lowerCAmelCase__      :		Dict    							=      {'''shards''': [f'shard_{shard_idx}' for shard_idx in range(A_					)]}
	lowerCAmelCase__      :		Optional[int]    							=      IterableDataset.from_generator(A_		,	gen_kwargs=A_					)
	if not streaming:
		lowerCAmelCase__      :		Dict    							=      Dataset.from_list(list(A_					)					)

	lowerCAmelCase__      :		Optional[Any]    							=      split_dataset_by_node(A_		,	rank=A_		,	world_size=A_					)
	lowerCAmelCase__      :		List[Any]    							=      torch.utils.data.DataLoader(A_		,	num_workers=A_					)

	lowerCAmelCase__      :		Optional[int]    							=      NUM_SHARDS * NUM_ITEMS_PER_SHARD
	lowerCAmelCase__      :		List[str]    							=      full_size // world_size
	expected_local_size += int(rank < (full_size % world_size)					)

	lowerCAmelCase__      :		int    							=      sum(1 for _ in dataloader					)
	if local_size != expected_local_size:
		raise FailedTestError(f'local_size {local_size} != expected_local_size {expected_local_size}'					)


if __name__ == "__main__":
							main()




