Matteo Portesi (@pottolama) header
Matteo Portesi (@pottolama) profile picture

I make computer do beep beep boop. Computer engineer. 🇮🇹

Piacenza, Emilia Romagna
Joined June 2018
Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)Photo by Matteo Portesi (@pottolama)
thread: Sorting algorithms visualized some famous algo visualized using python, numpy and matplotlib😋 first is Odd-even sort! #Algorithm #python #visualization
40
1,283
206
5,679
Short thread: Creating a color palette from an image using K-means Clustering! (In python 🐍) Using some demo images from the masterpieces that @JP_GHIBLI produced! Then let's take a look at how it works... #Algorithms #Python #colorpalette #kmeans
1
1
2
Pro-tip: click on the images, the palette is not visible from the twitter web preview lol
Mazes! Everyone loves them, programmer too so.. Maze generation algorithms visualized! Using python, numpy and @matplotlib 🐍 Short (for now..) thread First is Depth-first search (backtracking) ! #Algorithms #python #visualization
2
2
17
The super ugly code used to generate them is here! (will add other algo implementation later ) github.com/mportesi/maze_gen… You will notice that i had to not check adiacent cells, but to use a +1 step because.. I was using a matrix, with a single cell acting as a wall or corridor..
1
1
.. so had to check not the adiacent, but the adiacent of the adiacent ( the +2 index) so that wall can exist! 😂 If you use some tool like processing, you can just display a cell without the wall to connect it to the adiacent cells, reducing the n° of cells needed
1
Timsort! (the standard python sorting alghorithm!)..
1
1
36
... and dual-pivot quicksort ⚡️⚡️
2
32