Dimagi applicant exercises
Setup:
$ git clone https://github.com/millerdev/dimagi.git
$ mkvirtualenv dimagi$ pip install nose
$ nosetests numconvert.py # run tests to verify functionality
$ python -c 'from numconvert import *; print(convert_to_spoken(7291642))'Review source code if desired.
$ pip install bottle
$ python -m bottle matheng # start web server- Open
http://localhost:8080/?values=[1, 4, 7, -2]in a web browser. - Next go to
http://localhost:8080/entryand submit a list of numbers such as[2, 2]. - Use the Back button to go back and post a few more.
- Go to
http://localhost:8080/historyto see details about most recent calculation. - Go to
http://localhost:8080/history/3to see three most recent calculations.
Finally, have a look at the code. It is minimal, but should meet all the requirements outlined on the exercises page.