Sometime I get an idea in my head that makes me chuckle. Most of those times I really need to just stop and not move forward. I ignored that this time and created this insanity.
Thats the nicest thing anyone has ever said to me :D
I've been working on learning python more and more. Courses and whatnot are not helping. I tend to learn better by doing my own projects so I can actually learn how things interact. This was a fun little project that had me chuckling every time I ran a portion to test.
Use context manager, ie with open, to operate on files. In case your for loop experiences an error the file won't close now. Context manager handles it for you.
I hosted a "Best Worst Website" competition for my coworkers and myself a couple months ago, and my contribution was exactly this concept (but written in JS). Hilariously fun and abysmal performance. I loved it.
Haha! I'll get one generated tonite and send it over :D I promise to try and keep it a reasonable size lol ( I generated one earlier that was 500MB... that was a poor decision )
repl.it is great for this sort of thing, you get your own little subdomain (I think this will fit in the free storage limit, if not you can host a server there and decompress/generate this on the fly)
103
u/duolc84 Aug 22 '21
Sometime I get an idea in my head that makes me chuckle. Most of those times I really need to just stop and not move forward. I ignored that this time and created this insanity.
27
u/303Redirect Aug 22 '21
Have you uploaded a generated web page anywhere? Make some people's chrome tabs squeal
2
u/Amonomen Aug 23 '21
Internet explorer says no.
37
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Aug 22 '21 edited Aug 22 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
17
u/robin_888 Aug 22 '21
Reminds me of my image generator for the TI-83+.
It had a 96x48(?) monochrome display and connected to the PCs serial port. But I don't think it had capability to load images onto it.
But you could program it in a Basic dialect and it had drawing commands.
So what I did was:
drawlinecommands into a file.Once done I even could save "screenshot" to local memory.
3
u/gothicVI Aug 23 '21
The really bad part though is not using a context manager for writing to the file.
Love it.
1
u/[deleted] Aug 24 '21
This is actually really similar to homework we got in high school once...
Ah good old times, when we did stupid things, because teachers told us to....