This is the solution of the Stanford UFLDL Tutorial Exercises. Link:  http://ufldl.stanford.edu/wiki/index.php/UFLDL_Tutorial