innix / github-avatar-generator Goto Github PK
View Code? Open in Web Editor NEWA GitHub-esque avatar image generator written in Python.
License: MIT License
A GitHub-esque avatar image generator written in Python.
License: MIT License
If you try to create an avatar with more blocks than can be fitted on the image, the avatar generator will loop forever.
Reproducible example:
$ python3 example.py 420 32 avatar_01.png
The generator should detect if too many blocks have been asked for, and raise an exception.
Sometimes the generated avatars will have extra or missing blocks in them (e.g. 6
blocks when you asked for 5
, or 5
blocks when you asked for 6
).
Block placement is RNG so reproducing may take several runs. Run this a few times and eventually you will get an image with more or less than than 6 blocks:
$ python3 example.py 420 6 avatar_6_blocks.png
It is not isolated to even numbers, using an odd number 5
and the same issue will be seen:
$ python3 example.py 420 5 avatar_5_blocks.png
The problem is caused by how the generator creates vertically symmetrical images and dealing with "central" blocks that don't need an opposing block to ensure symmetry. The generator needs to be smarter about where to place blocks to ensure the avatar has the correct number of blocks but still maintains the vertical symmetry.
Instead of a list of pip
commands in the README for documenting dependencies, we should use a requirements.txt
file instead. The README should also be updated with new instructions on installing the library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.