python

Back Open Paginator
06.08.2025 21:02
habr (@habr@zhub.link)

Python: генераторные функции

По утверждению Роберта Мартина, объектно-ориентированный подход был предложен 1966-м году. Для эмуляции объектов они использовалась возможность языка ALGOL, позволяющая переместить кадр стека вызова функции в динамическую память (кучу). В этом смысле в 2001 году Гвидо ван Россум переизобрёл объекты, добавив Python 2.2 генераторные функции.

habr.com/ru/articles/934742/

#python #генератор #yield #stopiteration




Show Original Post


06.08.2025 20:21
notes (@notes@shitpost.poridge.club)

Я так и не прошёл курс по программирования #python
Я бы хотел создавать полезных ботов...
Кажется у меня вечный и частый синдром не хватки внимания от чего
#апатия
крч мне просто
#скучно и #лень,
а ещё кучи мыслей бывает о других делах
меня это просто обессиливает




Show Original Post


06.08.2025 20:07
bterwijn (@bterwijn@fosstodon.org)

SOLUTION: raw.githubusercontent.com/bter
explanation: github.com/bterwijn/memory_gra

#Python #memory_graph #Quiz #Mutable #Immutable





Show Original Post


06.08.2025 19:12
unknown231 (@unknown231@social.linux.pizza)

github.com/Ghodawalaaman/gemin

combine the power of AI and IRC :D

#ai #irc #linux #python #gemini #google




Show Original Post


06.08.2025 19:02
driscollis (@driscollis@mastodon.social)

101 - How to read a TOML file using a `pathlib.Path` object





Show Original Post


06.08.2025 18:59
Bfordham (@Bfordham@infosec.exchange)

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:

codeberg.org/bfordham/naughtyb

#python #softwareDevelopment #coding #blogging




Show Original Post


06.08.2025 18:58
Bfordham (@Bfordham@infosec.exchange)

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




Show Original Post


06.08.2025 18:55
Bfordham (@Bfordham@infosec.exchange)

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

naughtybaptist.com

#python #softwareDevelopment #coding #blogging




Show Original Post


06.08.2025 18:46
wendigo (@wendigo@metalhead.club)

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.

github.com/simon-r/dr14_t.meter

#DynamicRange #Linux #Python #CD #Music




Show Original Post


06.08.2025 18:31
smattymatty (@smattymatty@techhub.social)

mathewstorm.ca/tuts/C-and-Pyth

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




Show Original Post


06.08.2025 18:17
windsheep (@windsheep@infosec.exchange)

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.




Show Original Post


06.08.2025 18:14
limebar (@limebar@mastodon.social)

I want to put my 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?




Show Original Post


1 ...1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 ...1546
UP