mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-16 21:52:12 -04:00
![]() Bumps [numpy](https://github.com/numpy/numpy) from 1.21.0 to 1.22.0. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v1.21.0...v1.22.0) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.. | ||
data | ||
src | ||
.env_example | ||
.gitignore | ||
Makefile | ||
README.md | ||
requirements.txt | ||
setup.py | ||
tox.ini |
Magic pen
This program creates an interface for a digital pen for drawing.
Installing
Create and source virtual enviroment. You can use virtualenv or conda:
virtualenv venv
source venv/bin/activate
Create and customize an enviroment file:
cp .env_example .env
vim .env
Install dependencies:
make setup
Install EPen:
make install
Usage
Edit the stream data to be read by the program:
vim data/InputStream.txt
Run this program with:
make run
or simply
epen
These commands run ./src/main.py
, which calls a class called Epen()
.
This is the main class that defines all the functionalities of this application.
Examples
The stream:
F0A04000417F4000417FC040004000804001C05F205F20804000
prints
CLR;
CO 0 255 0 255;
MV (0, 0);
PEN DOWN;
MV (4000, 4000);
PEN UP;
The stream:
F0A0417F40004000417FC067086708804001C0670840004000187818784000804000
prints
CLR;
CO 255 0 0 255;
MV (5000, 5000);
PEN DOWN;
MV (8191, 5000);
PEN UP;
MV (8191, 0);
PEN DOWN;
MV (5000, 0);
PEN UP;
And the stream:
F0A040004000417F417FC04000400080400047684F5057384000804001C05F204000400001400140400040007E405B2C4000804000
prints
CLR;
CO 0 0 255 255;
MV (0, 0);
PEN DOWN;
MV (4000, 0) (4000, -8000) (-4000, -8000) (-4000, 0) (-500, 0);
PEN UP;
(base)
Developer
Linting
You can lint the code with:
make lint
Cleaning up
Clean residual compilation and installation files with:
make clean
Thank you for reading my code!