<commit_before>import dateutil.parser
from datetime import datetime
import pytz


Brussels = pytz.timezone('Europe/Brussels')


def parse_time(obj):
    if isinstance(obj, str):
        obj = dateutil.parser.parse(obj)
    elif isinstance(obj, int) or isinstance(obj, float):
        obj = datetime.fromtimestamp(obj)

    if obj.tzname():
        tt = obj.astimezone(Brussels).timetuple()[:6]
        obj = datetime(*tt)
    return obj


def make_style(before, after='\x0F'):
    if after is None:
        after = before

    def inner(*args):
        text = ''.join(map(str, args))
        return '{}{}{}'.format(before, text, after)
    return inner

<commit_msg>[fix] Color bug with digits<commit_after>import dateutil.parser
from datetime import datetime
import pytz


Brussels = pytz.timezone('Europe/Brussels')


def parse_time(obj):
    if isinstance(obj, str):
        obj = dateutil.parser.parse(obj)
    elif isinstance(obj, int) or isinstance(obj, float):
        obj = datetime.fromtimestamp(obj)

    if obj.tzname():
        tt = obj.astimezone(Brussels).timetuple()[:6]
        obj = datetime(*tt)
    return obj


def make_style(before, after='\x0F'):
    if after is None:
        after = before

    def inner(*args):
        text = ''.join(map(str, args))
        if text[0].isdigit():
            text = " " + text
        return '{}{}{}'.format(before, text, after)
    return inner


{'fraction_non_alphanumeric': 0.1337126600284495, 'fraction_numerical': 0.0035561877667140826, 'mean_word_length': 2.8653846153846154, 'pattern_counts': {'":': 0, '<': 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': '3984953', 'n_tokens_mistral': 461, 'n_tokens_neox': 441, 'n_words': 114}