<commit_before>import os.path
import sys

import calendar, datetime

def month_date_range(date):
    year, month = date.year, date.month
    return datetime.date(year, month, 1), datetime.date(year, month, calendar.monthrange(year, month)[1])

class SortedDict(dict):
    """
    A dictionary that keeps its keys in the order in which they're inserted.
    """
    def __init__(self, data=None):<commit_msg>привденение даты к дате/времени<commit_after>import os.path
import sys

import calendar, datetime

def month_date_range(date):
    year, month = date.year, date.month
    return datetime.date(year, month, 1), datetime.date(year, month, calendar.monthrange(year, month)[1])

def normalize_date(date):
    if isinstance(date, datetime.date):
        return datetime.datetime.combine(date, datetime.time())
    
    return date

class SortedDict(dict):
    """
    A dictionary that keeps its keys in the order in which they're inserted.
    """
    def __init__(self, data=None):
{'fraction_non_alphanumeric': 0.11077235772357724, 'fraction_numerical': 0.0040650406504065045, 'mean_word_length': 4.157068062827225, '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': '2601698', 'n_tokens_mistral': 303, 'n_tokens_neox': 299, 'n_words': 90}