- Compare implementations for sampling words based on observed frequency
- Visualize how sampling algorithms work by drawing pictures with a number line
- Discuss tradeoffs of different sampling techniques based on histogram implementations
After completing this class session and the associated tutorial challenges, students will be able to ...
- Set up Python virtual environments for package isolation
- Build and test simple Flask web apps on local computers
- Deploy Flask web apps to Heroku cloud hosted servers
These challenges are the baseline required to complete the project and course. Be sure to complete these before next class session and before starting on the stretch challenges below.
- Page 5: Flask Web App
- Set up an isolated virtual environment with
virtualenv
- Develop a Flask web app locally (access via
localhost
) - Push your Flask web app to Heroku servers (on the Web)
- Set up an isolated virtual environment with
These challenges are more difficult and help you push your skills and understanding to the next level.
- Page 5: Flask Web App
- Improve the style of your page with CSS
- Display more than one generated word
- Generate a specific number of words given in a URL query string parameter (like
/?num=10
) - Add a button to display a new word (i.e. refresh the page) when clicked
- Add a button and route to store favorites (chosen by users) with a database
- Read The Hitchhiker's Guide to Python's tutorial on virtual environments
- Consult documentation for Python's
virtualenv
tool - Read the Flask quickstart to jump right in and follow the Flask tutorial
- Consult the Flask documentation to learn more and solve specific problems
- Read Explore Flask, a book about best practices and patterns for developing web apps with Flask
- Install the Heroku command line interface to manage Heroku apps from your terminal