Code for the book: Programming-Collective-Intelligence