Sample code used for courses I have taught. Includes both MATLAB/Octave and Python (via SciPy) versions of most.