<commit_before>import sys
from datetime import datetime
from base64 import b64decode, b64encode

from gluon import current


def debug(msg):
    if current.DEBUG:
        sys.stderr(f"{msg}\n")


def isodt(dt=None):
    return (
        datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
        if dt is None
        else dt.strftime("%Y-%m-%dT%H:%M:%SZ")
    )


def delta(timeInterval):
    return f"{int(round(timeInterval * 100)) / 100} s"


def hebKey(x):
    return x.replace("שׁ", "ששׁ").replace("שׂ", "ששׂ")


def iEncode(qw, idpart, keywords=None, sep="|"):
    if qw == "n":
        return (
            b64encode((f"{idpart}|{keywords}").encode("utf8"))
            .decode("utf8")
            .replace("\n", "")
            .replace("=", "_")
        )<commit_msg>small fix in debugging messages<commit_after>import sys
from datetime import datetime
from base64 import b64decode, b64encode

from gluon import current


def debug(msg):
    if current.DEBUG:
        sys.stderr.write(f"{msg}\n")


def isodt(dt=None):
    return (
        datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
        if dt is None
        else dt.strftime("%Y-%m-%dT%H:%M:%SZ")
    )


def delta(timeInterval):
    return f"{int(round(timeInterval * 100)) / 100} s"


def hebKey(x):
    return x.replace("שׁ", "ששׁ").replace("שׂ", "ששׂ")


def iEncode(qw, idpart, keywords=None, sep="|"):
    if qw == "n":
        return (
            b64encode((f"{idpart}|{keywords}").encode("utf8"))
            .decode("utf8")
            .replace("\n", "")
            .replace("=", "_")
        )
{'fraction_non_alphanumeric': 0.18582375478927204, 'fraction_numerical': 0.020434227330779056, 'mean_word_length': 2.627314814814815, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '763425', 'n_tokens_mistral': 606, 'n_tokens_neox': 561, 'n_words': 116}