Notes and code from CU COMS S3134