This page lists web sites, PDF documents, Jupyter notebooks, and Python packages that have been mentioned during the course.
It’s not an attempt to list everything related to each of those topics; just to collect those resources that have already been mentioned into one place.
It is a companion to the Recipes page.
Stack Overflow is a community of programmers, and a knowledge base of programming questions and answers. You can search it directly from its site; it also shows up in Google search.
- Think Python, by Allen Downey – the class text
- Python 3.6 Documentation
- Python 3.6 Standard Library
- The Hitchhiker’s Guide to Python, especially Writing Great Python Code
- Python Tutor interactive visualization
- HackerRank Python Introduction
- How to Think Like a Computer Scientist interactive course. Register here and enter “thinkcspy” as the course name.
- Google’s Python Class
- Automate the Boring Stuff with Python (includes video tutorials)
- Practice Python exercises
- Official Python Tutorial
- Spring 2014 NINJA tutorial: Python exercises
Python Style Guides
- PEP 8 – Style Guide for Python Code
- PEP 257 – Docstring Conventions
- Google Style Guide
- GeneFinder in Google Style (see how it compares to master here)
These have moved to Atom recipes.
https://teletype.atom.io is like Google Docs for Atom. It enables real-time collaborative editing of a single Python file from two or more computers.
- Pro Git
- Great visualization of basic Git commands for moving source around
- A Visual Git Reference
- GitHub’s Git Cheat Sheet (PDF)
- A fantastic visual introduction to the high-level concepts around Git and branching. If you are at all interested in using branches, this is one is not to be missed.
- Why is Git so hard? (it’s not just you!)
- Try Git
- Learn Git Branching
Git Tutorials From Past Semesters
- Spring 2014 NINJA tutorial: GitHub Help
- Spring 2014 NINJA tutorial: Introduction to Version Control
- Spring 2014 NINJA tutorial: Pushing to your GitHub repository
Git & GitHub presentation (thanks: Chris)
One-page cheat sheet (PDF, thanks: Celine)
One of the most impactful ways to show your work in action is to… show your work in action!
For still images, there is a Ubuntu built-in tool called Screenshot that will allow you to capture the entire screen, one window, or a region you select.
There are many options to record video of your screen, but for Ubuntu we recommend you start by trying Peek. To install:
sudo add-apt-repository ppa:peek-developers/stable sudo apt update sudo apt install peek
Used sparingly this can be a powerful way to quickly show what you’ve created, but too much can be overwhelming.
You have two options for recording format:
- GIF - good for short interactions, can be embedded directly in a webpage
- MP4 - good for editing together into a longer video, can be uploaded to video sharing services and linked from your webpage
If you saved as a GIF and you need an MP4 to work with video editors like Pitivi, you can use an
or convert it using
ffmpeg -i foo.gif foo.mp4
Troubleshooting: If you get the following error message, there is a problem with peek trying to utilize ffmpeg from inside Anaconda (as opposed to the one installed in the system path).
Using screen recorder backend ffmpeg Error: Child process exited with code 1 Recording canceled: Command "ffmpeg -f x11grab -show_region 0 -framerate 10 -video_size 498x256 -i :0+941,643 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -lossless 1 -r 10 -y /home/pruvolo/.cache/peek/peek7WRLIZ.webm" failed with status 256 (received signal 0). Output: ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.2.0 (crosstool-NG 8a21ab48) configuration: --prefix=/home/pruvolo/anaconda3 --disable-doc --enable-shared --extra-cflags='-fPIC -I/home/pruvolo/anaconda3/include' --extra-cxxflags='=-fPIC' --extra-libs='-L/home/pruvolo/anaconda3/lib -lz' --enable-pic --disable-static --disable-gpl --disable-nonfree --disable-openssl --enable-libvpx --cc=/home/pruvolo/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc --cxx=/home/pruvolo/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++ --enable-libopus libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100Unrecognized option 'show_region'.Error splitting the argument list: Option not found
To fix this, simply run this command from your terminal.
As part of your final project, your team will create a short demo video. There are two main routes you can take to create this presentation:
- video with audio narration
- “silent film” with title cards and/or text overlay explanations
Silent film option
From your storyboard, combine a series of still images and/or short GIF clips into a longer animated GIF. There are many tools you can use to do the stitching, but we recommend EZGIF, which can both create and edit GIFs including overlaying text.
Note that your “silent film” doesn’t need to remain silent. You can create an animation using this method, then convert to MP4 video and overlay an audio track following the directions below.
There are also a huge variety of options for video production, but for this class we recommend the instructions for creating an Ubuntu screen cast (you can ignore the part about creating a virtual machine) using Pitivi. Note that you can also use this flow to create a “silent film” with a bit more control.
Since it’s difficult to get a demo and your narration right at the same time, we recommend that you first create your video, then record an audio voiceover using Audacity, and finally compose the two using Pitivi.
Find a quiet place to record your audio. We also have quality studio microphones you can check out rather than using your laptop’s microphone.
If you’d like to include a “talking head” video clip of your team members, you can record it using the built-in Ubuntu webcam app called Cheese.
If you choose to use background music (by no means necessary), make sure you select options which are licensed appropriately.
Generating title slides and text overlays
Regardless of what implementation technology you use, you will likely want title cards, transitions, and credits (don’t forget to add your names and give credit to resources you use). There are many options to generate these still images, including:
- Use a photo editor to add text overlays to screenshots
- Use presentation software (e.g. Google Slides) and download the slide as an image
- Screenshot from a presentation
- Use magic markers and scan it in
- For GIFs, you can add subtitles with EZGIF
- How to use Jupyter Notebooks
- Jupyter Keyboard Shortcuts (compact)
- Jupyter Keyboard Shortcuts (longer)
- 28 Jupyter Notebook tips, tricks and shortcuts
There are a number of types of UML diagrams. For this class, the most useful are:
- A Class Diagram describes the responsibilities of and relationships between the classes in a system.
- An Object Diagram shows the relationship between objects (instances of classes). (The relationship between a class diagram and an object diagram is the “noun” version of the relationship between a static call graph and a dynamic call graph.)
- A Sequence Diagram shows how objects operate with each other. You can use it to show function (including method) calls and returns between two or more objects. You can also use it to show the flow of actions and responses between a user and the system.
Depending on your project, these may also be helpful:
- A State Diagram depicts the different states that a system can be in. In this class, it is most useful to describe interactive programs, where a game might be displaying one of several screens. Sometimes it is useful to create state diagrams for individual objects within a program, rather than one diagram for the entire program state.
- A Use Case diagram represents the relationship between the user and the system. In a complex system that is defined UOCD-style, starting from use cases, this kind of diagram can be helpful in collecting use cases and starting to translate them into system structure and behavior.
Diagram Type Directories
These online references variously include examples, text descriptions, and discussions of when to use each one.
UML Distilled, by Martin Fowler, is more involved reference that also has a lot of good material for how to think about programming in general. It’s available at the Olin Library.
Drawing by Hand
Any of the Olin printer/scanners can mail a scan to you. For a diagram, taking a photo from a recent phone will probably work just as well.
For simple diagrams, you can get by with the draw tools in PowerPoint, Keynote, or Google Slides.
- Gliffy and LucidChart are cloud-based collaborative diagram editors. Gliffy is free for students. (I don’t know whether the collaborative features are free.)
- There’s a variety of free / open source draw programs, and also UML-specific drawing programs, mostly written in Java; I’m not familiar with that world.
Text-based diagram tools.
PlantUML produces an image from a text description. It can create a variety of different kinds of diagrams, shown on its home page.
Mermaid is (IMO) easier to install and use, and produces several useful diagram types, but not class diagrams.
There are Atom plugins for PlantUML and Mermaid, that display the image in one pane while you edit the text in another. I’ve used the Mermaid plugin.
GraphViz is a general-purpose text-to-graph program. It’s not specific to, and doesn’t know about, class diagrams or UML, but can be used for this. It’s a useful tool to have in your toolbox.
These are tools that create UML diagrams from Python sources.
The PyCharm Python IDE (Integrated Development Environment) has this feature. I’ve heard that quite a few students in the Olin community use PyCharm; I don’t know that any use this feature.
These appealing, but I’ve found it more helpfully for understanding a pile of code that has been left, without adequate docs, or your doorstep, than for designing of documenting your own code. Done properly, a diagram is expressive and reflects intent: how you position elements, what you leave out, focus on and emphasize different elements in your design. Just as writing prose documentation for your code can lead you to realize how you should have written it (and cause you to go back and revise it, if you’ve got time), the process of creating a diagrams can help you design your system. Tools that run on code that’s already written, and make diagrams mechanically, don’t come out as well, and deprive you of those benefits.