Code and notes I put together from Programming Collective Intelligence