Sklearn StratifiedKFold code explanation
A KFold split will take the data and split it however many times you designate.   StratifiedKFold is used in order to ensure that your training and validation datasets each contain the same percentage of classes (see sklearn documentation for more). The function StratifiedKFold takes two arguments, the array of labels (for binary classification this would be an array of 1's and 0's) and the number of folds.  They have designated the number of folds as 1./eval_size where eval_size = 0.10.  So this is a 10-fold validation.

train_indices, valid_indices = next(iter(kf))


This line derives the indices in order to split the data into the train/validation data sets.  

Now that we have the indices, we use those indices to actually split the data.

It is interesting that they wrote next(iter(kf)) and then input the indices into the dataset when they could use sklearn.cross_validation.train_test_split.  train_test_split is just a wrapper for next(iter(kf)), but it is more readable and it's already a function in sklearn.

Hope this helps!