Create k-nn.py

Calculates k-nn algorithm. (This is a work in progress, some parameters are required before I can actually integrate this into a system.)