Playing around with a "purple map" of the 2025 US presidential election, starting with just #NewMexico. It's fun to see how the numbers change across my local small town, which areas voted more Republican vs. more Democrat. I used #Python and #Folium to make the #map.
https://shallowsky.com/blog/programming/2024-election-purple-map.html

Thinking the #python community needs a python package manager manager.. Some system that would streamline the installation and versioning the 5 different package managers needed for a typical code base...
Primeros pasos con PyQt y QtDesigner. Primer programa con Python https://myblog.clonbg.es/primeros-pasos-con-pyqt-y-qtdesigner-primer-programa-con-python/ #Programación #Python #PyQT https://clonbg.es

Линейная регрессия, встряска рейтинга и первое место. Часть 1: Ёлочка, живи
Сказ о том, как после долгого перерыва я "взял в руки шашки" (поучаствовал в ML-соревновании) и дотащил задачу на "таблички" до первого места на финальном "приватном" лидерборде с помощью простейшей подготовки фич и классической линейной регрессии с регуляризацией, внезапно обогнав при этом всех модных катбустеров, банально переобучившихся на "паблике". В задаче нужно было предсказать, "доживёт" ли ёлка до определённой даты, учитывая время рубки, наличие дома кота, вес гирлянды, далеко ли от ёлки стоит обогреватель (и есть ли он вообще) и прочие важные и не очень сведения. Узнать, что влияет на "выживаемость" ёлки
https://habr.com/ru/articles/987310/
#ml #ds #python #feature_engineering #feature_selection #data_visualization
Offpunk is now "translatable". If you want to help translate #offpunk in your language before the 3.0, release, join us !
instructions :
https://offpunk.net/translation.html
Announcement:
https://lists.sr.ht/~lioploum/offpunk-users/%3C20260127191329.7981d3b160d0f121882dffc3@gmail.com%3E
#i18n #gemini_protocol #smolnet #cli #python #smallweb #gemini
Pyrefly giới thiệu 4 mẫu thu hẹp loại dữ liệu giúp kiểm tra kiểu trong Python trực quan hơn qua: 1. hasattr/getattr, 2. tagged unions, 3. kiểm tra độ dài tuple, 4. lưu điều kiện trong biến. Pyrefly hiện là trình kiểm tra kiểu duy nhất hỗ trợ đầy đủ các mẫu này. Tìm hiểu thêm tại trang chủ hoặc GitHub. #Python #TypeChecking #Pyrefly #LậpTrình #KiểmTraKiểu
https://www.reddit.com/r/programming/comments/1qolknv/4_pyrefly_type_narrowing_patterns_that_make/
When is 100000 not 100000? When it's windows vs linux it seems
row_limit = os.environ.get("salesforce_row_limit", 100000)
In #python we have a config class that pulls environment values. When I run the program and assign this row limit to a variable, the type is <class 'int'>
For the past let's-not-get-into-specifics-but-too-long, I have been having logic that wasn't hitting.
if source_rows == row_limit:
The above code was working as expected on my machine but damned if it didn't in production. It kept skipping over the case and pouring more and more print statements into the code was not teasing out the condition.
Finally, sat with a coworker and walked through it and one of the debugging messages said
resulted in 100000 rows vs limit 100000 Match = False
Ultimately, the following needed to be the correct pattern, because if the key was not present, linux or windows, we saw the behaviour we expected.
row_limit = int(os.environ.get("salesforce_row_limit", 100000))
And in retrospect, it makes sense that get would assume everything is string and maybe something else is at play but good grief, never checking your core assumptions about where a problem may lay sure can bite you in the backside
Lobsters Vibecoding Challenge (Winter 2025-2026) https://lobste.rs/s/igpevt #nix #python #vibecoding
https://gist.github.com/MostAwesomeDude/bb8cbfd005a33f5dd262d1f20a63a693
Lobsters Vibecoding Challenge (Winter 2025-2026)
https://fed.brid.gy/r/https://gist.github.com/MostAwesomeDude/bb8cbfd005a33f5dd262d1f20a63a693

Python Tip #27 (of 365):
Consider printing to files instead of writing.
If you're converting objects to strings to write them to a file, I'd use print() instead.
And if you're putting newlines in string literals in your write() calls, I'd consider switching to print().
Given an a writable file object:
f = open("a", mode="wt")
This:
print("Time:", 62.738, file=f)
Is equivalent to:
f.write(f"Time: {time}\n")
🧵(1/3)
Poisk: однофайловый поисковик для изолированной корпоративной сети
В изолированной корпоративной сети с полумиллионом файлов стандартный поиск превращается в рутину. Облачные сервисы недоступны, серверные решения избыточны, а встроенные инструменты ОС не справляются с объёмами и разнородностью клиентов (Windows и Linux). Мы столкнулись с этой задачей и вместо развёртывания сложной инфраструктуры пошли другим путём: упаковали весь поисковик в один HTML-файл. Фоновая индексация на Python раз в сутки — и сотрудники получают мгновенный поиск по путям прямо в браузере. В статье разбираем архитектуру решения: как относительные пути решают проблему разных точек монтирования, почему плоский JS-массив оказался эффективнее сложных структур, и как уместить индекс 560+ тысяч файлов в 120 МБ без потери скорости. Не полнотекстовый поиск, а инструмент для навигации по глубокой файловой структуре, где важная информация закодирована в путях. Работает там, где нельзя поставить Elasticsearch, но нужно быстро находить документы.
https://habr.com/ru/articles/989692/
#Poisk #однофайловый_поисковик #изолированная_сеть #корпоративный_поиск #относительные_пути #Python #JavaScript #поиск_по_путям #гетерогенная_сеть #автономный_HTMLфайл
To live is to swim.
The prompt was "Lifeform. A shape or structure that behaves as if it’s alive or growing." by
Manuel Larino
#genuary #genuary27 #genuary2026 #python #genartclub