<commit_before>import datetime
from mongoengine import *

from meta import TIMEZONE


class Karma(Document):
    chat = IntField()
    from_user = IntField(default=0)
    to_user = IntField(default=0)

    amount = IntField()
    description = StringField()

    rollback = BooleanField()

    # Logging
    creation_date = DateTimeField(default=datetime.datetime.now)
    modified_date = DateTimeField(default=datetime.datetime.now)

    def save(self, *args, **kwargs):
        if not self.creation_date:
            self.creation_date = datetime.datetime.now(TIMEZONE)
        self.modified_date = datetime.datetime.now(TIMEZONE)
        return super(Karma, self).save(*args, **kwargs)<commit_msg>Provide transfering<commit_after>import datetime
from mongoengine import *

from meta import TIMEZONE


class Karma(Document):
    chat = IntField()
    from_user = IntField(default=0)
    to_user = IntField(default=0)

    amount = IntField()
    transfer = BooleanField()
    description = StringField()

    rollback = BooleanField()

    # Logging
    creation_date = DateTimeField(default=datetime.datetime.now)
    modified_date = DateTimeField(default=datetime.datetime.now)

    def save(self, *args, **kwargs):
        if not self.creation_date:
            self.creation_date = datetime.datetime.now(TIMEZONE)
        self.modified_date = datetime.datetime.now(TIMEZONE)
        return super(Karma, self).save(*args, **kwargs)
{'fraction_non_alphanumeric': 0.10236768802228412, 'fraction_numerical': 0.002785515320334262, 'mean_word_length': 3.6807817589576546, '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': '604299', 'n_tokens_mistral': 433, 'n_tokens_neox': 415, 'n_words': 88}