Python script for Kaggle digit recognizer competition.