Skip to content

Instantly share code, notes, and snippets.

View mycahp's full-sized avatar

MyCah Pleasant mycahp

View GitHub Profile
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/mpleasant/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
### Keybase proof
I hereby claim:
* I am hacym on github.
* I am mycahpleasant (https://keybase.io/mycahpleasant) on keybase.
* I have a public key ASB2xcFIK2LiMDPXtm3KrcHeRrQ0_gw-wOLrION7yZaMawo
To claim this, I am signing this object:
@mycahp
mycahp / extensions.json
Last active September 4, 2021 03:18
VSCode's Settings - Syncing
[
{
"id": "abusaidm.html-snippets",
"name": "html-snippets",
"publisher": "abusaidm",
"version": "0.2.1"
},
{
"id": "aeschli.vscode-css-formatter",
"name": "vscode-css-formatter",
from app import app
from flask import render_template, request, send_file, url_for
from PIL import Image, ImageDraw, ImageFont
import glob, os
# Index
@app.route("/", methods=['GET', 'POST'])
def index():
if request.method == 'POST':
# Create our variables from our form
from werkzeug.security import generate_password_hash, check_password_hash
from sql import UsersTable, session
from sqlalchemy import func
class NewUser(object):
'''Our user class, which holds all of the methods that will deal with
account related (not character) things '''
def __init__(self, username, password):
# Initialize our variables
self.username = username
def check_login(self):
userSearch = session.query(UsersTable).filter_by(username=self.username).count()
if userSearch >= 1:
password_check = self.check_password(self.stored_password, self.password)
if password_check is True:
login = 1
return login
else:
login = 0