

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


def 	_lowerCAmelCase (						_UpperCamelCase						:					int							,			_UpperCamelCase						:					int							,			_UpperCamelCase						:					int    )				->      str:
     """simple docstring"""




     assert len(str(_UpperCamelCase    )    ) > 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:
     _SCREAMING_SNAKE_CASE							   =year // 1_00
     _SCREAMING_SNAKE_CASE							   =(5 * (century % 4) + 2) % 7
     _SCREAMING_SNAKE_CASE							   =year % 1_00
     _SCREAMING_SNAKE_CASE							   =centurian % 12
     _SCREAMING_SNAKE_CASE							   =(
         (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
     ) % 7
     _SCREAMING_SNAKE_CASE							   =(
         DOOMSDAY_NOT_LEAP[month - 1]
         if (year % 4 != 0) or (centurian == 0 and (year % 4_00) == 0)
         else DOOMSDAY_LEAP[month - 1]
     )
     _SCREAMING_SNAKE_CASE							   =(dooms_day + day - day_anchor) % 7
     return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
     import doctest

     doctest.testmod()



'''simple docstring'''
import argparse
import logging
import pickle
from collections import Counter


logging.basicConfig(
    format="%(asctime)s - %(levelname)s - %(name)s - %(message)s", datefmt="%m/%d/%Y %H:%M:%S", level=logging.INFO
)
lowerCamelCase			:				int 			=					logging.getLogger(__name__)

if __name__ == "__main__":
     lowerCamelCase			:				Optional[Any] 			=					argparse.ArgumentParser(
         description="Token Counts for smoothing the masking probabilities in MLM (cf XLM/word2vec)"
     )
     parser.add_argument(
         "--data_file", type=str, default="data/dump.bert-base-uncased.pickle", help="The binarized dataset."
     )
     parser.add_argument(
         "--token_counts_dump", type=str, default="data/token_counts.bert-base-uncased.pickle", help="The dump file."
     )
     parser.add_argument("--vocab_size", default=3_0_5_2_2, type=int)
     lowerCamelCase			:				Optional[Any] 			=					parser.parse_args()

     logger.info(f'''Loading data from {args.data_file}''')
     with open(args.data_file, "rb") as fp:
          lowerCamelCase			:				Optional[int] 			=					pickle.load(fp)

     logger.info("Counting occurrences for MLM.")
     lowerCamelCase			:				Dict 			=					Counter()
     for tk_ids in data:
          counter.update(tk_ids)
     lowerCamelCase			:				Tuple 			=					[0] * args.vocab_size
     for k, v in counter.items():
          lowerCamelCase			:				Any 			=					v

     logger.info(f'''Dump to {args.token_counts_dump}''')
     with open(args.token_counts_dump, "wb") as handle:
          pickle.dump(counts, handle, protocol=pickle.HIGHEST_PROTOCOL)
