I hereby claim:
- I am doobeh on github.
- I am doobeh (https://keybase.io/doobeh) on keybase.
- I have a public key ASAvTOPwPit1ZpOwYMbqxx9_ylnjJ8lssqQeRAmcGH9mnQo
To claim this, I am signing this object:
[[source]] | |
name = "pypi" | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
[dev-packages] | |
[packages] | |
flask = "*" | |
flask-sqlalchemy = "*" |
<form method="post" action=""> | |
{{ form.hidden_tag() }} | |
{{ form.id }} | |
{{ form.name }} | |
{% for entry in form.players %} | |
{{ entry() }} | |
{% endfor %} | |
<input type="submit"/> | |
</form> |
from flask_sqlalchemy import SQLAlchemy | |
from flask import Flask, jsonify | |
db = SQLAlchemy() | |
class User(db.Model): | |
id = db.Column(db.Integer, primary_key=True) | |
name = db.Column(db.String, default="Person") | |
def add(self): |
I hereby claim:
To claim this, I am signing this object:
[ | |
{ | |
"id": "webhook", | |
"execute-command": "/home/you/webhooks/myapp.sh", | |
"command-working-directory": "/home/you/webhooks", | |
"response-message": "Deploying new application from Github", | |
"trigger-rule": { | |
"match": { | |
"type": "payload-hash-sha1", | |
"secret": "the-password-to-protect-the-webhook", |
import Alamofire | |
func makeGetCallWithAlamofire() { | |
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1" | |
Alamofire.request(todoEndpoint) | |
.responseJSON { response in | |
// check for errors | |
guard response.result.error == nil else { | |
// got an error in getting the data, need to handle it | |
print("error calling GET on /todos/1") |
""" Appending DataFrame data to Excel Worksheets. | |
This script appends the contents of a dataframe to an existing | |
Excel (xlsx) file. If the file doesn't exist, it will create | |
a blank Excel file with the expected sheet names. | |
""" | |
import pandas as pd | |
from openpyxl import load_workbook, Workbook | |
import os |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>scroll demo</title> | |
<style> | |
div { | |
color: blue; | |
} | |
p { |
def register_blueprints(app): | |
"""Register all blueprint modules | |
Reference: Armin Ronacher, "Flask for Fun and for Profit" PyBay 2016. | |
""" | |
for name in find_modules("gtcloud.blueprints"): | |
mod = import_string(name) | |
if hasattr(mod, "bp"): | |
app.register_blueprint(mod.bp) | |
return None |
import os | |
@app.route('/uploads', defaults={'page': 'index'}) | |
@app.route('/uploads/<path:page>') | |
def show(page): | |
try: | |
return send_from_directory(os.path.join(app.static_folder, 'xxxx'), page) | |
except IOError: | |
abort(404) |