A #Dreamhost tip, I learned the hard way... if you forget you host a friend's site that is using an old PHP version (like, before 8.0) you'll pay an extra USD 5 every month, billed as PHP extra support or something. Ouch! Just update the PHP version :-S
Faz uns dois meses eu andei mexendo na minha página sobre transformações do sistema de coordenadas (no contexto de desenho com #py5 (#Processing + #Python). Eu ia ficar feliz se alguém aqui quiser dar uma olhada/revisada e oferecer algum feedback....
Would anyone know of an offline #blockly-like editor for #Python, that is, something with blocks like #scratch, but to run programs on a normal local Python interpreter? #ComputingEducation
Update: It seems that #blockpy is based on #blockly, but the later is more well known, so I edited this toot to make it more "findable". Also, I asked a question at the blockly email forum, let's see if someone answers...
@villares#scratch can pull it off because the language is pretty simple. #python has so many features I don't think it would make ani sense. and if you would tune the language down, might as well go with scratch. also, maybe check "No Code".
My students want o use emojis with #Processing#py5 (obviously they want to display lewd stuff, like aubergines [falling with pymunk]) and it seems like this is not that easy ... 😭
@andreasjung It costs little to enforce masks and many people won't come if they are not required. It was great we had them. I wish we had more open air activities as well.
I wrote this to demo a quick #Python#Pillow#PIL conversion of an image to grayscale with a dialog to select the file... then applied it to a picture of me and @rennerocha
taken by John as we were flying back home after wonderful #PyConUS24 :)
from tkinter.filedialog import askopenfilename<br></br>from pathlib import Path<br></br><br></br>from PIL import Image<br></br><br></br># Open a select file dialog (a bit ugly on my OS)<br></br>file_path_str = askopenfilename() # '' if cancelled<br></br>if file_path_str: # guards against a cancelled dialog<br></br> file_path = Path(file_path_str) # a pathlib.Path object from the str<br></br> new_name = file_path.stem + '_altered' + file_path.suffix # keep suffix<br></br> # Make it output a PNG if you want LA mode to keep alpha<br></br> # new_name = file_path.stem + '_altered.png' maybe I should check for PNGs?<br></br> output_path = file_path.parent / new_name<br></br> try: # to handle any exceptions (runtime errors while converting/saving)<br></br> with Image.open(file_path) as im: # load image<br></br> altered_im = im.convert('L') # to grayscale (use 'LA' to keep alpha)<br></br> altered_im.save(output_path) # save image<br></br> print(f'Saved {output_path.name}!')<br></br> except Exception as err: # ... treat exception<br></br> print(err)<br></br>