- How to pass args or kwargs to gunicorn?
# codename/app.py
def create_app():
app = FrameworkApp()
...
return app
$ gunicorn --workers=2 'codename.app:create_app()'
{"lastUpload":"2018-09-20T13:26:37.455Z","extensionVersion":"v3.1.2"} |
#!/usr/bin/env python | |
# coding: utf8 | |
"""Example of a spaCy v2.0 pipeline component that requests all countries via | |
the REST Countries API, merges country names into one token, assigns entity | |
labels and sets attributes on country tokens, e.g. the capital and lat/lng | |
coordinates. Can be extended with more details from the API. | |
* REST Countries API: https://restcountries.eu (Mozilla Public License MPL 2.0) | |
* Custom pipeline components: https://spacy.io//usage/processing-pipelines#custom-components |
# codename/app.py
def create_app():
app = FrameworkApp()
...
return app
$ gunicorn --workers=2 'codename.app:create_app()'
// Ctrl+Shift+C to open Chrome Console. | |
// Choose an IFrame of the Vimeo Video with a comment `player.vimeo.com` | |
// in the drop-down list `top`. | |
// Run a script: | |
var videos = []; | |
$$('script')[3].textContent.match(/\{[^{]+?mp4[^}]+?\}/g).forEach( | |
x => { o = JSON.parse(x); | |
videos.push(o);}); | |
videos.sort((a, b) => a.quality.localeCompare(b.quality)).forEach( |
""" | |
Usage: | |
python google_drive_file.py 1nOwa2UN36-IDeZtqu4TLTNxGo8R5-mGF ~/Downloads/pycon_talk.mp4 | |
""" | |
import requests | |
def download_file_from_google_drive(id, destination): | |
def get_confirm_token(response): |
Toggle hidden files in Finder: shift + cmd + .
Related tutorial: http://krypted.com/mac-os-x/mavericks-show-hidden-files/
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer