Ejemplo n.º 1
0
class ModelStats(models.Base):
  trust = fields.FloatField(required=True)
  precision = fields.FloatField(required=True)
  recall = fields.FloatField(required=True)
  
  @staticmethod
  def build(json):
    return ModelStats(
      trust = json["trust"],
      precision = json["precision"],
      recall = json["recall"]
    )
Ejemplo n.º 2
0
class Settings(models.Base):
    updated_at = fields.StringField(required=True)
    created_at = fields.StringField(required=True)
    humidity_min = fields.FloatField(required=True, default=50)
    humidity_max = fields.FloatField(required=True, default=60)
    temperature_min = fields.FloatField(required=True, default=36)
    temperature_max = fields.FloatField(required=True, default=42)
    incubation_days = fields.IntField(required=True, default=26)
    tilting_interval = fields.FloatField(required=True, default=4)
    heater = fields.BoolField(required=True, default=False)
    heater_fan_motor = fields.BoolField(required=True, default=False)
    humidifier = fields.BoolField(required=True, default=False)
    humidifier_fan_motor = fields.BoolField(required=True, default=False)
    type = fields.StringField(required=True, default="settings")
Ejemplo n.º 3
0
    class Person(models.Base):

        name = fields.StringField(required=True)
        surname = fields.StringField(required=True)
        age = fields.IntField()
        cash = fields.FloatField()
        extra = fields.DictField()
Ejemplo n.º 4
0
    class Person(models.Base):

        name = fields.StringField(required=True)
        surname = fields.StringField(required=True)
        age = fields.IntField()
        cash = fields.FloatField()
        meta = fields.GenericField()
    class Person(models.Base):

        name = fields.StringField()
        surname = fields.StringField()
        age = fields.IntField()
        cash = fields.FloatField()
        extra_data = fields.DictField()
Ejemplo n.º 6
0
    class Person(models.Base):

        name = fields.StringField(required=True,
                                  validators=[validator1, validator2])
        surname = fields.StringField(required=True)
        age = fields.IntField(validators=validator3)
        cash = fields.FloatField()
Ejemplo n.º 7
0
class PortPair(mf.ModelBase, mixins.BasicEvents, mixins.Topic, mixins.Name):
    table_name = 'sfc_portpair'

    ingress_port = df_fields.ReferenceField(l2.LogicalPort)
    egress_port = df_fields.ReferenceField(l2.LogicalPort)
    correlation_mechanism = df_fields.EnumField([CORR_NONE, CORR_MPLS])
    weight = fields.FloatField()
Ejemplo n.º 8
0
class ProviderStats(models.Base):
  trust = fields.FloatField(required=True)
  
  @staticmethod
  def build(json):
    return ProviderStats(
      trust = json["trust"]
    )
 class Person(models.Base):
     name = fields.StringField(default=default_name)
     age = fields.IntField(default=default_age)
     height = fields.FloatField(default=default_height)
     job = fields.EmbeddedField(Job, default=default_job)
     hobbies = fields.ListField(items_types=str, default=default_hobbies)
     last_ate = fields.TimeField(default=default_last_ate)
     birthday = fields.DateField(default=default_birthday)
     time_of_death = fields.DateTimeField(default=default_time_of_death)
Ejemplo n.º 10
0
class GWASDetails(models.Base):
    gwas_symbol = fields.StringField(help_text="GWAS symbol",
                                     required=False,
                                     nullable=True)
    date = fields.StringField(help_text="Date", required=False, nullable=True)
    study = fields.StringField(help_text="Study",
                               required=False,
                               nullable=True)
    disease_or_trait = fields.StringField(help_text="Disease or trait",
                                          required=False,
                                          nullable=True)
    mapped_traits = fields.ListField(items_types=(str, ),
                                     help_text="Mapped trait",
                                     required=False,
                                     nullable=True)
    mapped_trait_urls = fields.ListField(items_types=(str, ),
                                         help_text="Mapped trait URL",
                                         required=False,
                                         nullable=True)
    strongest_snp_risk_allele = fields.StringField(
        help_text="Strongest SNP risk allele", required=False, nullable=True)
    odds_ratio = fields.FloatField(help_text="Odds ratio",
                                   required=False,
                                   nullable=True)
    p_value = fields.StringField(help_text="p value",
                                 required=False,
                                 nullable=True)
    confidence_range_95_low = fields.FloatField(
        help_text="Confidence range 95% low", required=False, nullable=True)
    confidence_range_95_high = fields.FloatField(
        help_text="Confidence range 95% high", required=False, nullable=True)
    confidence_comment = fields.StringField(help_text="Confidence comment",
                                            required=False,
                                            nullable=True)
    initial_sample_size = fields.StringField(help_text="Initial sample size",
                                             required=False,
                                             nullable=True)
    replication_sample_size = fields.StringField(
        help_text="Replication sample size", required=False, nullable=True)
    pub_med_references = fields.ListField(items_types=(int, ),
                                          help_text="PubMed References",
                                          required=False,
                                          nullable=True)
Ejemplo n.º 11
0
class Publisher(mf.ModelBase, mixins.Name):
    table_name = 'publisher'
    uri = fields.StringField()
    last_activity_timestamp = fields.FloatField()

    def is_stale(self):
        timeout = conf.CONF.df.publisher_timeout
        return (time.time() - self.last_activity_timestamp) > timeout

    @classmethod
    def on_get_all_post(self, instances):
        return [o for o in instances if not o.is_stale()]
Ejemplo n.º 12
0
class TestingModel(Model):
    __tablename__ = "testing"

    name = fields.StringField()
    key = fields.StringField()
    created_at = fields.FloatField()

    # this attribute wont be saved because it's not a field
    address = "this attribute will not be saved"

    @property
    def location(self):
        return "Earth"

    def created_at_datetime(self):
        return datetime.fromtimestamp(self.created_at).isoformat()
Ejemplo n.º 13
0
class Attachment(models.Base):

    fallback = fields.StringField(required=True)
    color = fields.StringField(nullable=True)
    pretext = fields.StringField(required=False)
    fallback = fields.StringField(required=True)
    color = fields.StringField(required=True)
    pretext = fields.StringField(required=False)
    author_name = fields.StringField(required=True)
    author_icon = fields.StringField(nullable=True)
    title = fields.StringField(required=True)
    title_link = fields.StringField(required=True)
    color = fields.StringField(required=True)
    text = fields.StringField(required=False)
    image_url = fields.StringField(required=False)
    thumb_url = fields.StringField(required=False)
    footer_icon = fields.StringField(required=False)
    footer = fields.StringField(required=False)
    ts = fields.FloatField(required=False)
    fields = fields.ListField([Fields], required=False)
Ejemplo n.º 14
0
    class Laptop(models.Base):

        name = fields.StringField()
        battery_voltage = fields.FloatField()
Ejemplo n.º 15
0
    class Viper(models.Base):

        brand = fields.StringField()
        capacity = fields.FloatField()
Ejemplo n.º 16
0
    class Lamborghini(models.Base):

        brand = fields.StringField()
        velocity = fields.FloatField()
Ejemplo n.º 17
0
class HouseholdGeneral(BaseModel):
    number_people = fields.FloatField()
    start_time = fields.StringField()
    end_time = fields.StringField()
    latitude = fields.FloatField()
    longitude = fields.FloatField()
Ejemplo n.º 18
0
class Car(models.Base):

    registration_number = fields.StringField(required=True)
    engine_capacity = fields.FloatField()
    color = fields.StringField()
Ejemplo n.º 19
0
class File(models.Base):

    name = fields.StringField()
    size = fields.FloatField()
Ejemplo n.º 20
0
class ExAC(models.Base):
    version = fields.StringField(help_text="Version")
    ac = fields.IntField(help_text="Allele Count",
                         required=False,
                         nullable=True)
    an = fields.IntField(help_text="Allele Number",
                         required=False,
                         nullable=True)
    ac_adj = fields.FloatField(help_text="Allele Count",
                               required=False,
                               nullable=True)
    an_adj = fields.FloatField(help_text="Allele Number",
                               required=False,
                               nullable=True)
    af = fields.FloatField(help_text="Allele Frequency",
                           required=False,
                           nullable=True)
    ac_afr = fields.IntField(help_text="Allele Count African",
                             required=False,
                             nullable=True)
    ac_amr = fields.IntField(help_text="Allele Count American",
                             required=False,
                             nullable=True)
    ac_asj = fields.IntField(help_text="Allele Count Ashkenazi Jewish",
                             required=False,
                             nullable=True)
    ac_eas = fields.IntField(help_text="Allele Count East Asian",
                             required=False,
                             nullable=True)
    ac_fin = fields.IntField(help_text="Allele Count European (Finnish)",
                             required=False,
                             nullable=True)
    ac_nfe = fields.IntField(help_text="Allele Count European (Non-Finnish)",
                             required=False,
                             nullable=True)
    ac_oth = fields.IntField(help_text="Allele Count Other",
                             required=False,
                             nullable=True)
    ac_sas = fields.IntField(help_text="Allele Count South Asian",
                             required=False,
                             nullable=True)
    ac_male = fields.IntField(help_text="Allele Count Male",
                              required=False,
                              nullable=True)
    ac_female = fields.IntField(help_text="Allele Count Female",
                                required=False,
                                nullable=True)
    hom = fields.IntField(help_text="Number of Homozygotes",
                          required=False,
                          nullable=True)
    hemi = fields.IntField(help_text="Number of Hemizygotes",
                           required=False,
                           nullable=True)
    ac_hom = fields.FloatField(help_text="Number of Homozygotes",
                               required=False,
                               nullable=True)
    ac_hemi = fields.FloatField(help_text="Number of Hemizygotes",
                                required=False,
                                nullable=True)
    an_afr = fields.IntField(help_text="Allele Number African",
                             required=False,
                             nullable=True)
    an_amr = fields.IntField(help_text="Allele Number American",
                             required=False,
                             nullable=True)
    an_asj = fields.IntField(help_text="Allele Number Ashkenazi Jewish",
                             required=False,
                             nullable=True)
    an_eas = fields.IntField(help_text="Allele Number East Asian",
                             required=False,
                             nullable=True)
    an_fin = fields.IntField(help_text="Allele Number European (Finnish)",
                             required=False,
                             nullable=True)
    an_nfe = fields.IntField(help_text="Allele Number European (Non-Finnish)",
                             required=False,
                             nullable=True)
    an_oth = fields.IntField(help_text="Allele Number Other",
                             required=False,
                             nullable=True)
    an_sas = fields.IntField(help_text="Allele Number South Asian",
                             required=False,
                             nullable=True)
    an_male = fields.IntField(help_text="Allele Number Male",
                              required=False,
                              nullable=True)
    an_female = fields.IntField(help_text="Allele Number Female",
                                required=False,
                                nullable=True)
    hom_afr = fields.IntField(help_text="Number of Homozygotes African",
                              required=False,
                              nullable=True)
    hom_amr = fields.IntField(help_text="Number of Homozygotes American",
                              required=False,
                              nullable=True)
    hom_asj = fields.IntField(
        help_text="Number of Homozygotes Ashkenazi Jewish",
        required=False,
        nullable=True)
    hom_eas = fields.IntField(help_text="Number of Homozygotes East Asian",
                              required=False,
                              nullable=True)
    hom_fin = fields.IntField(
        help_text="Number of Homozygotes European (Finnish)",
        required=False,
        nullable=True)
    hom_nfe = fields.IntField(
        help_text="Number of Homozygotes European (Non-Finnish)",
        required=False,
        nullable=True)
    hom_oth = fields.IntField(help_text="Number of Homozygotes Other",
                              required=False,
                              nullable=True)
    hom_sas = fields.IntField(help_text="Number of Homozygotes South Asian",
                              required=False,
                              nullable=True)
    hom_male = fields.IntField(help_text="Number of Homozygotes Male",
                               required=False,
                               nullable=True)
    hom_female = fields.IntField(help_text="Number of Homozygotes Female",
                                 required=False,
                                 nullable=True)
    hemi_afr = fields.IntField(help_text="Number of Hemizygotes African",
                               required=False,
                               nullable=True)
    hemi_amr = fields.IntField(help_text="Number of Hemizygotes American",
                               required=False,
                               nullable=True)
    hemi_asj = fields.IntField(
        help_text="Number of Hemizygotes Ashkenazi Jewish",
        required=False,
        nullable=True)
    hemi_eas = fields.IntField(help_text="Number of Hemizygotes East Asian",
                               required=False,
                               nullable=True)
    hemi_fin = fields.IntField(
        help_text="Number of Hemizygotes European (Finnish)",
        required=False,
        nullable=True)
    hemi_nfe = fields.IntField(
        help_text="Number of Hemizygotes European (Non-Finnish)",
        required=False,
        nullable=True)
    hemi_oth = fields.IntField(help_text="Number of Hemizygotes Other",
                               required=False,
                               nullable=True)
    hemi_sas = fields.IntField(help_text="Number of Hemizygotes South Asian",
                               required=False,
                               nullable=True)
    af_afr = fields.FloatField(help_text="Allele Frequency African",
                               required=False,
                               nullable=True)
    af_amr = fields.FloatField(help_text="Allele Frequency American",
                               required=False,
                               nullable=True)
    af_asj = fields.FloatField(help_text="Allele Frequency Ashkenazi Jewish",
                               required=False,
                               nullable=True)
    af_eas = fields.FloatField(help_text="Allele Frequency East Asian",
                               required=False,
                               nullable=True)
    af_fin = fields.FloatField(help_text="Allele Frequency European (Finnish)",
                               required=False,
                               nullable=True)
    af_nfe = fields.FloatField(
        help_text="Allele Frequency European (Non-Finnish)",
        required=False,
        nullable=True)
    af_oth = fields.FloatField(help_text="Allele Frequency Other",
                               required=False,
                               nullable=True)
    af_sas = fields.FloatField(help_text="Allele Frequency South Asian",
                               required=False,
                               nullable=True)
    af_male = fields.FloatField(help_text="Allele Frequency Male",
                                required=False,
                                nullable=True)
    af_female = fields.FloatField(help_text="Allele Frequency Female",
                                  required=False,
                                  nullable=True)
Ejemplo n.º 21
0
class DannSNVs(models.Base):
    version = fields.StringField(help_text="Version")
    dann_score = fields.FloatField(help_text="DANN Score",
                                   required=False,
                                   nullable=True)
Ejemplo n.º 22
0
    class Person(models.Base):

        name = fields.StringField()
        age = fields.IntField()
        cash = fields.FloatField()
        children = fields.ListField()
Ejemplo n.º 23
0
class CosmicLicensedDetails(models.Base):
    entry_type = fields.StringField(help_text="Entry type",
                                    required=False,
                                    nullable=True)
    cosmic_id = fields.ListField(items_types=(
        str,
        dict,
    ),
                                 help_text="Cosmic ID",
                                 required=False,
                                 nullable=True)
    pub_med_references = fields.ListField(items_types=(int, ),
                                          help_text="PUBMED References",
                                          required=False,
                                          nullable=True)
    histology_freq = fields.ListField(items_types=(int, str, float),
                                      help_text="Histology frequency",
                                      required=False,
                                      nullable=True)
    genome_wide_screen_freq = fields.ListField(items_types=(int, str, float),
                                               help_text="Histology frequency",
                                               required=False,
                                               nullable=True)
    loh_freq = fields.ListField(items_types=(int, str, float),
                                help_text="LOH frequency",
                                required=False,
                                nullable=True)
    age_freq = fields.ListField(items_types=(int, str, float),
                                help_text="Age frequency",
                                required=False,
                                nullable=True)
    zygosity_freq = fields.ListField(items_types=(int, str, float),
                                     help_text="Zygosity frequency",
                                     required=False,
                                     nullable=True)
    tumour_origin_freq = fields.ListField(
        items_types=(
            int,
            str,
            float,
        ),
        help_text="Tumour original frequency",
        required=False,
        nullable=True)
    somatic_status_freq = fields.ListField(
        items_types=(int, str, float),
        help_text="Somatic status frequency",
        required=False,
        nullable=True)
    primary_site_freq = fields.ListField(items_types=(int, str, float),
                                         help_text="Primary site frequency",
                                         required=False,
                                         nullable=True)
    description = fields.ListField(items_types=(str, ),
                                   help_text="Description",
                                   required=False,
                                   nullable=True)
    accession_number = fields.ListField(items_types=(str, ),
                                        help_text="Accession number",
                                        required=False,
                                        nullable=True)
    fathmm_prediction = fields.StringField(help_text="FATHMM prediction",
                                           required=False,
                                           nullable=True)
    fathmm_score = fields.FloatField(help_text="FATHMM score",
                                     required=False,
                                     nullable=True)
    num_entries = fields.IntField(help_text="Number of entries",
                                  required=False,
                                  nullable=True)
    num_samples = fields.IntField(help_text="Number of samples",
                                  required=False,
                                  nullable=True)
    gene = fields.ListField(items_types=(str, ),
                            help_text="Gene",
                            required=False,
                            nullable=True)

    fathmm_mkl_coding_score = fields.FloatField(
        help_text="FATHMM_MKL coding score", required=False, nullable=True)
    fathmm_mkl_coding_groups = fields.StringField(
        help_text="FATHMM_MKL coding groups", required=False, nullable=True)
    fathmm_mkl_non_coding_score = fields.FloatField(
        help_text="FATHMM_MKL non coding score", required=False, nullable=True)
    fathmm_mkl_non_coding_groups = fields.StringField(
        help_text="FATHMM_MKL non coding groups",
        required=False,
        nullable=True)
    whole_exome_freq = fields.ListField(items_types=(
        str,
        int,
        float,
    ),
                                        help_text="Whole exome frequency",
                                        required=False,
                                        nullable=True)
    whole_genome_reseq_freq = fields.ListField(
        items_types=(
            str,
            int,
            float,
        ),
        help_text="Whole genome reseq frequency",
        required=False,
        nullable=True)

    resistance_mutation = fields.ListField(items_types=(str, ),
                                           help_text="Resistance mutation",
                                           required=False,
                                           nullable=True)
    drug_entries = fields.ListField(items_types=(CosmicLicensedDrugEntry, ),
                                    help_text="Drug entries",
                                    required=False,
                                    nullable=True)
Ejemplo n.º 24
0
class GroupKeyShortLabel(models.Base):
    sequenceNumber = fields.FloatField(required=True)
Ejemplo n.º 25
0
 class Wheel(models.Base):
     pressure = fields.FloatField()