A collection of utility modules to aid in the creation of Circuit Maker 2 builds.
Project description
cm2util
cm2util is a collection of utility modules to aid in the creation of Circuit Maker 2 builds. New modules and features are still being added.
Installation
Use the package manager pip to install cm2util.
pip install cm2util
Documentation
Image
from cm2util import Image
image = Image("path/to/image", size=50)
print(image.raw) #savecode
print(image.link) #dpaste link containing savecode
Memory
from cm2util import Memory
Circuit
from cm2util import Circuit
circuits = Circuit()
@circuits.build
def Mux(D0, D1, s):
not1 = circuits.NOT(s)
and1 = circuits.AND(D0, not1)
and2 = circuits.AND(D1, s)
or1 = circuits.OR(and1, and2)
output = or1
return output
saveCode = circuits.export(Mux)
print(saveCode)
Compress
from cm2util import Compress
dpaste_link = Compress(saveCode)
print(dpaste_link)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cm2util-0.1.tar.gz.
File metadata
- Download URL: cm2util-0.1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1dcfa3d5b7b5132403118b9ca4c0c1a70e45eb44408c524c00556abd6633a7f
|
|
| MD5 |
1c055628aebcb576a3f5ee4a34a0a5a3
|
|
| BLAKE2b-256 |
ff8c3dbbdad71783e29e0d07a238222a7e4fa6cfbdfce06258c4ba0b3820b41c
|
File details
Details for the file cm2util-0.1-py3-none-any.whl.
File metadata
- Download URL: cm2util-0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecbafa99702a9503da7160df9fb5cf39db70844cf8847df63608b2d2b8f3c0f8
|
|
| MD5 |
dfb341ebbad162e7a24c934d35651c57
|
|
| BLAKE2b-256 |
07131fc111bcf83dd160ba0fea093701bde9c548d59cd2cef9f816c739ba0505
|