An open API service indexing awesome lists of open source software.

https://github.com/dahlitzflorian/python-snippets

A collection of useful Python snippets
https://github.com/dahlitzflorian/python-snippets

python python-3 python-snippet python-snippets python3 snippet snippets snippets-collection

Last synced: 6 days ago
JSON representation

A collection of useful Python snippets

Awesome Lists containing this project

README

        

# Python Snippets #
## Description ##
A collection of useful Python snippets.

**standard_lib:** Contains those snippets, which do not depend
on third-party packages.

**third_party:** As the name suggests, it contains those snippets
depending on third-party packages, even if it's only `requests`
or `click`.

**ebook:** Contains an ebook including the provided snippets and additional explanations and insights.
The ebook is available as `.epub`, `.mobi` and `.pdf`.
Currently `pandoc` doesn't support LaTeX `\ref{...}` handling, which is used in the ebook.
That said, the `epub` and `mobi` version won't show the correct Listing numbers in the text, whereas the `pdf` version does.

## Installation

The code snippets in the [`third_party`](third_party) directory depend on other packages you need to install.
A `pyproject.toml` and a `poetry.lock` are in the directory, too, as poetry is used for dependency management.

> **Note:** Due to the changed distribution settings of the library `tensorflow`, you need to install it separately on your system in order to run some of the snippets in this repo.
> `tensorflow` is no longer part of the repositories `pyproject.toml`.

## More Tips & Tricks

More tips & tricks can be found in the respective section on my website: [link](https://florian-dahlitz.de/tips).