#itertools — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #itertools, aggregated by home.social.
-
261 combinations of 3 connected segments, on a 3x3 grid of points. Removing rotations and translations. #itertools
The sketch-a-day archives and tip jar are at: https://abav.lugaralgum.com/sketch-a-day Code for this: https://github.com/villares/sketch-a-day/tree/main/2026/sketch_2026_05_10 #Processing #Python #py5 #CreativeCoding -
[Перевод] 10 приёмов профессионала для ускорения кода на Python
Команда Python for Devs подготовила перевод статьи о том, как делать код на Python быстрее без переписывания проектов с нуля. В статье 10 практичных приёмов — от sets и bisect до локальных функций и предвыделения памяти — которые дают реальный прирост скорости в типовых сценариях.
https://habr.com/ru/articles/969848/
#python #оптимизация #оптимизация_кода #производительность #sets #bisect #itertools #память #циклы #скорость
-
Ah yes, the age-old quest for #programming enlightenment: writing Fizz Buzz without so much as a hint of logic 🙄. Our intrepid coder Evan has managed to turn the venerable challenge into a Pythonic #circus act, cycling through sequences like a caffeine-fueled hamster on a wheel 🚴♂️. Who needs simplicity when you can overcomplicate everything with itertools? 🤹♂️
https://evanhahn.com/fizz-buzz-without-conditionals-or-booleans/ #FizzBuzz #Python #coding #itertools #HackerNews #ngated -
Ano passado eu gravei um curso em vídeo de introdução ao desenho com código, usando #Python + #Processing (#py5) para o HomeostasisLab, está disponível *totalmente de graça* em:
https://homeostasislab.org/cursos/info/131
Parece que uma centena de pessoas acessaram esse #cursoGrátis de #ProgramaçãoCriativa, mas eu não tive retorno. Estranhei que deveria ter legendas em inglês mas não as encontrei :((
Adoraria que mais gente visse e que me mandassem comentários (de preferência construtivos). Assisti ontem um trechinho em que eu tento explicar #itertools #combinations #permutations e #ItertoolsProduct e achei que estava bem razoável.
Se você gosta do meu trabalho, pode me apoiar em https://gumroad.com/villares, com PayPal (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HCGAKACDMVNV2) ou PIX (chave: 46c37783-5edb-4f1c-b3a8-1309db11488c)
-
sketch_2022_06_19 #Processing #Python #py5 #itertools #combinations https://github.com/villares/sketch-a-day
UPDATE: No need to use that cumbersome lambda, it was there because of some previous experiments... I refactored it out:
...
for z, positions in zip(range(-100, 101, 20), cs):
py5.fill((255 + z + i * 20) % 255, 200, 200)
for pos in positions:
element(pos + (z,))