I just completed "Cafeteria" - Day 5 - Advent of Code 2025
We had one like this back in 2022, so I ported a function from my old PHP solution to Python. Both parts in <10ms with a couple lines of code.
https://github.com/jstanden/advent-of-code-python/blob/main/2025/day5.ipynb
#AdventOfCode #Python #Programming
Day 05 - "Cafeteria" ✅
Easiest one.
Looking forward to tomorrow's challenge.
My solutions - https://github.com/GKay-Dev/Advent-of-Code-2025
Advent of Code 2025 - https://adventofcode.com/2025/day/5
#AdventOfCode #Python #Coding #Challenges #100Devs #AoC2025
Content warning:Advent of Code - Day 5 (Python)
I stayed up far too long tonight for this one, but it was fun. Saw that we were dealing with an absolute metric ton of ranges at the very beginning so my initial thought was to reduce/merge those ranges and that's what I spent most of my time on before even tackling part 1.
It paid off tremendously and made solving everything very, very easy. There's still the Nim version to write, but I'll handle that after I get some sleep.
Solution: https://git.jamesthebard.net/jweatherly/advent-of-code/src/branch/main/2025/05/solution.py
#aoc #aoc2025 #adventofcode #adventofcode2025 #python #programming
Show HN: Tacopy – Tail Call Optimization for Python
https://github.com/raaidrt/tacopy
Неопределённость как часть модели
Привет, Хабр! Сегодня рассмотрим тему неопределённости в моделях . Классические ML-модели детерминированы: на вход получили – на выход выдали одно число или метку. Но жизнь полна неопределённости , и игнорировать её плохая идея. Представьте, у вас мало данных, модель предсказывает конверсию 15%. Но насколько она уверена? Может, разброс от 5% до 30%. Обычная модель этого не скажет, а вот вероятностная модель скажет. В этой статье в коротком формате разберём, как с помощью байесовского подхода и фреймворка Pyro моделировать такую неопределённость на примере A/B-теста конверсии и заставить модель честно признавать свою неуверенность.
https://habr.com/ru/companies/otus/articles/970398/
#python #ml #байесовская_статистика #вероятностное_программирование #неопределённость_модели #биномиальное_распределение #Pyro
Content warning:Advent of Code - Day 5
I just completed "Cafeteria" - Day 5 - Advent of Code 2025 #AdventOfCode #Python
This is the first day where I crashed Python by running against the full input.
Part 1 was the problem. I should have taken a look at the input numbers before trying to make an enormous set.
Part 2 was made easier by the fact that it's pretty much the Python Morsels parse_ranges exercise (sorting is the trick).
https://github.com/treyhunner/advent-of-code/tree/main/2025/day05
Vector Stores for RAG Comparison:
https://www.glukhov.org/post/2025/12/vector-stores-for-rag-comparison/
#LLM #AI #RAG #Python #Cloud #SelfHosting #Dev
Tombi で便利な Python/Rust のワークスペース管理
https://developers.cyberagent.co.jp/blog/archives/59998/
#developers #エンジニア #python #TOML
Testing a 1M-line file —
Legacy, but still alive.
Jollpi (2010, Python2+GTK2) still runs on modern Arch-based systems, btw 😎
Syntax highlighting, tabs, find/replace .all still working in 2025.
.
OS: Manjaro Linux (GNOME)
• Python2, PyGTK2,GtkSourceView2 → installed from AUR
• GTK2 → still in the repo
• PyGtkSourceView2 → not in AUR, manually built from archived GNOME sources
If you're on Arch, you can try it yourself.
📦 Code:
gitlab.com/zulfian1732/jo…
Jollpi 3 coming soon...
Spent the day writing scripts to pull various threat intel feed info from our vendors and sync them with various firewall and WAF technology.Python made this a breeze and it will hopefully result in a reduced ticket count coming out of the SOC.
#cybersecurity #threatIntel #python #securityautomation
I made a convoluted little #Python function that computes binomial coefficients, apparently:
def bc(v,i):
z = [i,v-i]
if 0 in z:
return 1
z.sort()
m,n = z
n += 1
v = m
p = n
for i in range(1,m):
p *= (n+i)
v *= i
return p//v
#math
excuse me, what?
```
>>> td = timedelta(minutes=-5)
>>> td
datetime.timedelta(days=-1, seconds=86100)
>>> td.total_seconds()
-300.0
```