This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
| # Get a list of all the bugs you fixed: | |
| hg log -u [email protected] --template '{date|isodate}: {desc}\n' | |
| # it doesn't filter out the merges, backouts, etc. | |
| # Add this to your hgrc: | |
| [alias] | |
| mybugs = log -u [email protected] --template '{date|isodate}: {desc}\n' | |
| hg mybugs |
| module Vagrant | |
| module Provisioners | |
| class Fabric < Base | |
| class Config < Vagrant::Config::Base | |
| attr_accessor :fabfile_path | |
| attr_accessor :fabric_path | |
| attr_accessor :python_path | |
| attr_writer :tasks | |
| def _default_fabfile_path |
| from wsgiref.simple_server import make_server, WSGIServer | |
| from SocketServer import ThreadingMixIn | |
| from time import sleep | |
| def simple_app(env, start_response): | |
| status = '200 OK' | |
| headers = [('Content-type', 'text/plain')] | |
| start_response(status, headers) |
| from os import path | |
| from fabric.api import cd, prefix, lcd | |
| from fabric.api import run, sudo as run_as_root, local as run_on_local | |
| from cuisine import package_install_apt, file_exists | |
| def _run(command, sudo=False, local=False): | |
| if sudo: | |
| return run_as_root(command) |
| #!/usr/bin/env python | |
| import SimpleHTTPServer | |
| import SocketServer | |
| from optparse import OptionParser | |
| parser = OptionParser() | |
| parser.add_option("-p", | |
| "--port", |
| #include <Python.h> | |
| #include <numpy/arrayobject.h> | |
| #include "chi2.h" | |
| /* Docstrings */ | |
| static char module_docstring[] = | |
| "This module provides an interface for calculating chi-squared using C."; | |
| static char chi2_docstring[] = | |
| "Calculate the chi-squared of some data given a model."; |
| #!/usr/bin/env python | |
| # I was frustrated that no matter what buffer setting I passed to communicate, | |
| # I could not get stdout from my subprocess until the process had completed. | |
| # I googled around and came up with this, which illustrates the problem and a | |
| # solution. | |
| # http://stackoverflow.com/questions/2804543/read-subprocess-stdout-line-by-line | |
| # http://bugs.python.org/issue3907 | |
| # http://docs.python.org/library/io.html |
This is a condensed step-by-step guide on how to install Marketplace with all its co-servers (redis, ES, Rabittmq, MySQL etc)
More on Marketplace/Zamboni: http://zamboni.readthedocs.org/
| LINKS: | |
| https://us.pycon.org/2013/about/what-is-pycon/ | |
| http://juliaelman.com/blog/2012/mar/13/my-first-pycon/ | |
| http://pydanny.blogspot.com/2011/01/why-you-should-go-to-pycon.html | |
| http://jessenoller.com/2011/09/23/pycon-2012-sponsorship-making-the-case-for-sponsorship/ | |
| https://us.pycon.org/2013/sponsors/whysponsor/ | |
| Goal of this document: Provide a compelling case for why companies should send their employees to PyCon. Ideally tie into stories like this: http://pycon.blogspot.com/2012/09/pycon-us-2013-highlighting-aweber.html and http://pycon.blogspot.com/2012/09/pycon-us-2013-highlighting-dreamhost.html | |
| This document will be converted to markdown/html and posted to the PyCon website and the PyCon blog. |