Skip to content

Instantly share code, notes, and snippets.

Joe Reis JoeReis

Block or report user

Report or block JoeReis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JoeReis /
Last active Jun 4, 2018
AWS Lambda function that creates metadata about a file uploaded to S3, and inserts this metadata into DynamoDB.
import json
import urllib.parse
import boto3
s3 = boto3.client('s3')
dynamodb_client = boto3.resource('dynamodb')
table_name = # your dynamodb table name
table = dynamodb_client.Table(table_name)
JoeReis / gist:a5f80c01fecdc3159358
Created Aug 9, 2014
Setup pip, virtualenv, virtualenvwrapper on a new Mac
View gist:a5f80c01fecdc3159358
easy_install pip
sudo pip install --upgrade setuptools
sudo pip install --upgrade distribute
sudo pip install virtualenv virtualenvwrapper
echo -e "\nsource /usr/local/bin/" >> .bash_profile
mkvirtualenv <your-virtual-env-name>
workon <your-virtual-env-name>
JoeReis /
Last active Aug 29, 2015
Simple Python Script To Convert A Table Into Machine Learning ready format
Goal is to be able to transform a text file into machine readable form
import pandas as pd
import numpy as np
from sklearn import preprocessing
#open the file
df = pd.read_csv('<your file name>')
#select categoricals
JoeReis / Receive classpath
Last active Dec 14, 2015
This adapts the "Recv" file in the RabbitMQ tutorial #1 to write a message to a Postgres database. The same rationale can apply to other databases besides Postgres. There are two versions of this tutorial - Python and Java. We're using Java in this example. The only thing you need to change from the tutorial is the file and the classpa…
View Receive classpath
java -cp .:commons-io-1.2.jar:commons-cli-1.jar:rabbitmq-client.jar:postgresql-9.2-1002.jdbc3.jar Receive
You can’t perform that action at this time.