<commit_before>from google.appengine.ext import ndb


class NestApiAuth(ndb.Model):
    """Models core auth parameters for accessing the Nest API."""
    auth_url = ndb.StringProperty()
    product_id = ndb.StringProperty()
    product_secret = ndb.StringProperty()


class Users(ndb.Model):
    """Models a user of this service."""
    access_token = ndb.StringProperty()
    email = ndb.StringProperty()
    nest_api_pin = ndb.StringProperty()
    token_valid_until = ndb.DateProperty()


class DataPoint(ndb.Model):
    """Models a single data point polled from a thermostat."""
    # TODO: consider a unique kind for each user/structure/where combo, so that
    #       that information doesn't have to be stored in every data point
    user = ndb.StringProperty()
    structure_id = ndb.StringProperty()
    where_id = ndb.StringProperty()
    ambient_temperature_f = ndb.IntegerProperty()
    target_temperature_f = ndb.IntegerProperty()
    humidity = ndb.IntegerProperty()
    hvac_state = ndb.StringProperty()
    fan_timer_active = ndb.BooleanProperty()<commit_msg>Track the timestamp for each DataPoint.<commit_after>from google.appengine.ext import ndb


class NestApiAuth(ndb.Model):
    """Models core auth parameters for accessing the Nest API."""
    auth_url = ndb.StringProperty()
    product_id = ndb.StringProperty()
    product_secret = ndb.StringProperty()


class Users(ndb.Model):
    """Models a user of this service."""
    access_token = ndb.StringProperty()
    email = ndb.StringProperty()
    nest_api_pin = ndb.StringProperty()
    token_valid_until = ndb.DateProperty()


class DataPoint(ndb.Model):
    """Models a single data point polled from a thermostat."""
    # TODO: consider a unique kind for each user/structure/where combo, so that
    #       that information doesn't have to be stored in every data point
    user = ndb.StringProperty()
    timestamp = ndb.DateTimeProperty(auto_now_add=True)
    structure_id = ndb.StringProperty()
    where_id = ndb.StringProperty()
    ambient_temperature_f = ndb.IntegerProperty()
    target_temperature_f = ndb.IntegerProperty()
    humidity = ndb.IntegerProperty()
    hvac_state = ndb.StringProperty()
    fan_timer_active = ndb.BooleanProperty()
{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.0, 'mean_word_length': 3.9293598233995586, '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': '5024523', 'n_tokens_mistral': 673, 'n_tokens_neox': 648, 'n_words': 178}