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.4.tar.gz (2.9 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.4-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: c66-0.1.4.tar.gz
  • Upload date:
  • Size: 2.9 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.4.tar.gz
Algorithm Hash digest
SHA256 5e88dd425a01a91bd74a902fab8963eb06e97b7e9538d9dc44792377570c0ac0
MD5 87cdc8af81ad9d720ee14a671367e0b4
BLAKE2b-256 f1173da98edad6259328cf72ecefe5e7f18faa4f3001231f835e66b2e194247e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: c66-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cd118da231720d5cdaf898d19580209d054b3c38ef4460733d5770a12e2d78e4
MD5 f3ec773f4017e113274a9cba66eec59d
BLAKE2b-256 476a7ddaefab5533a56d90bbab98044e1b5778dc14c85e3db23b6449bf0446fd

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