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

Uploaded Python 3

File details

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

File metadata

  • Download URL: c66-0.1.3.tar.gz
  • Upload date:
  • Size: 2.7 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.3.tar.gz
Algorithm Hash digest
SHA256 5bd1fcd4db911958398efabafcbce4a5c0beea7866da708fe5d4638d66a8cb2c
MD5 e4fc9b7f2814e900bdb318c69beb2f34
BLAKE2b-256 b4c9c571d39aa296866f45dd9de25100eb1152629e9d5e84ce66c20e2b8c8cde

See more details on using hashes here.

File details

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

File metadata

  • Download URL: c66-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3bbddd9bb3a0c95615824eef41cf78e0928148f3827f86ba0eb8e87d765a0264
MD5 5cc40b6b3514fdbf263055854386c587
BLAKE2b-256 5322644b269f5edb2ca274f6bbe7dc6df97bf36c020cfb3312dea1f8b1ae9b3c

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