Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| description "uWSGI" | |
| start on runlevel [2345] | |
| stop on runlevel [06] | |
| respawn | |
| env UWSGI=/usr/bin/uwsgi | |
| env LOGTO=/var/log/uwsgi/emperor.log | |
| exec $UWSGI --master --emperor /etc/uwsgi/apps-enabled --die-on-term --uid nginx --gid nginx --logto $LOGTO |
| #!/bin/bash | |
| # | |
| # Shell script to automatically configure a new Flask, nginx and uWSGI based blog | |
| # on an Amazon EC2 instance. | |
| # | |
| # See http://bit.ly/MeGwjD for more information! | |
| # | |
| # If you are forking this for your own custom configuration script, see the following other gists: | |
| # https://gist.github.com/3071737 | |
| # https://gist.github.com/3071739 |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
I hereby claim:
To claim this, I am signing this object: