Skip to content

Instantly share code, notes, and snippets.

View edgarroman's full-sized avatar

Edgar Roman edgarroman

View GitHub Profile
@edgarroman
edgarroman / GRAVITY.TXT
Created July 28, 2017 01:46 — forked from Fortyseven/GRAVITY.TXT
Gravity FAQ
Gravity Faq
The information contained in document will allow you to realistically
simulate jumping and interstellar maneuvers.
The purpose of this document is to understand the physics of the
world we live in, and apply realistic physics to your game. It
will not give you optimized routines for your program, that is your
job! But if you understand how things work, it will be a heck of
a lot easier.
@edgarroman
edgarroman / add_alias.sh
Last active June 16, 2017 19:59
Easy bash alias for zappa in a docker environment
alias zappashell='docker run -ti -e AWS_PROFILE=zappa -v $(pwd):/var/task -v ~/.aws/:/root/.aws --rm myzappa'
alias zappashell >> ~/.bash_profile
@edgarroman
edgarroman / Dockerfile
Created June 16, 2017 19:54
Zappa Dockerfile for Python 3.6
FROM lambci/lambda:build-python3.6
MAINTAINER "Your Name" <your@email.com>
WORKDIR /var/task
# Fancy prompt to remind you are in zappashell
RUN echo 'export PS1="\[\e[36m\]zappashell>\[\e[m\] "' >> /root/.bashrc
# Additional RUN commands here
@edgarroman
edgarroman / gist:6979e59fc2c39fd04c29
Last active August 29, 2015 14:06
Django demo for importing information from an uploaded XLS file. Two methods for importing the information. And one method for exporting to an Excel file. This was extracted from another file so all django dependencies are not listed here, just the essential imports for xlrd and xlwt
import tempfile
import xlrd
import xlwt
CONTACT_FIELDS = [u'customer',u'last name', u'first name', u'email' ]
def importstep1(request):
'''
Import wizard step one merely displays the upload form and instructions.
Especially important is to provide a template XLS file on this page so