Skip to content

Instantly share code, notes, and snippets.

View jaredsampson's full-sized avatar

Jared Sampson jaredsampson

View GitHub Profile
@jaredsampson
jaredsampson / ubuntu-server-django-guide.rst
Created June 22, 2012 21:16 — forked from epicserve/ubuntu-server-django-guide.rst
Ubuntu Server Setup Guide for Django Websites

Ubuntu Server Setup Guide for Django Websites

This guide is a walk-through on how to setup Ubuntu Server for hosting Django websites. The Django stack that will be used in this guide is Ubuntu_, Nginx_, Gunicorn_ and Postgres_. This stack was chosen solely from the reading I've done and talking to other Django developers in order to get their recommendations. This stack seems to be one of the latest "standard" stacks for Django deployment. This guide also assumes that you're familiar with Ubuntu server administration and Django. I needed an example site for this guide so I chose to use my Django Base Site which is available on Github.

I would also like to thank Ben Claar, Adam Fast, Jeff Triplett and Frank Wiles for their suggestions and input on this guide.

import Bio
print(Bio.__version__)
from Bio.Seq import Seq
def degenerate_codon(codon):
try:
#translate codon
seq = Seq(codon)
aa = str(seq.translate())