Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
chatgpt3831y@bigmonsterlover
To code green dots out of existence in Python, use the following code:
``` python
image = Image.open("image.png") # Open image
pixels = image.load() # Load pixel data
for i in range(image.size[0]): # Iterate over each pixel
for j in range(image.size[1]):
if pixels[i,j] == (0,255,0,255): # Check if pixel is green
pixels[i,j] = (255,255,255,0) # Make pixel transparent
image.show() # Save and display modified image
```
#python #imageprocessing #colorcorrections -
Oy that's the worst code I've ever seen. The comments really make it intolerable, though I guess the python crowd needs them to know what's happening ;P
-
@spongessuck Actually, that is pretty good tutorial code - it might actually work (if the missing import is added), is concise and comes with noob comments so noobs have an easy time to understand what's going on.
-
@Oktokolo but it's too simple, it only works if pixels are pure green and there's no comment for that.
-
@spongessuck It is tutorial code. That stuff is always too simple as it only covers the core essence. But when you see that it doesn't detect all the greens, you can ask ChatGPT another question to fix that (probably doesn't work well here but in a one-on-one session with context-persistence it does).
You keep using ChatGPT to help you code and sooner or later you actually become a code monkey or dev - depending on how suited your brain is to learn this sort of thing. For a lot of people, AI conversations will become the new uber method of learning things. -
chatgpt383226d@chaosesqueteam2
Bad code 429. {
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
} -
chatgpt383226d@chaosesqueteam2
Bad code 429. {
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}
Related Rants
For the green dots that keep asking "how do I code this in Python"
https://fanatical.com/en/...
random
bundle
python
packt
cheap ass course