<commit_before>from __future__ import unicode_literals
from django.db import models
from django.core.validators import RegexValidator
import re

# class DataSeriesField(models.Model):
#     fieldname = models.CharField(db_column='FieldName', max_length=128, primary_key=True)
#
#     class Meta:
#         managed = False
#         db_table = 'DataSeriesFields'


class SearchFacet(models.Model):
    keyfield = models.CharField(max_length=128)
    namefields = models.CharField(max_length=128, validators=[
        RegexValidator(
            regex=re.compile(r"^\w+(,\w+)*$"),
            message=u'Value must be a comma separated value.',
            code='invalid_values'
        ),
    ])
    name = models.CharField(max_length=255)

    def __unicode__(self):
        return self.name


class SourcesDataService(models.Model):
    sourcedataserviceid = models.IntegerField(db_column='SourceDataServiceID', primary_key=True)
    servicename = models.CharField(db_column='ServiceName', max_length=255)
    servicedescription = models.CharField(db_column='ServiceDescription', max_length=500)
    serviceurl = models.CharField(db_column='ServiceURL', max_length=500)
    sourcenetworkname = models.CharField(db_column='SourceNetworkName', max_length=255)

    class Meta:
        managed = False
        db_table = 'SourceDataServices'


class DataSeries(models.Model):
    seriesid = models.IntegerField(db_column='SeriesID', primary_key=True)
    sourcedataserviceid = models.IntegerField(db_column='SourceDataServiceID')
    network = models.CharField(db_column='Network', max_length=50)
    sitecode = models.CharField(db_column='SiteCode', max_length=50)
    sitename = models.CharField(db_column='SiteName', max_length=500)
    latitude = models.FloatField(db_column='Latitude')
    longitude = models.FloatField(db_column='Longitude')
    state = models.CharField(db_column='State', max_length=50, blank=True)
    county = models.CharField(db_column='County', max_length=50, blank=True)
    sitetype = models.CharField(db_column='SiteType', max_length=50)
    variablecode = models.CharField(db_column='VariableCode', max_length=50)
    variablename = models.CharField(db_column='VariableName', max_length=255)
    methoddescription = models.CharField(db_column='MethodDescription', max_length=500)
    variableunitsname = models.CharField(db_column='VariableUnitsName', max_length=255)
    variableunitstype = models.CharField(db_column='VariableUnitsType', max_length=50)
    variableunitsabbreviation = models.CharField(db_column='VariableUnitsAbbreviation', max_length=50)
    samplemedium = models.CharField(db_column='SampleMedium', max_length=50)
    valuetype = models.CharField(db_column='ValueType', max_length=50)
    datatype = models.CharField(db_column='DataType', max_length=50)
    generalcategory = models.CharField(db_column='GeneralCategory', max_length=50)
    timesupport = models.FloatField(db_column='TimeSupport')
    timesupportunitsname = models.CharField(db_column='TimeSupportUnitsName', max_length=500)
    timesupportunitstype = models.CharField(db_column='TimeSupportUnitsType', max_length=50)
    timesupportunitsabbreviation = models.CharField(db_column='TimeSupportUnitsAbbreviation', max_length=50)
    qualitycontrollevelcode = models.CharField(db_column='QualityControlLevelCode', max_length=50)
    qualitycontrolleveldefinition = models.CharField(db_column='QualityControlLevelDefinition', max_length=500)
    qualitycontrollevelexplanation = models.CharField(db_column='QualityControlLevelExplanation', max_length=500, blank=True)
    sourceorganization = models.CharField(db_column='SourceOrganization', max_length=255)
    souredescription = models.CharField(db_column='SoureDescription', max_length=500)
    begindatetime = models.DateTimeField(db_column='BeginDateTime')
    enddatetime = models.DateTimeField(db_column='EndDateTime')
    utcoffset = models.IntegerField(db_column='UTCOffset')
    numberobservations = models.IntegerField(db_column='NumberObservations')
    datelastupdated = models.DateTimeField(db_column='DateLastUpdated')<commit_msg>Fixed typo in one of the Dataseries attributes.<commit_after>from __future__ import unicode_literals
from django.db import models
from django.core.validators import RegexValidator
import re

# class DataSeriesField(models.Model):
#     fieldname = models.CharField(db_column='FieldName', max_length=128, primary_key=True)
#
#     class Meta:
#         managed = False
#         db_table = 'DataSeriesFields'


class SearchFacet(models.Model):
    keyfield = models.CharField(max_length=128)
    namefields = models.CharField(max_length=128, validators=[
        RegexValidator(
            regex=re.compile(r"^\w+(,\w+)*$"),
            message=u'Value must be a comma separated value.',
            code='invalid_values'
        ),
    ])
    name = models.CharField(max_length=255)

    def __unicode__(self):
        return self.name


class SourcesDataService(models.Model):
    sourcedataserviceid = models.IntegerField(db_column='SourceDataServiceID', primary_key=True)
    servicename = models.CharField(db_column='ServiceName', max_length=255)
    servicedescription = models.CharField(db_column='ServiceDescription', max_length=500)
    serviceurl = models.CharField(db_column='ServiceURL', max_length=500)
    sourcenetworkname = models.CharField(db_column='SourceNetworkName', max_length=255)

    class Meta:
        managed = False
        db_table = 'SourceDataServices'


class DataSeries(models.Model):
    seriesid = models.IntegerField(db_column='SeriesID', primary_key=True)
    sourcedataserviceid = models.IntegerField(db_column='SourceDataServiceID')
    network = models.CharField(db_column='Network', max_length=50)
    sitecode = models.CharField(db_column='SiteCode', max_length=50)
    sitename = models.CharField(db_column='SiteName', max_length=500)
    latitude = models.FloatField(db_column='Latitude')
    longitude = models.FloatField(db_column='Longitude')
    state = models.CharField(db_column='State', max_length=50, blank=True)
    county = models.CharField(db_column='County', max_length=50, blank=True)
    sitetype = models.CharField(db_column='SiteType', max_length=50)
    variablecode = models.CharField(db_column='VariableCode', max_length=50)
    variablename = models.CharField(db_column='VariableName', max_length=255)
    methoddescription = models.CharField(db_column='MethodDescription', max_length=500)
    variableunitsname = models.CharField(db_column='VariableUnitsName', max_length=255)
    variableunitstype = models.CharField(db_column='VariableUnitsType', max_length=50)
    variableunitsabbreviation = models.CharField(db_column='VariableUnitsAbbreviation', max_length=50)
    samplemedium = models.CharField(db_column='SampleMedium', max_length=50)
    valuetype = models.CharField(db_column='ValueType', max_length=50)
    datatype = models.CharField(db_column='DataType', max_length=50)
    generalcategory = models.CharField(db_column='GeneralCategory', max_length=50)
    timesupport = models.FloatField(db_column='TimeSupport')
    timesupportunitsname = models.CharField(db_column='TimeSupportUnitsName', max_length=500)
    timesupportunitstype = models.CharField(db_column='TimeSupportUnitsType', max_length=50)
    timesupportunitsabbreviation = models.CharField(db_column='TimeSupportUnitsAbbreviation', max_length=50)
    qualitycontrollevelcode = models.CharField(db_column='QualityControlLevelCode', max_length=50)
    qualitycontrolleveldefinition = models.CharField(db_column='QualityControlLevelDefinition', max_length=500)
    qualitycontrollevelexplanation = models.CharField(db_column='QualityControlLevelExplanation', max_length=500, blank=True)
    sourceorganization = models.CharField(db_column='SourceOrganization', max_length=255)
    sourcedescription = models.CharField(db_column='SourceDescription', max_length=500)
    begindatetime = models.DateTimeField(db_column='BeginDateTime')
    enddatetime = models.DateTimeField(db_column='EndDateTime')
    utcoffset = models.IntegerField(db_column='UTCOffset')
    numberobservations = models.IntegerField(db_column='NumberObservations')
    datelastupdated = models.DateTimeField(db_column='DateLastUpdated')
{'fraction_non_alphanumeric': 0.10651963160445953, 'fraction_numerical': 0.019631604459524964, 'mean_word_length': 6.207860262008734, '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': '789595', 'n_tokens_mistral': 2568, 'n_tokens_neox': 2438, 'n_words': 346}