added the cookie py code from his lecture notes

read summary