Essential code for Stanford Deep Learning tutorial