Skip to content

Instantly share code, notes, and snippets.

@nancyru
nancyru / configure_python.py
Created June 27, 2015 05:28
AWS EMR bootstrap action for configuring python
#!/bin/bash
#When Spark is installed by a bootstrap action on an AWS EMR cluster,
#this script can be used as an additional bootstrap action to
#install ipython on all the nodes of the cluster.
#Make Python 2.7 the default python
echo `sudo rm /usr/bin/python`
echo `sudo ln -s /usr/bin/python2.7 /usr/bin/python`
#Install iPython and dependencies for Python 2.7
# movieratings.py
# This is from/inspired by "Introduction to Machine Learning" by Andrew Ng
# on Coursera. The class was conducted in Matlab. I converted the
# recommender systems exercise into python. This was part 2 of homework
# exercise 8.
# Works best with ipython pylab
import matplotlib.pyplot as plt
import numpy as np