Skip to content

Instantly share code, notes, and snippets.

View boyuan12's full-sized avatar

Boyuan Liu boyuan12

View GitHub Profile
@boyuan12
boyuan12 / Common-Currency.json
Created June 12, 2022 06:43 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
from flask import Flask, render_template, session, request, redirect, abort, jsonify
from helpers import login_required, random_str, upload_s3
import requests
from termcolor import colored
import os
app = Flask(__name__)
app.config["SECRET_KEY"] = "abcdef"
@boyuan12
boyuan12 / app.py
Created June 7, 2020 02:59
Register, Login, Logout in Flask Without external library
from flask import Flask, url_for, render_template, request, redirect, session
from werkzeug.security import check_password_hash, generate_password_hash
import sqlite3
conn = sqlite3.connect("db.sqlite3", check_same_thread=False)
c = conn.cursor()
app = Flask(__name__)
app.config["SECRET_KEY"] = "secretkey"
@boyuan12
boyuan12 / index.html
Created February 8, 2020 05:06
Wikipedia API (Search)
<form>
<input type="search" placeholder="search" id="search">
<button type="button" onclick="apiRequest();">click</button>
</form>
<div id="error"></div>
@boyuan12
boyuan12 / index.html
Created January 25, 2020 20:58
SnapShop - EAN reader based on QUAGGA
<div class="container" style="margin-top: 2em;">
<div class="row">
<div class="col-lg-12">
<div class="input-group">
<input id="scanner_input" class="form-control" placeholder="Click the button to scan an EAN..." type="text" />
<span class="input-group-btn">
<button class="btn btn-default" type="button" data-toggle="modal" data-target="#livestream_scanner">
<i class="fa fa-barcode"></i>
</button>