I hereby claim:
- I am miguelgrinberg on github.
- I am miguelgrinberg (https://keybase.io/miguelgrinberg) on keybase.
- I have a public key whose fingerprint is 2488 9E35 E9BC 5DDD D3D6 C648 EE0C 3C4C F171 F9A3
To claim this, I am signing this object:
| #!flask/bin/python | |
| from flask import Flask, jsonify, abort, request, make_response, url_for | |
| from flask_httpauth import HTTPBasicAuth | |
| app = Flask(__name__, static_url_path = "") | |
| auth = HTTPBasicAuth() | |
| @auth.get_password | |
| def get_password(username): | |
| if username == 'miguel': |
| from flask.globals import _app_ctx_stack, _request_ctx_stack | |
| from werkzeug.urls import url_parse | |
| from werkzeug.exceptions import NotFound | |
| def split_url(url, method=None): | |
| appctx = _app_ctx_stack.top | |
| reqctx = _request_ctx_stack.top | |
| if appctx is None: | |
| raise RuntimeError('Attempted to match a URL without the ' |
| import argparse | |
| import re | |
| from multiprocessing.pool import ThreadPool as Pool | |
| import requests | |
| import bs4 | |
| root_url = 'http://pyvideo.org' | |
| index_url = root_url + '/category/50/pycon-us-2014' |
| #!/bin/bash | |
| # note: this script is invoked automatically by rackspace-flasky.py | |
| # save command line arguments | |
| GMAIL_USERNAME=$1 | |
| GMAIL_PASSWORD=$2 | |
| # install web server dependencies | |
| apt-get update | |
| apt-get -y install python python-virtualenv nginx supervisor git |
| import urllib3 | |
| import re | |
| from flask import Flask, request, make_response, url_for | |
| from flask.ext.cors import CORS | |
| app = Flask(__name__) | |
| app.config['IGNORE_REQUEST_HEADERS'] = ['content-length', 'host'] | |
| app.config['IGNORE_RESPONSE_HEADERS'] = ['connection', 'transfer-encoding', | |
| 'keep-alive', 'content-encoding'] | |
| cors = CORS(app) |
| #!/bin/bash | |
| REPO=https://github.com/miguelgrinberg/heat-config | |
| BRANCH=master | |
| while [[ $# > 0 ]]; do | |
| OPT="$1" | |
| shift | |
| case $OPT in | |
| -r|--repo) |
| heat_template_version: 2013-05-23 | |
| description: Template that installs a wordpress server and supporting MySQL database running on separate servers | |
| parameters: | |
| image: | |
| type: string | |
| label: Image name or ID | |
| description: Image to be used for server. Please use an Ubuntu based image. | |
| default: trusty-server-cloudimg-amd64 |
| #!/bin/python | |
| # This simple Python script runs simulations for different retry algorithms | |
| # The results are printed as CSV data to the console | |
| # See this article on my blog for details: | |
| # https://blog.miguelgrinberg.com/post/how-to-retry-with-class | |
| from random import random, choice | |
| import asyncio | |
| loop = asyncio.get_event_loop() | |
| async def hello(): | |
| await asyncio.sleep(3) | |
| print('Hello!') | |
| if __name__ == '__main__': | |
| loop.run_until_complete(hello()) | |
I hereby claim:
To claim this, I am signing this object: