Install web2py by cloning this software repository: https://bitbucket.org/luca_de_alfaro/web2py-class
You should be able to do that by doing:
git clone https://luca_de_alfaro@bitbucket.org/luca_de_alfaro/web2py-class.git
This will create a web2py-class directory. You can then run web2py by doing:
python web2py-class/web2py.py -e
The -e flag is recommended, and it will direct error messages to standard output.
You can also configure PyCharm in such a way that it runs web2py from this directory; I attach a screenshot of the configuration.
The web2py I gave you is identical to the "standard" one, except that it has a start
application with a few key lines in db.py that make logging very easy. We will use this start
application as a starting point for our work.
Homework 1
I will not grade it formally, but it is a fun homework and highly instructive, so I very much advise you to at least try it. I give it to you as a divertissement, as a brain teaser, and I very much advise you to study the code.
Look at this piece of Python code: https://gist.github.com/lucadealfaro/7a6f85c0941f94c7fff7
What does it do? What's the normal name of the well-known algorithm? Can you make sense of it?
Enter your reply here: https://docs.google.com/a/ucsc.edu/forms/d/1cg2zJBAAWs6gOPubwp06oEOdU6Dje6DoxTZQK_bXilc/viewform?usp=send_form
Here is the solution.