A great example of how AI simply produces incorrect results.
It even goes so far as to cite sources that say exactly the opposite.
You can simply test for yourself with this code:
import re
text = "hello world 2"
replacements = {
"hello world": "hi",
"world": "earth",
}
pattern = re.compile("|".join(re.escape(k) for k in replacements.keys()))
result = pattern.sub(lambda m: replacements[m.group(0)], text)
print(result)
Just reorder the replacements.
Or alternatively, read the docs (this time really): https://docs.python.org/3/library/re.html#re.sub
"If repl is a function, it is called for every non-overlapping occurrence of pattern."

OldNews v1.3.0 has been released. This release fixes a crash when viewing any article, caused by an update to the html_to_markdown library.
https://blog.davep.org/2026/03/31/oldnews-v1-3-0.html
#python #programming #rss #news #reader
Yesterday, a colleague sent me a paper. Topic: Gap filling methods. Application: Daily precipitation time series in Oman. A fusion model promised an extreme quality boost compared to any single model. Since gap filling and time series extension of meteorological data is more or less the core of my job, I was genuinely exited. The paper promised an increase in R² from 0.72 (gradient boosting, best single model) to 0.88 (fusion model). #RStats #python #meteo #gapfilling #ML #AI #science #paper
Лингвистическая относительность в программировании — как наше мышление определяет выбор языка и стиль кодирования
Поводом к написанию предыдущей статьи «Шаблоны и принципы деления кода на классы» послужил случай с начинающим программистом, который обратился ко мне за помощью. Однако та история получила неожиданное продолжение, ставшее, в свою очередь, одной из предпосылок уже для этой статьи. И видимо, волей судьбы или просто по забавному стечению обстоятельств, эта история оказалась напрямую связана с комментариями к первой статье, где в ходе жаркого диалога я затронул тему мышления и восприятия кода разработчиком. Так родилась идея поделиться накопившимися за 10-летний стаж наблюдениями и плодами размышлений: - Как стиль написания кода отражает образ мышления разработчика. - Как разработчики воспринимают код программы. - Почему один язык программирования, что называется, «заходит», а другой - нет.
https://habr.com/ru/companies/cinimex/articles/1013914/
#коддинг #java #python #программирование #функциональное_программирование #процедурное_программирование #ооп #ооп_программирование #языки_программирования #языки
🎉 urllib3-docs-l10n is published!
🚀 Preview:
https://projects.localizethedocs.org/urllib3-docs-l10n
🌐 Crowdin:
https://localizethedocs.crowdin.com/urllib3-docs-l10n
🐙 GitHub:
https://github.com/localizethedocs/urllib3-docs-l10n
#Crowdin #GitHub #Sphinx #Python #Urllib3 #HTTP
Day 10 of #100VibeProjects 🔍
Built a local web tool that does static security analysis of Android APKs — upload an APK and get a report covering permissions, hardcoded secrets, SDK fingerprinting, cert pinning, and crypto posture.
The interesting part: the methodology came from reverse-engineering the WhiteHouse app teardown that went viral last week. Applied the same five-gate analysis framework to a real banking app.
Found an expired certificate pin (silently disables TLS pinning for all users), a session replay SDK with no confirmed masking rules, and four Adobe tracking SDKs doing cross-device user stitching.
The tool runs entirely locally. No data leaves your machine. APK deleted after analysis.
Stack: Python · Flask · androguard · 380 lines
📝 Blog: mrdee.in
https://mrdee.in/writing/vibecoding-day010-offline-apk-security-analyzer/
💻 GitHub Repo: https://github.com/mr-dinesh/Offline-APK-Analyzer
#VibeCoding #AppSec #AndroidSecurity #MobileSecurity #Python #Flask #DFIR #InfoSec #ReverseEngineering #CyberSecurity
Daten allein sind noch kein Wissen; erst die Einordnung schafft Klarheit. In meinem Arbeitsbuch "Einführung in Geostatistik mit Python und OpenStreetMap" nutzen wir freie Quellen, um räumliche Zusammenhänge sachlich zu erschliessen. Mein Ziel ist es, den Einstieg in die Geo-Analyse für eine breite Leserschaft verständlich zu machen.
Schauen Sie gerne einmal hinein. Jetzt bei Orell Füssli erhältlich:
https://www.orellfuessli.ch/shop/home/artikeldetails/A1076652168
#Geostatistik #Python #OSM #GIS #OpenData
JWT авторизация в FastAPI: от теории к практике
Представьте себе, что вы разработчик, и перед вами стоит задача: сделать так, чтобы после входа пользователь мог получать свои личные данные, не вводя пароль при каждом клике. Звучит как классическая задача аутентификации, правда? Традиционный подход — сессии. Вы логинитесь, сервер создаёт сессию, запоминает ваш ID у себя в базе данных, а вам выдаёт куку с ID этой сессии. Всё работает, пока вы на одном сервере. А если у вас их два? Или десять? Куда девать сессии? Начинаются проблемы с синхронизацией, Redis, общими хранилищами… Альтернатива — JWT (JSON Web Token). В этой статье мы с вами:
https://habr.com/ru/articles/1017246/
#FastAPI #JWT #авторизация #аутентификация #Python #токены #API #бэкенд #JSON_Web_Token #OAuth2
Season 1 Lesson 12 Part 4 - Your First Steps in Python Transform and Filter with List Comprehension #codingtutorial #pythoncode #jupyternotebook #softwaredeveloper #pythonprogramming #python #dataengineer #learncoding #dataanalysis #softwarengineer
Telnyx Python SDK Compromised to Deliver Credential-Stealing Malware
Pulse ID: 69cb4c8a3f09339f4cb02efc
Pulse Link: https://otx.alienvault.com/pulse/69cb4c8a3f09339f4cb02efc
Pulse Author: Tr1sa111
Created: 2026-03-31 04:24:42
Be advised, this data is unverified and should be considered preliminary. Always do further verification.
#CyberSecurity #InfoSec #Malware #OTX #OpenThreatExchange #Python #bot #Tr1sa111
pysource-codegen is well on its way to becoming a perfect #python #fuzzer. This means it will be capable of generating EVERY possible Python construct, but it will NOT generate invalid python code.
The fuzzer with no mercy 😄
🐧 Uniplot – lightweight terminal plotting library for Python
Uniplot is aimed at users who need quick visualisation without relying on graphical desktop dependencies or notebook-only workflows. The post Uniplot – lightweight terminal plotting library for Pyt...
📰 Source: LinuxLinks
🔗 Link: https://www.linuxlinks.com/uniplot-lightweight-terminal-plotting-library/
#Python #AI #ArtificialIntelligence