Skip to main content

A collection of handy Python utilities

Project description

c66

A collection of handy Python utilities.

Installation

pip install c66

Usage

  • pp: Prints the names and values of variables from the calling line.

    from c66 import pp
    
    x = 10
    y = "hello"
    pp(x, y + " world")
    

    Output:

    x: 10
    y + " world": hello world
    
  • pps: Prints the shapes.

    from c66 import pps
    import torch
    x = torch.randn(2,5,1)
    y = torch.randn(3,)
    pps(x,y)
    

    Output:

    from c66 import pps
    x's shape: torch.Size([2, 5, 1])
    y's shape: torch.Size([3])
    
  • print: Prints the provided arguments when c66.show_print is True. If c66.show_print is False, it returns None without printing. The default of c66.show_print is True

    from c66 import print, show_print
    
    x = 42
    y = "test"
    
    # Default behavior (show_print = True)
    print(x, y)  # Prints: 42 test
    
    # Disable printing
    c66.show_print = False
    print(x, y)  # No output
    
    # Re-enable printing
    c66.show_print = True
    print(x, y)  # Prints: 42 test
    

More Tools

Additional utilities will be added in future updates. Stay tuned!

Author

ChoCho66

License

MIT

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

c66-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c66-0.1.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file c66-0.1.2.tar.gz.

File metadata

  • Download URL: c66-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for c66-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1fbe151c84b7fbc7ef8dfed4459760a587bb38c96a84500a611d345585132b4e
MD5 49522992ccd0cbba0f952b152cde7438
BLAKE2b-256 46020b4ec71b9bf122fb2319e89cb8ee9019339d012d185f5f53de2f507d6509

See more details on using hashes here.

File details

Details for the file c66-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: c66-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for c66-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5444dec7e769d76a4a0692866ee592de0a2e4d05cac14a3821feff78daa2bed9
MD5 f45cf01a023fb0dce7f3d944dbe7fa92
BLAKE2b-256 1b24a832a20a7ca035d4a8a789c26a36a387c9521d213f588fc19bdacc7b506f

See more details on using hashes here.

Supported by

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