Skip to main content

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, close
  • load_pickle: open, load, close
  • StreamFiles: Iterable, returns all filenames of a parent directory
  • StreamLines: 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 time
  • human_readable_bytes: Converts Bytes to human readable size

Iterable Tools

  • minivenn: Compare two sets
  • flatten: Yield all items from any nested iterable
  • remove_dups: Remove dups from a list whilst-preserving-order
  • sort_by_priority_list: Sort a list by a list or tuple of prioritized objects
  • cut_counter: Truncates rare values of a counter
  • ranking_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 whitespaces
  • remove_words : Removes stopwords
  • remove_dupwords: Removes dup words from a string whilst-preserving-order
  • longest_substr : Finds the longest common substring in a list of strings
  • random_str : Returns a random string


          

Project details


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.6.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

bpyth-0.1.6-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file bpyth-0.1.6.tar.gz.

File metadata

  • Download URL: bpyth-0.1.6.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for bpyth-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5f9955afae3978d47c478095ef34aa1421bcdb94d33e8263b50d7d0cbc6010b0
MD5 3c49ded6939f02580c086b5a54a30a55
BLAKE2b-256 99baac880a42ef8485ce6f6d276cff2d483bd7c49b4eb5855c54c1bcdc50377c

See more details on using hashes here.

File details

Details for the file bpyth-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: bpyth-0.1.6-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

Hashes for bpyth-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 42dae65eb43ab8191e9671d1a7850ee724094449d66ef9d2e1e008a817e92c4a
MD5 cd40b4944a3e270e9309ce5af22b6a6c
BLAKE2b-256 95713f30fa2ceaf986bdf1d800d981943a48fe3d669a37f6826656f99e5a09c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page