This code is an afternoon project providing an example of my code for Second Spectrum.
I have implemented a basic k-nearest neighbor approach to predicting the outcome of a shot based on historical play data as provided by http://www.basketballgeek.com/data/