lowerCAmelCase			:							Optional[int]     =[0, 2, 4, 6, 8]
lowerCAmelCase			:							Tuple     =[1, 3, 5, 7, 9]







def 						A__  (					__A   , __A   , __A   , __A	):







    '''simple docstring'''
    if remaining_length == 0:
        if digits[0] == 0 or digits[-1] == 0:
            return 0

        for i in range(length // 2 - 1   , -1   , -1	):
            remainder += digits[i] + digits[length - i - 1]

            if remainder % 2 == 0:
                return 0

            remainder //= 10

        return 1

    if remaining_length == 1:
        if remainder % 2 == 0:
            return 0

        _lowerCamelCase     :		Union[str, Any] 						=						0
        for digit in range(10	):
            _lowerCamelCase     :		Optional[int] 						=						digit
            result += reversible_numbers(
                0   , (remainder + 2 * digit) // 10   , __A   , __A	)
        return result

    _lowerCamelCase     :		Optional[Any] 						=						0
    for digita in range(10	):
        _lowerCamelCase     :		Tuple 						=						digita

        if (remainder + digita) % 2 == 0:
            _lowerCamelCase     :		Tuple 						=						ODD_DIGITS
        else:
            _lowerCamelCase     :		Optional[int] 						=						EVEN_DIGITS

        for digita in other_parity_digits:
            _lowerCamelCase     :		Tuple 						=						digita
            result += reversible_numbers(
                remaining_length - 2   , (remainder + digita + digita) // 10   , __A   , __A   , )
    return result







def 						A__  (					__A = 9	):







    '''simple docstring'''
    _lowerCamelCase     :		List[str] 						=						0
    for length in range(1   , max_power + 1	):
        result += reversible_numbers(__A   , 0   , [0] * length   , __A	)
    return result


if __name__ == "__main__":
    print(F"""{solution() = }""")





import multiprocessing
import time

from arguments import PretokenizationArguments
from datasets import load_dataset

from transformers import AutoTokenizer, HfArgumentParser







def 						A__  (					__A	):







    '''simple docstring'''
    _lowerCamelCase     :		Tuple 						=						{}
    _lowerCamelCase     :		List[Any] 						=						tokenizer(example["""content"""]   , truncation=__A	)["""input_ids"""]
    _lowerCamelCase     :		Tuple 						=						len(example["""content"""]	) / len(output["""input_ids"""]	)
    return output


lowerCAmelCase			:							int     =HfArgumentParser(PretokenizationArguments)
lowerCAmelCase			:							int     =parser.parse_args()
if args.num_workers is None:
    lowerCAmelCase			:							Any     =multiprocessing.cpu_count()
lowerCAmelCase			:							Optional[Any]     =AutoTokenizer.from_pretrained(args.tokenizer_dir)

lowerCAmelCase			:							str     =time.time()
lowerCAmelCase			:							Union[str, Any]     =load_dataset(args.dataset_name, split="train")
print(F"""Dataset loaded in {time.time()-t_start:.2f}s""")

lowerCAmelCase			:							Dict     =time.time()
lowerCAmelCase			:							Dict     =ds.map(
    tokenize,
    num_proc=args.num_workers,
    remove_columns=[
        "repo_name",
        "path",
        "copies",
        "size",
        "content",
        "license",
        "hash",
        "line_mean",
        "line_max",
        "alpha_frac",
        "autogenerated",
    ],
)
print(F"""Dataset tokenized in {time.time()-t_start:.2f}s""")

lowerCAmelCase			:							Tuple     =time.time()
ds.push_to_hub(args.tokenized_data_repo)
print(F"""Data pushed to the hub in {time.time()-t_start:.2f}s""")




