Various Python Tools
Project description
bpyth
Some boring Python Tools, see jupyter
directory.
Try out
The directory jupyter
contains many notebooks with examples. They are very easy to try out interactively online, with Google Colab. Just click the link at the top of the page and then select Runtime/Run all from the menu in Colab.
Install
pip install bpyth
Files Tools
dump_pickle
: open, dump, closeload_pickle
: open, load, closeStreamFiles
: Iterable, returns all filenames of a parent directoryStreamLines
: Iterable, returns all lines of a text file
Human Tools
human_readable_number
: Rounds a number to a fixed number of significant digits.human_readable_seconds
: Converts seconds to human readable timehuman_readable_bytes
: Converts Bytes to human readable size
Iterable Tools
minivenn
: Compare two setsflatten
: Yield all items from any nested iterableremove_dups
: Remove dups from a list whilst-preserving-ordersort_by_priority_list
: Sort a list by a list or tuple of prioritized objectscut_counter
: Truncates rare values of a counterranking_from_counter
: Converts a counter into a ranking
Object Analysis Tools
rtype
: Recursive type. Parses an n-dimensional object and returns a tuple of stype for the scalar in the top left corner.shape
: Recursive len. Parses an n-dimensional object and returns a tuple of sizes.has_shape
: Does an object have additional dimensions? (Skalars: No, Strings: No, Empty Iterables: No, Other Iterables: Yes)memory_consumption
: Returns the memory consumption of Python objects.
String Tools
superstrip
: Removes Unicode whitespacesremove_words
: Removes stopwordsremove_dupwords
: Removes dup words from a string whilst-preserving-orderlongest_substr
: Finds the longest common substring in a list of stringsrandom_str
: Returns a random string
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bpyth-0.1.9.tar.gz
(9.7 kB
view details)
Built Distribution
bpyth-0.1.9-py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file bpyth-0.1.9.tar.gz
.
File metadata
- Download URL: bpyth-0.1.9.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3cd8287b922d5bec4edd3fd14ad2408740aa27ff051d250eec3d0b1a1bf11d4 |
|
MD5 | 58feee8ef294d1e181e1ffb58e3918ba |
|
BLAKE2b-256 | 263cfa4981e94a463fba7c2128529893b7b1b90f4ad9c1207f3f6355280b2171 |
File details
Details for the file bpyth-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: bpyth-0.1.9-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84c438591d9530bde1bc1384f824e6432afe2e1c7e033c9e4eca8625566c91ce |
|
MD5 | 0a7f38ad6caa3d51efa128b1720c7272 |
|
BLAKE2b-256 | 21bc19d612d86b12d6573daab10716bcf7707bb09cb1503862db3908c85a98c7 |