Resources
Resources for learning python, git, and GitHub
Please contact us to suggest additional resources, report broken links, or otherwise give feedback on the resources here.
python
Python is the language of modern data science. It is powerful, easy to use, and supports a vast ecosystem of software, utlities, and training materials.
Basics
- Python Tutorial Part 1 from the Materials Project Workshop - expressions, variables, data types, and for loops
- Python Tutorial Part 2 from the Materials Project Workshop - dictionaries, functions, and classes
- Video Tutorial - Python Part 1 from the Materials Project Workshop (taught by Prof. Kingsbury!)
- Video Tutorial - Python Part 2 from the Materials Project Workshop
- Installation - setting up
pip
andconda
environments
Advanced Topics
These tutorials introduce more advanced concepts that are relevant for writing high quality code, packaging and distributing software, etc.
- args and kwargs in function definitions
- Writing comprehensions for more compact code
- Dealing with files using pathlib
- Using numpy for numerical analysis
- Automatic unit conversions with pint
- Adding nice progress bars with tqdm
- Linting code with flake8
- Automatically formatting code with black
Jupyter notebooks
Jupyter notebooks provide a way to interactively run and share python code. Thet are the recommended way to practice, learn, experiment, and share your work.
- A Beginner’s Tutorial to Jupyter Noteboooks
- Jupyter Notebook Tutorial - A Complete Beginner’s Guide
- Jupyter Notebook Tutorial: Introduction, Setup, and Walkthrough [YouTube]
git and GitHub
git
and GitHub provide version control and feedback tools for collaboratively developing and maintaining code.
The open-source codes used by our research group are all hosted on GitHub. As you learn, please feel welcome to
try out your new skills by forking, pushing, or raising an issue to our training repository!
Basics
- The Beginner’s Guide to git and GitHub
- Getting Started with GitHub - official documentation
- GitHub skills - bite-sized tutorials walking through how to use GitHub
- Traveling the Multiverse with Git and GitHub [LinkedIn Learning]
- GitHub glossary explaining different terminology
Advanced Topics
- git cheatsheet
- Setting up pre-commit to automatically check code quality
- Mkdocs system for building documentation
- pyscaffold template for open-source python projects
- Software release procedures - GitHub Flow vs. Git Flow (and comparison)