http://stackoverflow.i2p/questions/42986456/using-python-within-r-notebook/43204861
```{python} # Import necessary modules from sklearn import datasets import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier import numpy as np # Load the digits dataset: digits digits = datasets.load_digits() # Create feature and target arrays X = digits.data y = digits.target # Split into training and test set X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 42, stratify = y) # Setup...