<commit_before># -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from dateutil.parser import parse as date_parse
from collections import OrderedDict

EVALUATION_POSITIVE = True
EVALUATION_NEGATIVE = False

THIS_MONTH_FILTER = 'This Month'
THIS_WEEK_FILTER = 'This Week'
TODAY_FILTER = 'Today'
ALL_FILTER = 'All'

FILTERS = OrderedDict([
    (TODAY_FILTER, 'get_num_days_today'),
    (THIS_WEEK_FILTER, 'get_num_days_week'),
    (THIS_MONTH_FILTER, 'get_num_days_month'),
    (ALL_FILTER, '')
])


class Event(object):
    """An event"""
    def __init__(self, date, evaluation=EVALUATION_POSITIVE):
        super(Event, self).__init__()
        self.date = date
        self.iso_date = date.isoformat()
        self.evaluation = evaluation

    def __unicode__(self):
        return "{}: {}".format(self.iso_date, self.evaluation)

    def __str__(self):
        return self.__unicode__()

    def save(self, store):
        print "saving %s" % unicode(self)
        store.put(self.iso_date, evaluation=self.evaluation)

    @classmethod
    def get_events(cls, store):
        events = []
        for key in store:<commit_msg>adding simple __repr__ for events (not really a repr, just repeating unicode xD )<commit_after># -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from dateutil.parser import parse as date_parse
from collections import OrderedDict

EVALUATION_POSITIVE = True
EVALUATION_NEGATIVE = False

THIS_MONTH_FILTER = 'This Month'
THIS_WEEK_FILTER = 'This Week'
TODAY_FILTER = 'Today'
ALL_FILTER = 'All'

FILTERS = OrderedDict([
    (TODAY_FILTER, 'get_num_days_today'),
    (THIS_WEEK_FILTER, 'get_num_days_week'),
    (THIS_MONTH_FILTER, 'get_num_days_month'),
    (ALL_FILTER, '')
])


class Event(object):
    """An event"""
    def __init__(self, date, evaluation=EVALUATION_POSITIVE):
        super(Event, self).__init__()
        self.date = date
        self.iso_date = date.isoformat()
        self.evaluation = evaluation

    def __unicode__(self):
        return "{}: {}".format(self.iso_date, self.evaluation)

    def __str__(self):
        return self.__unicode__()

    def __repr__(self):
        return self.__unicode__()

    def save(self, store):
        print "saving %s" % unicode(self)
        store.put(self.iso_date, evaluation=self.evaluation)

    @classmethod
    def get_events(cls, store):
        events = []
        for key in store:
{'fraction_non_alphanumeric': 0.11489008710078806, 'fraction_numerical': 0.0008295313148071339, 'mean_word_length': 3.5, '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': '1410323', 'n_tokens_mistral': 824, 'n_tokens_neox': 776, 'n_words': 184}