<commit_before># -*- coding: utf-8 -*-

from django.db import models
import datetime
import decimal
from django.db import transaction
from django.conf import settings
from django.core.exceptions import ValidationError
from django.utils.encoding import force_unicode

class Gsb_exc(Exception):
    pass

class Ex_jumelle_neant(Exception):
    pass

#import logging
#definition d'un moneyfield
class CurField(models.DecimalField):
    """
    un champ decimal mais defini pour les monnaies
    """
    description = "A Monetary value"
    __metaclass__ = models.SubfieldBase
    def __init__(self, verbose_name = None, name = None, max_digits = 15, decimal_places = 3, default = 0.000, **kwargs):
        super(CurField, self).__init__(verbose_name, name, max_digits, decimal_places, default = default, **kwargs)
    def get_internal_type(self):
        return "DecimalField"
    def __mul(self,other):
        return decimal.Decimal(self)*decimal.Decimal(other)

class Tiers(models.Model):
    """
    un tiers, c'est a dire une personne ou un titre
    pour les titres, c'est remplis dans le champ note avec TYPE@ISIN
    """

    nom = models.CharField(max_length = 40, unique = True)
    notes = models.TextField(blank = True, default = '')
    is_titre = models.BooleanField(default = False)
<commit_msg>correction bug subfield<commit_after># -*- coding: utf-8 -*-

from django.db import models
import datetime
import decimal
from django.db import transaction
from django.conf import settings
from django.core.exceptions import ValidationError
from django.utils.encoding import force_unicode

class Gsb_exc(Exception):
    pass

class Ex_jumelle_neant(Exception):
    pass

#import logging
#definition d'un moneyfield
class CurField(models.DecimalField):
    """
    un champ decimal mais defini pour les monnaies
    """
    description = "A Monetary value"
   # __metaclass__ = models.SubfieldBase # ca marche pas chez always data
    def __init__(self, verbose_name = None, name = None, max_digits = 15, decimal_places = 3, default = 0.000, **kwargs):
        super(CurField, self).__init__(verbose_name, name, max_digits, decimal_places, default = default, **kwargs)
    def get_internal_type(self):
        return "DecimalField"
    def __mul(self,other):
        return decimal.Decimal(self)*decimal.Decimal(other)

class Tiers(models.Model):
    """
    un tiers, c'est a dire une personne ou un titre
    pour les titres, c'est remplis dans le champ note avec TYPE@ISIN
    """

    nom = models.CharField(max_length = 40, unique = True)
    notes = models.TextField(blank = True, default = '')
    is_titre = models.BooleanField(default = False)

{'fraction_non_alphanumeric': 0.09556057185854025, 'fraction_numerical': 0.007524454477050414, 'mean_word_length': 3.9981203007518795, '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': '1400640', 'n_tokens_mistral': 812, 'n_tokens_neox': 787, 'n_words': 244}