Welcome to Python Bootcamp 2020
Thank you so much to everyone who attended the 2020 sessions! This website will remain active, with links to all recordings and resources. In addition, here is a list of free resources for continuing to learn Python. If you have any questions about any of the content on this website, please email sljohansen@ucdavis.edu.
Our goal is to give you a basic understanding of the structure of Python, what it can be used for, and provide with you the tools you need to learn anything else you might need. This workshop was developed for incoming graduate students who have no previous coding experience. Current graduate students and those with prior coding experiences are also welcome! Besides learning Python, this is a great chance to meet other graduate students at UC Davis who are not necessarily in your graduate group.
This workshop is a Professors for the Future project. Check out their website for more information about this UC Davis fellowship program.
Format
You do not need to download anything to get started. The majority of the workshop will use Jupyter Notebooks, which can be run from a browser with no downloads needed. Additional guidance on how to install and run Python on your computer will also be provided.
Click here for an empty Jupyter notebook. Select “Try Classic Notebook.” It will take a little while to load. When it does, go to “File” and select “New Notebook” then “Python 3”. We recommend copying what is being taught verbatim during the instruction. Before the first lesson, we recommend watching this short YouTube tutorial about Jupyter notebooks.
For your reference, you can access the full tutorials that we’re going over here under “TutorialFiles”. It will also take a little while to load.
This workshop will be held over Zoom on September 22, 23, and 24, with a bonus open session on September 25 for additional questions or troubleshooting. Each session will be 6-7 PM Pacific Time, followed by an hour of optional group work on the homework assignments in Zoom breakout rooms. Sessions will be recorded for anyone interested who cannot make those times (the breakout rooms will not be recorded, nor will the bonus session on September 25).
Besides the hour of live teaching each day, there will be several YouTube/pre-recorded videos that will complement the content taught each day. Some videos we will recommend watching ahead of time, others should be viewed after that day’s session. We will make it very clear which is which!
To better cement concepts taught each day, a homework assignment will be given. The three assignments total will build on each other so that by the end, you will have finished a fun Python project!
Agenda and Daily Objectives
- Day 1: The Basics Recording available here. Q&A, although not a pretty format, available here.
- Introductions
- What is coding? Why Python?
- Variables
- Lists
- Loops
- Functions
- NumPy introduction
- Import data from a text file (You’ll have to download this simple text file to follow along with this example.)
- Simple line and scatter plots
- Google is your friend
- Day 2: Manipulating Lists and Doing Math Recording available here.
- Indexing lists
- Data smoothing
- Additional plotting tools
- Day 3: Integrated Development Environments, Additional Libraries, Debugging Recording available here.
- Programming in an IDE
- SciPy
- NumPy
- SymPy
- Debugging and Troubleshooting Debugging problems here, with answers here.
Additional Videos and Tutorials
- Day 1: The Basics
- Introduction to Jupyter (watch before first session!)
- This short video includes a brief introduction to Jupyter notebooks as well as some basic math and variable types.
- If/Else Statements
- Watch from 6:18 to 17:12
- While Loops
- Inifinite loops are not are addressed in this video but are a risk with while loops! While watching, think about what would happen without the line “i += 1”.
- Introduction to Jupyter (watch before first session!)
- Day 2: Manipulating Lists and Doing Math
- Day 3: Integrated Development Environments and Additional Libraries
- Anaconda Install Documentation
- Scroll down and select your operating system. Follow instructions. Once installed, make sure you can open Spyder.
- (Try to get this installed before the Day 3 instruction. If you need help, ask in Slack.)
- Classes
- We didn’t talk about classes or object oriented programming at all, but they are important concepts to understand if you plan on continuing your Python journey. That being said, you can still find a way to do almost anything in Python without classes, but it’s at least important to know they exist. This short introduction shows some of the functionality of classes and how they’re different than the type of coding we covered.
- Fitting
- Anaconda Install Documentation