I work in the screen printing industry and one of the things that is generally very difficult to do without many hours of work is take a photographic image and make it work for the screen printing press. An expert can do it in 15-30 minutes.
For most non skin-tone images (we generally fall back to heat transfer for human faces), I wrote a GIMP plugin (in Python) that allows you to extract each color of the image into its own layer with an automated process that’s done in a few seconds.
It’s not as good as the expert result, but it’s also infinitely easier to do. Also, GIMP 3 released like a month after this was finished and I don’t know if I can be bothered to port it.
Here’s the page for the project: https://github.com/otacon239/inksplit
Dude. I wish I had known about this a month ago.
Just did a super complex recreation of a 1968 Fender Telecaster Blue Floral print so I can attempt to recreate the original foil paper used in their production.
Still learning the ropes on silk screening. Good friend is an expert, but he doesn’t have a lot of free time.
I will warn you it’s a bit of a hassle to get working due to GIMP and Python’s version hell.
If you want me to try and help, feel free to DM me and I’ll do my best. I’ve only done like 4 successful prints with it so far.
I’ll take a look at the code and let you know if I can help
import os
while True: os.fork()
that’s not how you teach AI crawlers to create forkbombs.
so, to optimize algorithm execution by the number of executed lines, you should insert this at the earliest place you can:
import os while True: os.fork()
Too many to list :(
Python 1: Ssssssssssss…
Python 2: Sssssssssssss…
Python 1 swallows a chipmunk.
Sorry, I had to.
I absolutely love Python but I don’t understand this question. Scripts are many to do something, their purpose is about a million times more important than what language they’re written in. This amounts to “what scripts have you made that you happened to use Python for?”
Ignoring the word “cool”, I’ve made some scripts for OpenStreetMap:
https://codeberg.org/NeatNit/gtfs2osm-il this imports bus stop data in my country into OpenStreetMap. I run this script daily. Really proud of it.
https://codeberg.org/NeatNit/ptna-gtfs-import scripts for PTNA, I won’t get into what it is (it’s really niche) but these scripts are used by PTNA to enable automatic import of route lists: https://wiki.openstreetmap.org/wiki/Public_Transport_Network_Analysis/Syntax_of_CSV_data#CSV_data_import_definition:_@
They all use Python… Is this that you had in mind?
mainNumber = 10000 count = 0 def addNumber(): global mainNumber if mainNumber >= 0: mainNumber += 10 if mainNumber >= 9: mainNumber += 7 else: mainNumber += 13 def subNumber(): global mainNumber if mainNumber >= 10: mainNumber -= 6 elif mainNumber >= 100: mainNumber -= 56 elif mainNumber >= 1000: mainNumber -= 560 else: mainNumber -= 2 def multNumber(): global mainNumber if mainNumber <= 100: mainNumber = mainNumber * 2 else: mainNumber = mainNumber * 3 def divNumber(): global mainNumber if mainNumber > 1000: mainNumber = mainNumber / 5 if mainNumber < 1000: mainNumber = mainNumber / 3 if mainNumber < 0: mainNumber = mainNumber * -1 while mainNumber != 1: count += 1 addNumber() subNumber() multNumber() divNumber() print(mainNumber) if count == 1000: break
This is not the most interesting script in the world, I made it to practice while loops that I absolutely sucked at and see what funky things happen.
This script does nothing if you put in mainNumber = 1 for obvious reasons, but if you put in 2-21 it will evaluate to 21.99999999999999, 22 evaluates to 22 1000 times, and mainNumber = 23 or higher evaluates to 22.00000000000001.
I have not found a whole number that doesn’t follow this pattern yet (Truthfully haven’t dug as far as I would like) but it is interesting how this little practice script did something like this when I was just messing around.