<commit_before>#!/usr/bin/env python
# coding=utf-8

from webapp.web import BaseHandler


class SigninHandler(BaseHandler):

    def post(self):
        email = self.get_arg("email")
        password = self.get_arg("password")
        if email:
            user = dbapi.User()
            if user.check_user(email, password) == 0:
                self.set_secure_cookie('email', str(email))
                self.redirect("/user")

        self.redirect("/")<commit_msg>Update signin.py<commit_after>#!/usr/bin/env python
# coding=utf-8

from webapp.web import BaseHandler
from model import dbapi


class SigninHandler(BaseHandler):

    def post(self):
        email = self.get_arg("email")
        password = self.get_arg("password")
        if email:
            user = dbapi.User()
            if user.check_user(email, password) == 0:
                self.set_secure_cookie('email', str(email))
                self.redirect("/user")

        self.redirect("/")
{'fraction_non_alphanumeric': 0.12953367875647667, 'fraction_numerical': 0.004145077720207254, 'mean_word_length': 2.3195876288659796, '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': '6093908', 'n_tokens_mistral': 295, 'n_tokens_neox': 280, 'n_words': 58}