https://github.com/developerstoolbox/python-snippets
A collection of Python snippets.
https://github.com/developerstoolbox/python-snippets
python python-snippets snippets wolfsoftware
Last synced: 9 months ago
JSON representation
A collection of Python snippets.
- Host: GitHub
- URL: https://github.com/developerstoolbox/python-snippets
- Owner: DevelopersToolbox
- License: mit
- Created: 2023-12-21T15:39:34.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T05:01:15.000Z (10 months ago)
- Last Synced: 2025-03-17T05:32:22.453Z (10 months ago)
- Topics: python, python-snippets, snippets, wolfsoftware
- Language: Python
- Homepage:
- Size: 135 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
## Overview
his is a collection of useful(ish) Python snippets. The snippets are all simple self-contained pieces of code (a class or subroutine), but non of them are large enough to require having a repository in their own right.
## Bash Snippets
| Name | Description |
| ------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| [execute-shell-command.py](src/execute-shell-command/execute-shell-command.py) | Execute a given shell command and return stdin, stdout and stderr. |
| [human-duration.py](src/human-duration/human-duration.py) | Convert a given number of seconds into something more human friendly. |
| [ordinal.py](src/ordinal/ordinal.py) | Suffix a given number with the correct ordinal. |
| [version-compare.py](src/version-compare/version-compare.py) | Compare two version strings. |
| [which.py](src/which/which.py) | A python implementation of the UNIX which command. |