<commit_before># -*- coding: utf-8 -*-
import datetime
import time


def date_to_stamp(date):
    if not date:
        return date
    return time.mktime(date.timetuple())


def date_from_stamp(timestamp):
    if not timestamp:
        return timestamp
    return datetime.date.fromtimestamp(timestamp)


def datetime_from_stamp(timestamp):
    if not timestamp:
        return timestamp
    return datetime.datetime.fromtimestamp(timestamp)
<commit_msg>added datetime to timestamp func<commit_after># -*- coding: utf-8 -*-
import datetime
import time


def date_to_stamp(date):
    if not date:
        return date
    return time.mktime(date.timetuple())


def date_from_stamp(timestamp):
    if not timestamp:
        return timestamp
    return datetime.date.fromtimestamp(timestamp)


def datetime_to_stamp(dt):
    if not dt:
        return dt
    return time.mktime(dt.timetuple())


def datetime_from_stamp(timestamp):
    if not timestamp:
        return timestamp
    return datetime.datetime.fromtimestamp(timestamp)

{'fraction_non_alphanumeric': 0.08365758754863813, 'fraction_numerical': 0.0019455252918287938, 'mean_word_length': 3.360169491525424, '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': '4587119', 'n_tokens_mistral': 302, 'n_tokens_neox': 294, 'n_words': 81}