mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-12-01 20:54:53 -05:00
| .. | ||
| data | ||
| src | ||
| test | ||
| .gitignore | ||
| AlpcPart1-190801.pdf | ||
| main_test.py | ||
| Makefile | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
| tox.ini | ||
Efun: Art + Logic Enconding + Decoding
This program i) converts and encodes a 14-bit decimal input value to a 2-byte hexadecimal, ii) decodes hexadecimal representations to 14-bit decimal (as described in this doc.
Installing
Create and source virtual enviroment. You can use virtualenv or conda:
virtualenv venv
source venv/bin/activate
Install dependencies:
make setup
Install Efun:
make install
Usage
Encoding
To enconde a integer, run:
efun -e <integer>
Note that the value must be in the range [-8192, 8191].
Decoding
To decode an integer, run:
efun -d <integer>
Note that the value must be in the range [0x0000, 0x7F7F].
Developer
Running tests
You can run tests with:
make test
Linting
You can lint your code with:
make lint
Cleaning up
Clean residual compilation and installation files with:
make clean
Thank you for reading my code!