<commit_before>import re
import time
import logging

from typing import Dict, Union, List
from random import choice, randint

LOGGER = logging.getLogger(__name__)

CDC_LOGTABLE_SUFFIX = "_scylla_cdc_log"
CDC_SETTINGS_NAMES_VALUES = {
    "enabled": [True, False],
    "delta": ["full", "keys"],
    "preimage": ["full", "on", "off"],
    "postimage": [True, False],
    "ttl": "86400"
}

CDC_DELTA_REGEXP = r"delta.*?(?P<delta>(full|keys))"
CDC_ENABLED_REGEXP = r"enabled.*?(?P<enabled>(true|false))"
CDC_PREIMAGE_REGEXP = r"preimage.*?(?P<preimage>(full|on|off))"
CDC_POSTIMAGE_REGEXP = r"postimage.*?(?P<postimage>(true|false))"
CDC_TTL_REGEXP = r"ttl.*?(?P<ttl>\d+)"

CDC_SETTINGS_REGEXP = [CDC_ENABLED_REGEXP,
                       CDC_DELTA_REGEXP,<commit_msg>fix(cdc-options): update supported values for preimage<commit_after>import re
import time
import logging

from typing import Dict, Union, List
from random import choice, randint

LOGGER = logging.getLogger(__name__)

CDC_LOGTABLE_SUFFIX = "_scylla_cdc_log"
CDC_SETTINGS_NAMES_VALUES = {
    "enabled": [True, False],
    "delta": ["full", "keys"],
    "preimage": ["full", "on", "off"],
    "postimage": [True, False],
    "ttl": "86400"
}

CDC_DELTA_REGEXP = r"delta.*?(?P<delta>(full|keys))"
CDC_ENABLED_REGEXP = r"enabled.*?(?P<enabled>(true|false))"
CDC_PREIMAGE_REGEXP = r"preimage.*?(?P<preimage>(full|false|true))"
CDC_POSTIMAGE_REGEXP = r"postimage.*?(?P<postimage>(true|false))"
CDC_TTL_REGEXP = r"ttl.*?(?P<ttl>\d+)"

CDC_SETTINGS_REGEXP = [CDC_ENABLED_REGEXP,
                       CDC_DELTA_REGEXP,
{'fraction_non_alphanumeric': 0.17247939124920736, 'fraction_numerical': 0.0063411540900443885, 'mean_word_length': 5.658227848101266, 'pattern_counts': {'":': 10, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4089173', 'n_tokens_mistral': 633, 'n_tokens_neox': 616, 'n_words': 104}