Python: генераторные функции
По утверждению Роберта Мартина, объектно-ориентированный подход был предложен 1966-м году. Для эмуляции объектов они использовалась возможность языка ALGOL, позволяющая переместить кадр стека вызова функции в динамическую память (кучу). В этом смысле в 2001 году Гвидо ван Россум переизобрёл объекты, добавив Python 2.2 генераторные функции.
https://habr.com/ru/articles/934742/
#python #генератор #yield #stopiteration
Я так и не прошёл курс по программирования #python
Я бы хотел создавать полезных ботов...
Кажется у меня вечный и частый синдром не хватки внимания от чего #апатия
крч мне просто #скучно и #лень,
а ещё кучи мыслей бывает о других делах
меня это просто обессиливает
SOLUTION: https://raw.githubusercontent.com/bterwijn/memory_graph_videos/refs/heads/main/exercises/exercise4.gif
explanation: https://github.com/bterwijn/memory_graph?tab=readme-ov-file#python-data-model
#Python #memory_graph #Quiz #Mutable #Immutable

https://github.com/Ghodawalaaman/gemini_irc
combine the power of AI and IRC :D
#ai #irc #linux #python #gemini #google
#Python 101 - How to read a TOML file using a `pathlib.Path` object

The code needs a lot of cleanup, and then I have to automate deployment when I change things. But I've posted it here for anyone curious:
https://codeberg.org/bfordham/naughtybaptist_2
#python #softwareDevelopment #coding #blogging
As I mentioned before, I've decided to write the code that drives it myself. Yes, I know there are a bazillion things to do this. Up til recently I used @11ty and had no complaints, really.
I just like the idea of rolling my own.
#python #softwareDevelopment #coding #blogging
Last night I was able to post my updated site. There are still some kinks to work out, but overall I'm happy with the progress
#python #softwareDevelopment #coding #blogging
I found a Python tool for Linux that gives the same dynamic range information as the Dynamic Range Meter for foobar2000 (Windows). As a rule, it's a value between 1 and 14. The worst I've ever seen is a 5 from Oasis recordings. 10 is good but in an average way. What I mean by that is that a CD should, at the very least, measure a 10. Most don't these days. The latest Opeth record is only a 7.
https://github.com/simon-r/dr14_t.meter
#DynamicRange #Linux #Python #CD #Music
https://mathewstorm.ca/tuts/C-and-Python/01-Using-C-Functions-in-Python/
After learning a lot about ctypes and the power of #C -> #Python, I wrote a quick tutorial to spread my knowledge.
#Programming #CProgramming #development #tutorial #guide
One of the advantages of #Nuitka (#python native compiler) over #graal (JVM AoT or native compiler) is that reflection and functional programming are better handled.
Both solutions offer performance and deployment benefits. I can easily put the compiled binary images into distroless containers.
I want to put my #python #bot source code in git but ... what's the best practice for hiding secrets when you don't have an enterprise key manager to use?
I don't really like the .env and .gitignore approach as that seems poised for disaster.
Pull secrets from system environment variables?