Skip to content

ddahan/modern-python-cheat-sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Work in progress ...

Why another cheat sheet?

There exists many available Python courses or cheat sheets on the web. But this one:

  • Focuses exclusively on latest Python version (currently: 3.12)
  • Is for intermediate level
  • Is a mix of a course and a cheat sheet (minimal explanations - with moe details for advanced concepts)
  • Uses Python type hints (strict type is enabled)
  • Is fully integrated with VS Code and Jupyter (see below for the advantages)
  • Is forkable, allowing you to customize it to reflect your current level of knowledge (every cheat sheet should be a snapshot of one's personal knowledge at a given time).

Why using VS Code and Jupyter for a cheat sheet?

  • Why would you use anything else than your IDE to read and write code? You get same syntax colors, same shortcuts, auto complete, type inference, linting, auto-formatting, debugging, etc.
  • Unlike (most) websites or books, you can customize code snippets and make them yours, after having forked the project.
  • Code snippets can be directly executed. Don't trust the code comments to know the program output.
  • Possible 0-config by having an isolated installation in a dedicated Docker container (cf. below). It includes linting and type checking with Pylance, and auto-formatting with Black.

How to use it yourself?

You can use this project as a foundation for your own personal cheat sheet. To do so:

  • Fork this project
  • Install it on your own machine using your preferred methods, or better yet, use the .devcontainer.json file to create a devcontainer. This approach provides a zero-configuration installation.

If you don't want to install the project, you can just read the notebooks on github.com

Contribution

Since a cheat sheet is personal first, I don't expect new content to be proposed. However, if you find a mistake, something obviously missing, or anything than can help others, feel free to open an issue or a PR.

Roadmap

To check for content

To Do (features)

  • Clean "don't do this" syntax
  • Add screen presentation
  • Add internal cross references (for example for "comprehensions" because they can be at multiple places in the sheet)
  • Add a TOC to this file for easier access to sections
  • Use Ruff instead of Pylance (as soon as it's compatible with Junyper)

Inspiration

When not using chatGPT, these projects have been referenced to create this cheat sheet:

About

An opinionated cheat sheet using Jupyter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published