@villares@ciberlandia.pt

ciberlandia.pt

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

Quinta que vem vamos fazer “partículas” (bolinhas que se movem) com Python, é uma boa introdução às ideias de orientação a objetos (na minha opinião).

Não vou por o link direto da página em que documentamos os nossos encontros do grupo de estudos, no hackmd, por medo de bots de spam, mas está na imagem. Tem registros e código dos encontros anteriores…

#SescAvPaulista #SãoPaulo #TecnologiaseArtes #Python #py5 #ProgramaçãoCriativa

Image

Image

⤋ Read More

Quinta que vem vamos fazer “partículas” (bolinhas que se movem) com Python, é uma boa introdução às ideias de orientação a objetos (na minha opinião).

Não vou por o link direto da página e que documentamos os nossos encontros do grupo de estudos no hackmd por medo de bots de spam, mas está na imagem. Tem registros e código dos encontros anteriores…

#SescAvPaulista #SãoPaulo #TecnologiaseArtes #Python #py5 #ProgramaçãoCriativa

Image

Image

⤋ Read More

Quinta que vem vamos fazer “partículas” (bolinhas que se movem) com Python, é uma boa introdução às ideias de orientação a objetos (na minha opinião).

Tem na imagem o link da página em que documentamos os nossos encontros do grupo de estudos (hackmd . io / @ sesc-av-paulista / estudos-em-python, aqui com espaços por medo de bots de spam). Lá mantemos registros e código dos encontros anteriores…

#SescAvPaulista #SãoPaulo #TecnologiaseArtes #Python #py5 #ProgramaçãoCriativa

Image

Image

⤋ Read More

«The official OSMnx reference paper has just been published open-access by Geographical Analysis: [link below] Years in the making, this article describes what OSMnx does and why it does it that way. But wait, there’s more! I also discuss many lessons learned over the past decade in geospatial software development […]» — @gboeing@gboeing

Modeling and Analyzing Urban Networks and Amenities With OSMnx

https://onlinelibrary.wiley.com/doi/10.1111/gean.70009

#Python #OSMnx #geoviz #geopandas #FLOSS #geospatial #OpenAccess

⤋ Read More

There is no need for class wrappings, “singleton” or “borg” pattern implementations, when you are doing small #CreativeCoding interactive or animated sketches.

Sometimes, keeping global state is needed, and the best, simplest, most readable, teachable way to do it is with some global variables (module scope in Python).

These aren’t the software engineering patterns you’re looking for. #GlobalVariablesCanBeOK

⤋ Read More

My friend @lr once articulated brilliantly something I had not figured out very well before: American filmmakers have a fixation with torture (and serial killers). I don’t want to watch that. For what I heard, I won’t be watching the second season of The Last of Us :(
I encourage you to think about the things you consume. This may sound like the behavior of a “prude catholic” (they ask around and warn friends about lewd contents in order to avoid it) but I don’t think it’s the same. Dehumanizing violence should be dealt with more carefully.

⤋ Read More

#Processing IDE comes with a rich collection of example sketches. A few years ago I have started converting the legacy Processing #Python mode examples to #py5 but I never finished it… would you like to help? It could be as easy as trying to run some examples and reporting if they work or not. And if you find a broken one I could help you fix it (or I could fix it myself…)

https://github.com/villares/py5examples/blob/processing-python-mode-examples/examples-from-Processing-Python-mode/README.md

Video

⤋ Read More

I love Daniel Shiffman and the people porting NOC examples, but their insistence on wrapping everything in classes, and in this particular example, to put them on separate files… Take this L-System example: https://github.com/nature-of-code/noc-2-processing-port/blob/main/chapter8/Example_8_9_LSystem/Example_8_9_LSystem.pde

And the JS original: https://natureofcode.com/fractals/#l-systems (you have to open the p5js editor and click a lot to find the lsystem.js file)

In my view it doesn’t help at all learners grasp what is going on to have to switch to two other tabs to look at a few lines of code that could be two functions.

Ignore for a moment it’s Python and compare the previous code to these procedural implementations:
https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/LSystem.html

(Now, I take back the “ignore for a moment it’s Python”, and I suggest you marvel at the elegance of the Python dict)

#natureofcode #Processing #LSystem #Python #JavaScript #ObjectOriented #procedural

⤋ Read More

I have an SSD external drive that mounts on one Manjaro machine but is completely invisible (nothing on lsusb) on another Manjaro machine… any tips? No hub being used, just an USB A to C adapter (and I have tested changing it and this setup used to work on both machines!)

⤋ Read More

Would you like to learn the very basics of #programming? I can teach you.

I like to teach #Python in the context of making drawings, if you already know how to program but would like to learn some Python or some #CreativeCoding, I can help! Maybe you know someone who would enjoy this?

Schedule a free chat with me and we can discuss further details like time availability and my rates. All my teaching materials are free and open, but I need income to keep producing them. Some generous people make small recurring donations. https://abav.lugaralgum.com/links

⤋ Read More

so… maybe I should try a new fresh approach. I gave up avoiding adding a new data structure and created a drawing_dict to iterate and draw. At this point it contains a reference to a drawing function and the attributes to use… it should give me enough flexibility. I’m using shapes as keys,
I have to think about the case of the complex body…

⤋ Read More

so… maybe I should try a new fresh approach. I gave up avoiding adding a new data structure and created a drawing_dict to iterate and draw. At this point it contains a reference to a drawing function and the attributes to use… it should give me enough flexibility. I’m using shapes as keys,
I have to think about the case of the complex body… the body should be the key in that case. But then, removing stuff will be harder.

https://github.com/villares/sketch-a-day/blob/main/2025/sketch_2025_04_27/sketch_2025_04_27.py

⤋ Read More

#PyPodcats Hidden Figures of #Python #podcast @pypodcats@pypodcats

Episode 8, with Mojdeh Rastgoo:

https://pypodcats.live/episodes/ep-8/

«We interviewed Mojdeh Rastgoo, the newest member of PyPodcats!

Since discovering Python and the open-source community, Mojdeh has been actively involved in the Python ecosystem. She gave her first tutorial in 2018 at EuroSciPy and has since contributed in many ways. She is a member of the PSF Code of Conduct Working Group, a co-organizer of PyLadies Paris, and now a host of PyPodcats!

In this episode, Mojdeh shares more about herself and her passion for the community. We also take a look back at 2024, discuss our plans for 2025, and introduce a few new changes, including our Open Collective account, where you can support us.

Be sure to listen to the episode to hear about our plans and get to know your new host Mojdeh!»

⤋ Read More

I want to simplify #pymunk + #py5 use for my students but I struggle with finding good strategies… Pymunk has two types of (linked) objects for each simulated object: body and shape. For complex objects (like concave shapes) you can use more than one convex shape linked to the same body. In these cases I usually want to have an extra shape to draw and hide the triangulation.
I don’t want to keep extra data structures to track the simulation objects to draw. I tried both extending and monkey patching either body or shape objects to be “drawable” so I can just iterate the native pymunk structures and ask stuff to draw themselves (would be nice, huh?), but there is always some snag. If I extend shape classes, I stumble on the complex objects with many shapes drawn with divisions. If I extend the Body class, the problem is static objects have shapes but share a virtual constant body, more of a flag, so I can’t add anything to it, so back to keeping track of a separate list of static shapes… Then performance & serialization issues, I want to be able to easily pickle simulations, but if I add Py5Shape objects to the extended/modified classes they become unpickable…
I have bigger fishes to fry right now (the paralyzing PhD) but this is something I would like to pair with someone more experienced to work on.

⤋ Read More

Inscrições para pessoas mentoras voluntárias na iniciativa BOSS* estão abertas! #Plone #Python #JavaScript

https://docs.google.com/forms/d/e/1FAIpQLSdGeBCRXoGZpR5NERMQEmJRy__sKJDmXsuo2mB3jaFEDYGe1w/viewform

”*BOSS (Big Open Source Sibling) é uma iniciativa de mentoria que visa engajar grupos sub representados na tecnologia para que comecem a contribuir para comunidades Open Source.

Nessa mentoria, muito mais do que desenvolver habilidades técnicas, as participantes aprendem competências úteis às comunidades Open Source, como se comunicar, trabalhar de forma assíncrona e remota, desenvolver coletivamente, etc.”

⤋ Read More

I should be working on my PhD but I’m distracted by:

  • My mouse scrolling wheel is jumpy and I can’t fix it, I’ve done many searches about the problem.
  • I have an external SSD drive for backup that works perfectly on another computer but is not recognized at all on my main computer (no mention of it on lsusb).

⤋ Read More

I hope one day (after I finish my PhD) I’ll manage to read many of the wonderful books by @allendowney@allendowney I always start them an then get distracted :((((

Top of my list are

#Python #stats #simulation #openbooks

Image

⤋ Read More