@villares@ciberlandia.pt

ciberlandia.pt

Publicações públicas de @villares@ciberlandia.pt

Dear @doctormo@doctormo, I’m a great admirer of your work in general and hopefully I won’t creep you out by telling everyone I’m your fan!

As a creator of digital vector-based art I find the color management stuff (trying to figure how to generate things to print “in CMYK”) mind boggling. I slowly try to read and acquire the concepts and vocabulary to understand more about this. I’m grateful for your work in this area. Thank you!

#FLOSS #CMYK #ColorManagement #inkscape

⤋ Read More

Sometimes it’s a small thing, it’s a bit jarring when orgs that want to pose as international/global publish some copy/event based on US school terms/seasons. That’s a reminder of how other people are at the periphery and will be probably ignored most of the time. Isn’t it obvious we have different school year arrangements & seasons around the world? I guess @melissawm@melissawm will share my sentiments about this.

⤋ Read More

I only learned about the .envelope object/propriety in #shapely yesterday, before that I used .bounds (a min/max of points tuple), but envelope is good to know because it provides an easy way of getting the centroid and the area of the bounding box, which can be very useful.

⤋ Read More

Interactive demo of #shapely’s centroid for the triangle :)

import py5
from shapely import Polygon, Point

def setup():
    py5.size(400, 400)
    py5.stroke_join(py5.ROUND)
    
def draw():
    py5.background(200)
    pts = ((100, 100), (300, 100),
           (py5.mouse_x, py5.mouse_y))
    xs, ys = zip(*pts)
    cx = sum(xs) / len(xs)
    cy = sum(ys) / len(ys)
    tri = Polygon(pts)
    py5.no_fill()
    py5.stroke_weight(1)
    py5.stroke(0, 200, 0)
    py5.shape(Point(cx, cy).buffer(5))
    py5.stroke(0, 0, 200)
    py5.shape(tri.envelope.buffer(2))
    py5.shape(tri.envelope.centroid.buffer(5))
    py5.stroke_weight(3)
    py5.stroke(0)
    py5.shape(tri)
    py5.fill(0)
    py5.shape(tri.centroid.buffer(2))

py5.run_sketch(block=False)

#py5 #python #creativeCoding

Video

⤋ Read More

Oi @claromes@claromes, acredito que você manja desses paranauês, dei umas buscas e não encontrei…

Queria saber se as fotos que as pessoas mandam pro Instagram mantém os metadados, se podem conter localização e tal… (desconfio que a Meta guarda a sua localização no momento da postagem e os metadados das fotos para os fins nefastos deles mas publicam uma foto com os metadados removidos, mas não consegui confirmar essa informação)

Se tivesse uma tabela pra eu mostrar pros meus alunos sobre quais serviços fazem o quê com os metadados das fotos ia ser lindo…

#metadodos #fotografia

⤋ Read More

In order to publish my personal projects/pages (and most of my teaching materials, hundreds of pages) on #Codeberg, I need to convert #markdown files into #HTML and sprinkle some CSS & JS from a layout template, like #GitHub’s Pages #Jekyll does, but I dread the complexity of installing and tending to Jekyll or Hugo or other static site generators, and I can’t even imagine going near Forejo Actions or any sort of CI intergration.

Should I be brave and do the Jekyll /static generator thing? Any other ideas for poor, overworked, stressed out, clumsy people? :(

⤋ Read More

Help needed… can the #CodebergPages of #codeberg repos become subdirs of the “main” custom domain?

Currently https://villares.lugaralgum.com is published from a pages repo on https://codeberg.org/villares/pages

Can my /villares/other_repo/ page (from a pages branch I suppose) be published at villares.lugaralgum.com/other_repo ?

(this is how GitHub Pages work by default, can it be replicated on Codeberg?)

⤋ Read More

Help needed… can the #CodebergPages of #codeberg repos become subdirs of the “main” custom domain?

htts://villares.lugaralgum.com is published from a pages repo on codeberg.org /villares/pages

Can my /villares/other_repo/ page (from a pages branch I suppose) be published at villares.lugaralgum.com/other_repo ?

(this is how GitHub Pages work by default, can it be replicated on Codeberg?)

⤋ Read More

I’m using #Filen (@filen@filen) for a while now and I’m very pleased with it!

«Affordable zero-knowledge end to end encrypted cloud storage made in Germany.» Works on #Linux, nice well thought features.

So I’m going to share a referral link because «For every friend you invite to Filen you receive 10 GB - and your friend also receives 10B. It’s that easy»:

https://filen.io/r/631ce32074f259f710691e4eec751eb9

⤋ Read More

I have been using #Filen (@filen@filen) for a while now and I’m very pleased with it!

«Affordable zero-knowledge end to end encrypted cloud storage made in Germany.» Works on #Linux, nice well thought features.

So I’m going to share a referral link because «For every friend you invite to Filen you receive 10 GB - and your friend also receives 10B. It’s that easy»:

https://filen.io/r/631ce32074f259f710691e4eec751eb9

⤋ Read More

Updating my #Processing + #Python tools table:

https://github.com/villares/Resources-for-teaching-programming/blob/main/README.md#processing–python-tools-table

After some years, things changed and my opinions changed a bit too:

  • #py5 is going super strong and the “new snake_case names” are not an issue for me anymore. I used to worry a lot about all the Processing Python mode examples and teaching materials out there, and some of my own, with “CamelCase Processing names” I’m not worried at all about it anymore!

  • For the record, Processing Python mode is just a legacy thing, no one should start anything with it.

  • The great pure Python Processing implementation project #p5py seems stalled, latest release in Dec. 2023 :((( Advancing it was always going to be an uphill battle…

  • The unrelated Brython based site p5py.com seems to be gone, so I removed it from the table.

  • I added a link to my own #pyp5js hack py5pjs/py5mode because this is what I’m using most nowadays.

⤋ Read More

Updating my #Processing + #Python tools table:

https://github.com/villares/Resources-for-teaching-programming/blob/main/README.md#processing–python-tools-table

After some years, things changed and my opinions changed a bit too:

  • #py5 is going super strong and the “new snake_case names” are not an issue for me anymore. I used to worry a lot about all the Processing Python mode examples and teaching materials out there, and some of my own, with “CamelCase Processing names” I’m not worried at all about it anymore!

  • For the record, Processing Python mode is just a legacy thing, no one should start anything with it.

  • The great “pure Python” (no Java required) Processing implementation project #p5py seems stalled, latest release in Dec. 2023 :((( Advancing it was always going to be an uphill battle…

  • The unrelated Brython based site p5py.com seems to be gone, so I removed it from the table.

  • I added a link to my own #pyp5js hack py5pjs/py5mode because this is what I’m using most nowadays.

⤋ Read More

Updating my #Processing + #Python tools table:

https://github.com/villares/Resources-for-teaching-programming/blob/main/README.md#processing–python-tools-table

After some years, things changed and my opinions changed a bit too:

  • #py5 is going super strong and the “new snake_case names” are not an issue for me anymore. I used to worry a lot about all the Processing Python mode examples and teaching materials out there, and some of my own, with “CamelCase Processing names” I’m not worried at all about it anymore!

  • For the record, Processing Python mode is just a legacy thing, no one should start anything new with it.

  • The great “pure Python” (no Java required) Processing implementation project #p5py seems stalled, latest release in Dec. 2023 :((( Advancing it was always going to be an uphill battle…

  • The unrelated #Brython based site p5py.com seems to be gone, so I removed it from the table.

  • I added a link to my own #pyp5js hack py5pjs/py5mode because this is the version of pyp5js I’m using most nowadays.

⤋ Read More

Updating my #Processing + #Python tools table:

https://github.com/villares/Resources-for-teaching-programming/blob/main/README.md#processing–python-tools-table

After some years, things changed and my opinions changed a bit too:

  • #py5 is going supper strong and the “new snake_case names” are not an issue for me anymore. I used to worry a lot about all the Processing Python mode examples and teaching materials out there, and some of my own, with “CamelCase Processing names” I’m not worried at all about it anymore!

  • For the record, Processing Python mode is just a legacy thing, no one should start anything with it.

  • The great pure Python Processing implementation project #p5py seems stalled, latest release in Dec. 2023 :((( Advancing it was always going to be an uphill battle…

  • The unrelated Brython based site p5py.com seems to be gone, so I removed it from the table.

  • I added a link to my own #pyp5js hack py5pjs/py5mode because this is what I’m using most nowadays.

⤋ Read More

#GitHub is becoming unusable! Images on discussions no longer load for me most of the time, posts keep loading infinitely and it breaks the reply feature… I’m really pissed by this. Is it just me? Does it think I’m a bloody AI scraper bot or something? What the hell.

⤋ Read More

#Pillow #PIL #Python
On Image.fromarray():

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) img1 = PIL.Image.fromarray(my_array, mode="RGB")

So I went to see the documentation:

https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray

And came out empty handed, that is, couldn’t understand what to do instead :(

And the plot thickens (this affects many projects, there are some workarounds, but some argument about “reverting” this change allowing some “mode” on import):

https://github.com/python-pillow/Pillow/pull/9063

(@py5coding@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses mode=“RGB”)

⤋ Read More

#Pillow #PIL #Python

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) img1 = PIL.Image.fromarray(my_array, mode="RGB")

So I went to see the documentation:

https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray

And came out empty handed, that is, couldn’t understand what to do instead :(

And the plot thickens:
https://github.com/python-pillow/Pillow/pull/9063

(@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses this)

⤋ Read More

#Pillow #PIL #Python

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) img1 = PIL.Image.fromarray(my_array, mode="RGB")

So I went to see the documentation:

https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray

And came out empty handed, that is, couldn’t understand what to do instead :(

And the plot thickens (this affects many projects, there are some workarounds, but some argument about “reverting” this change allowing some “mode” on import):

https://github.com/python-pillow/Pillow/pull/9063

(@py5coding@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses mode=“RGB”)

⤋ Read More

#GitHub #GitHubPages #fail This is driving me mad…

Images randomly deciding not to load on all my pages.

Is it just me? Is it my browser’s fault? Is it just in Brazil?

I was working on this #shapely + #trimesh page… and I can only see the last image (the animated gif)!

https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/shapely-e-trimesh.html

Update: On this exact page I have bungled the image URLs (I blame Marktext for being stupid and not using a relative reference). But I swear loading problems have been going on other well formed pages.

⤋ Read More

This is your friendly reminder that you could be making #PaperObjects with #Python and #py5, you know?

https://github.com/villares/Paper-objects-with-Processing-and-Python/

(Mind you that GitHub images are mostly failing to load here today for some unknown reason)

If you like this, support my work:
https://www.paypal.com/donate/?hosted_button_id=5B4MZ78C9J724
https://liberapay.com/Villares
https://wise.com/pay/me/alexandrev562
#Processing #CreativeCoding

Video

⤋ Read More

I have this very simple #Python script that uses #imageio to convert all PNG files on a folder into a #GIFAnimation, and this is a #FreeSimpleGUI version of it (I usually run a command line version).

As I usually run #gifsicle on the command line after creating a GIF, I decided to update it to add #pygifsicle to do it for me and save a step.

https://github.com/villares/sketch-a-day/blob/main/admin_scripts/make-gif.py

Image

⤋ Read More

«Using data from Morgane Laouenan et al., the map is showing birthplaces of the most “notable people” around the world. Data has been processed to show only one person for each unique geographic location with the highest notability rank. Click below to show people only from a specific category.
Made by Topi Tjukanov.»

https://tjukanovt.github.io/notable-people

via @mekaru@mekaru
#wikidata #cartography

⤋ Read More

Impossible Linux things in my to-do list:

  • Fix erratically jumping mouse wheel scrolling on a Dell
  • Make a “SysRq key” work so I can do “REISUB” or something, when my computer freezes

I must have spent days (multiples of 24 hours) trying to solve these things and maybe I should just give up.

I suppose that if I had a “Linux experienced” friend by my side these could be solved in minutes, maybe?

#OldManScreamsAtLinux

⤋ Read More

Pessoas da comunidade brasileira de #ProgramaçãoCriativa por muitos anos fizeram encontros sob o nome promovido pela Fundação Processing, os chamados #ProcessingCommunityDay, fizemos encontros em várias cidades e então depois de 2020, com a pandemia do COVID-19, fizemos três eventos nacionais muito inspiradores em 2021, 2022 e 2023 (vide https://compoetica.github.io/links/)

Ano passado não conseguimos fazer e este ano pretendemos retomar, só que usando outro nome: #Compoética. Vamos aos poucos divulgar mais sobre o encontro brasileiro de programação criativa em https://compoetica.github.io/CP2025/

Meus agradecimentos profundos ao @guilhermesv@guilhermesv que dedica generosamente um enorme esforço para organizar esses eventos da comunidade e cria o design e peças de comunicação sempre emocionantes de lindos.

Video

⤋ Read More

Lazy-fedi-question… I have a “working”(?) code example of TF-IDF #tfidf using #scikitlearn and I know the main concepts, but all the tutorials I find are a bit — I don’t want to be harsh but —crappy… Can someone point me to some nice open resource on it?

⤋ Read More

Serasa Experian Ă© uma empresa tĂŁo pilantra mas tĂŁo pilantra que agora estĂŁo descaradamente fazendo spam a partir de emails coletados do registro brasileiro de domĂ­nios (Registro.BR) Ă© muito irritante.

⤋ Read More

Cheers @danzin@danzin, was it you who added a PR to core #Python about pprint?

(listening to #corepy #podcast)

Update: Thank you so much for improving Python @danzin@danzin !

core.py: PyCon US 2025 Recap
Starting from: 01:32:45 https://podcasters.spotify.com/pod/show/corepy/episodes/PyCon-US-2025-Recap-e347dc3
https://anchor.fm/s/eb6edc3c/podcast/play/104100675/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2025-5-13%2Fb281ac3a-b0ec-49b9-b31d-7a90031e910d.mp3#t=5565

⤋ Read More