Various Python Tools
Project description
bpyth
Some boring Python Tools, see jupyter
directory.
You can try the notebooks there online via 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.5.tar.gz
(9.3 kB
view details)
Built Distribution
bpyth-0.1.5-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file bpyth-0.1.5.tar.gz
.
File metadata
- Download URL: bpyth-0.1.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0148269b5619aa45d2941ee238cd999f3e2b938ca5b4a2a166da4133ebeb2d29 |
|
MD5 | 92e4e698c26156cb00fae1d2ad0492fd |
|
BLAKE2b-256 | 17a0cba588a19c479045bba0e271655ae74b28bc2770c337de2b738df21d0f28 |
File details
Details for the file bpyth-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: bpyth-0.1.5-py3-none-any.whl
- Upload date:
- Size: 10.3 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 | d154fa34483d8a76c697665614cb6f3449b4401001ad43d48c0148859fc29976 |
|
MD5 | 3e16928aa8b0cf7b77c7ba49ae8bc34b |
|
BLAKE2b-256 | 90d382d0027d25173a331fac8b2f80ad11093a6d068bb159e831e5c79c119220 |