<commit_before># __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__

import datetime

from django.db import models

# Create your models here.
PRIORITY_CHOICES = (
        (0, '0'),
        (1, '1'),
        (2, '2'),
        (3, '3'),
        (4, '4'),
        (5, '5'),
        (6, '6'),
        (7, '7'),
        (8, '8'),
        (9, '9'),
    )

class StatusboardAnnouncement(models.Model):
    id = models.IntegerField(primary_key=True)
    priority = models.IntegerField(null=True, blank=True, 
                                   choices=PRIORITY_CHOICES,
                                   default=5,
                                   verbose_name='Priority (higher values are more important)')
    visible = models.BooleanField(null=False, blank=True, default=True)
    dateCreated = models.DateTimeField(null=True, db_column='dateCreated', 
                                       blank=True, auto_now_add=True, editable=False)
    content = models.CharField(max_length=765, blank=True)
    class Meta:
        db_table = u'xgds_status_board_announcement'
        verbose_name = "Announcement"
    def __unicode__(self):
        return "%s: %s" % (self.dateCreated, self.content)

def midnightThisMorning():
    return datetime.datetime.now().replace(hour=0, minute=0, second=0)

class StatusboardEvent(models.Model):
    id = models.IntegerField(primary_key=True)
    priority = models.IntegerField(null=True, blank=True,
                                   choices=PRIORITY_CHOICES,
                                   default=5,
                                   verbose_name='Priority (higher values are more important)'
                                   )
    visible = models.BooleanField(null=False, blank=True, default=True)
    completed = models.BooleanField(null=False, blank=True)
    dateCreated = models.DateTimeField(null=True, db_column='dateCreated',
                                       blank=True, auto_now_add=True, editable=False) 
    dateOfEvent = models.DateTimeField(null=True, db_column='dateOfEvent',
                                       blank=True, default=midnightThisMorning)
    content = models.CharField(max_length=765, blank=True)
    class Meta:
        db_table = u'xgds_status_board_event'
        verbose_name = "Event"
    def __unicode__(self):
        return "%s: %s" % (self.dateOfEvent, self.content)

class StatusboardPlanStatus(models.Model):
    id = models.IntegerField(primary_key=True)
    timestamp = models.DateTimeField(null=True)
    keyword = models.CharField(max_length=64, blank=True)
    value = models.CharField(max_length=196, blank=True)
    class Meta:
        db_table = u'StatusBoard_Plan_Status'
        verbose_name = "PlanStatus"
    def __unicode__(self):
        return "%s: %s (%s)" % (self.keyword, self.value, self.timestamp)<commit_msg>Comment out plan status model for now.  Should probably be moved elsewhere, but is currently unused.<commit_after># __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__

import datetime

from django.db import models

# Create your models here.
PRIORITY_CHOICES = (
        (0, '0'),
        (1, '1'),
        (2, '2'),
        (3, '3'),
        (4, '4'),
        (5, '5'),
        (6, '6'),
        (7, '7'),
        (8, '8'),
        (9, '9'),
    )

class StatusboardAnnouncement(models.Model):
    id = models.IntegerField(primary_key=True)
    priority = models.IntegerField(null=True, blank=True, 
                                   choices=PRIORITY_CHOICES,
                                   default=5,
                                   verbose_name='Priority (higher values are more important)')
    visible = models.BooleanField(null=False, blank=True, default=True)
    dateCreated = models.DateTimeField(null=True, db_column='dateCreated', 
                                       blank=True, auto_now_add=True, editable=False)
    content = models.CharField(max_length=765, blank=True)
    class Meta:
        db_table = u'xgds_status_board_announcement'
        verbose_name = "Announcement"
    def __unicode__(self):
        return "%s: %s" % (self.dateCreated, self.content)

def midnightThisMorning():
    return datetime.datetime.now().replace(hour=0, minute=0, second=0)

class StatusboardEvent(models.Model):
    id = models.IntegerField(primary_key=True)
    priority = models.IntegerField(null=True, blank=True,
                                   choices=PRIORITY_CHOICES,
                                   default=5,
                                   verbose_name='Priority (higher values are more important)'
                                   )
    visible = models.BooleanField(null=False, blank=True, default=True)
    completed = models.BooleanField(null=False, blank=True)
    dateCreated = models.DateTimeField(null=True, db_column='dateCreated',
                                       blank=True, auto_now_add=True, editable=False) 
    dateOfEvent = models.DateTimeField(null=True, db_column='dateOfEvent',
                                       blank=True, default=midnightThisMorning)
    content = models.CharField(max_length=765, blank=True)
    class Meta:
        db_table = u'xgds_status_board_event'
        verbose_name = "Event"
    def __unicode__(self):
        return "%s: %s" % (self.dateOfEvent, self.content)

#
# Note -- was intended for K10 plan status monitoring.  Should probably
# be moved to Kn specific repository.
#
# class StatusboardPlanStatus(models.Model):
#     id = models.IntegerField(primary_key=True)
#     timestamp = models.DateTimeField(null=True)
#     keyword = models.CharField(max_length=64, blank=True)
#     value = models.CharField(max_length=196, blank=True)
#     class Meta:
#         db_table = u'StatusBoard_Plan_Status'
#         verbose_name = "PlanStatus"
#     def __unicode__(self):
#         return "%s: %s (%s)" % (self.keyword, self.value, self.timestamp)
{'fraction_non_alphanumeric': 0.10848062266904492, 'fraction_numerical': 0.014593805740230259, 'mean_word_length': 2.4554621848739497, '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': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3488206', 'n_tokens_mistral': 1839, 'n_tokens_neox': 1748, 'n_words': 386}