<commit_before>from webapp2_extras.appengine.auth.models import User
from google.appengine.ext.ndb import model
from google.appengine.ext import ndb

class User(User):
    """
    Universal user model. Can be used with App Engine's default users API,
    own auth or third party authentication methods (OpenId, OAuth etc).
    based on https://gist.github.com/kylefinley
    """

    #: Creation date.
    created = model.DateTimeProperty(auto_now_add=True)
    #: Modification date.
    updated = model.DateTimeProperty(auto_now=True)
    #: User defined unique name, also used as key_name.
    username = model.StringProperty(required=True)
    #: User Name
    name = model.StringProperty()
    #: User Last Name
    last_name = model.StringProperty()
    #: User email
    email = model.StringProperty(required=True)
    #: Password, only set for own authentication.
    password = model.StringProperty(required=True)
    #: User Country
    country = model.StringProperty()
    
    @classmethod
    def get_by_email(cls, email):
        """Returns a user object based on an email.

        :param email:
            String representing the user email. Examples:

        :returns:
            A user object.
        """
        return cls.query(cls.email == email).get()

class VisitLog(ndb.Model):
    uastring = ndb.StringProperty()
    ip = ndb.StringProperty()
    timestamp = ndb.StringProperty()<commit_msg>ndb instead model<commit_after>from webapp2_extras.appengine.auth.models import User
from google.appengine.ext import ndb

class User(User):
    """
    Universal user model. Can be used with App Engine's default users API,
    own auth or third party authentication methods (OpenId, OAuth etc).
    based on https://gist.github.com/kylefinley
    """

    #: Creation date.
    created = ndb.DateTimeProperty(auto_now_add=True)
    #: Modification date.
    updated = ndb.DateTimeProperty(auto_now=True)
    #: User defined unique name, also used as key_name.
    username = ndb.StringProperty(required=True)
    #: User Name
    name = ndb.StringProperty()
    #: User Last Name
    last_name = ndb.StringProperty()
    #: User email
    email = ndb.StringProperty(required=True)
    #: Password, only set for own authentication.
    password = ndb.StringProperty(required=True)
    #: User Country
    country = ndb.StringProperty()
    
    @classmethod
    def get_by_email(cls, email):
        """Returns a user object based on an email.

        :param email:
            String representing the user email. Examples:

        :returns:
            A user object.
        """
        return cls.query(cls.email == email).get()

class VisitLog(ndb.Model):
    user = ndb.KeyProperty(kind=User)
    uastring = ndb.StringProperty()
    ip = ndb.StringProperty()
    timestamp = ndb.StringProperty()
{'fraction_non_alphanumeric': 0.09712867777383906, 'fraction_numerical': 0.0007089684509039348, 'mean_word_length': 2.9634831460674156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5956511', 'n_tokens_mistral': 825, 'n_tokens_neox': 798, 'n_words': 233}