Python implementation of DTW and KNN for time series classification