One of the most annoying problems I routinely encounter:
I want to write a simple command-line utility that takes some arguments and generates some output file(s) based on templates. And I want to distribute this to other people.
Of course the natural way to do this would be to have a single script file containing the code, and a few template files that it uses.
But then how to distribute this? You want the script somewhere in your path, but you probably don't want template files in /usr/local/bin or wherever. So now I have to have some way of telling the script where to find the templates. And also a way of giving this to a user in a way that makes it easy to deploy all the files in all the places.
So, instead, I usually end up embedding the templates as strings in the script itself, which in (depending on exactly how I do it) means escaping a bunch of stuff.
I think what I'd like is some kind of compiler that packages a (say) #python script and several resource files into a single distributable .py file in such a way that I can write code that can either read these files in the unpackaged (for development/testing) or packaged (for distribution) state.
The alternative seems to be adding a whole extra process where I make everything into a .dpkg file for distribution, which seems like pretty massive overkill.
👨💻🐍 30-Days-Of-Python - структурований курс для вивчення #Python за 30 днів. Містить практичні завдання, приклади коду та детальні пояснення для поступового освоєння мови програмування.
🔗 https://github.com/Asabeneh/30-Days-Of-Python
Generator Misuse
Converting Generator to List Then Back to Generator?! Python Waste! 🔄
Why use generators efficiently when you can convert them unnecessarily? This defeats the purpose!
🚫 What NOT to do:
• Convert generators to lists unnecessarily
• Lose generator benefits
• Waste memory
✅ The right way: Use generators directly when possible
Generators save memory! This Code Crimes shows why generator misuse is wasteful.
https://www.youtube.com/watch?v=lPgZfKxWaqo
Habe ein Archivmend bekommen #alttext4me
#python

Иллюзия 95%: гайд по самой частой элементарной ошибке в Data Science
Что, если я скажу тебе, что у параметра нет вероятности? Это самая распространенная и устойчивая когнитивная ошибка в Data Science. Она встречается в курсовых, в учебниках и даже в документациях библиотек. Здесь мы напишем симуляцию на Python, увидим, как «прыгают» интервалы, поймем, как тут могут помочь пластмассовые игрушки советских детей, и узнаем, как же тогда математически точно отвечать менеджерам на их вопросы, чтобы они навсегда перестали с вами разговаривать. Добро пожаловать в кроличью нору частотной статистики.
https://habr.com/ru/articles/974186/
#статистика #доверительный_интервал #математическая_статистика #анализ_данных #теория_вероятностей #python #визуализация_данных #ab_тестирование #ошибки_мышления #статистическая_значимость
I'm making good progress with the new customization feature for inline snapshots... but I've encountered some issues when trying to use it with dirty-equals.
What do you think of it so far?

Still exploring OpenStreetMap data with this map of sundials in Europe.
#openstreetmap
There are in fact many more sundials. If you know one around you, please mark it on on https://www.openstreetmap.org/
Well... is it a map of sundials or a map of OSM contributors?🤔 Anyway, congratulations to northern Italy!
#astronomy #maps
#Python script available on my blog.

python: "AttributeError: module 'ssl' has no attribute 'wrap_socket'" when calling mysql.connector.connect() #python #mysql #ssl
https://askubuntu.com/q/1560591/612
KOllector - Publishing KOReader Highlights https://lobste.rs/s/q8znua #show #python
https://tech.stonecharioteer.com/posts/2025/kollector/
Solid testing like it's 1999...
===== 1999 passed, 1 skipped, 42
deselected, 1 warning in 73.31s (0:01:13) ===== #Python #pytest
Por si alguien necesita organizar sus archivos personales
https://github.com/KotaroGa/File_Sorter
#coding #python #freesoftware #hacktheplanet #github
I was very interested to listen to @sheena " Modern frontend development the simple way" talk.
https://www.youtube.com/watch?v=9fm9DgA754g&feature=youtu.be
I really want to try #htmx one day. I discovered Alpine.js has to be considered