Various Python Tools
Project description
bpyth
Some boring Python Tools, see jupyter
directory
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
flatten
: 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.1.tar.gz
(8.5 kB
view details)
Built Distribution
bpyth-0.1.1-py3-none-any.whl
(9.7 kB
view details)
File details
Details for the file bpyth-0.1.1.tar.gz
.
File metadata
- Download URL: bpyth-0.1.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2e5811c585b26f12008ae953ca3153498e85999ddd0ad59162b412d4b6632b9 |
|
MD5 | b35c6889bcc9c2475fc406992330c9d4 |
|
BLAKE2b-256 | 6b9d19ac65d63b016e91339c78a43f7b9dcfa5e9fff7414a78aef392bde13316 |
File details
Details for the file bpyth-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: bpyth-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.7 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 | aec1b28a5479fad36882964888a60fa4bdfe0d66bfb9d0f803bc667b6f814dd6 |
|
MD5 | 8290f7c96becc74ac4e238acb00dc7fc |
|
BLAKE2b-256 | 44cf3c09e644f043db0ff68ebc76621928af4bf15d61972dfa2481fac3a1457c |