Elektrine lite

← Feed

AnΕΎe

anze3db@fosstodon.org

<p>Writing Python :python:, Django :django: and surfing waves πŸ„β€β™‚οΈ</p><p>Projects:<br /> πŸ§‘β€πŸ’» <a href="https://fedidevs.com" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="">fedidevs.com</span><span class="invisible"></span></a> find awesome devs across the fediverse<br /> πŸ’» <a href="https://github.com/anze3db/django-tui" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="">github.com/anze3db/django-tui</span><span class="invisible"></span></a> a TUI for all your Django commands</p>

Posts

  • View post

    One of the many things that I learned at DEF CON a few weeks ago is about Python Class Pollution and how a harmless snippet like the one below can cause a huge issue if an attacker controls it!

  • View post

    I had a bit of a heart attack this morning when we noticed that my Grok 4.6 benchmark experiment using Amazon Bedrock would cost $28,044.59 instead of ~$28.00 that I was expecting 😱

  • View post

    PyCon Portugal continues to be my favorite PyCon. This year it was in Aveiro (a better Venice πŸ˜‰) and we had a blast! I enjoyed giving my talk on lazy imports, but the best part was meeting new people and catching up with friends. Looking forward to it again next year!

  • View post

    🐍 Python Lisbon Meetup is tomorrow! 🎀 Talk by @mathsppblog ⚑ Lightning talks 🍻 Socializing πŸ“ IST, Sala Multiusos, Torre Norte (new room, not the PavilhΓ£o de MatemΓ‘tica!) πŸ•– Thu, 1 Oct, 19:00 RSVP links below πŸ‘‡

  • View post

    Python 3.15 has been released πŸŽ‰ Grab it while it&amp;#39;s fresh πŸ˜‰ https://www.python.org/downloads/release/python-3150/

  • View post

    Make sure to always reuse your botoclients. Initializing a fresh one on each task has A LOT of overhead!

  • View post

    Oh, I didn’t know GitHub doesn’t have pagination in the Commits tab of a pull request. πŸ˜…

  • View post

    The Claude usage page is very confusing. Since Sonnet has a separate bar I thought I&amp;#39;d be able to switch to it after I max out Opus, but nope. Of course this all makes sense if you actually read the tooltip/labels but who does that today anyway? πŸ˜…

  • View post

    A bug that survived 15 years of upgrades. One of my servers lost DNS after every reboot. ping 8.8.8.8 worked; ping https://google.com didn&amp;#39;t resolve. I&amp;#39;d been &amp;quot;fixing&amp;quot; it by hand-editing /etc/resolv.conf, which, of course, was reset on the next boot. πŸ™ˆ Turned out to be a config from 2010. I finally debugged it properly with Claude. https://blog.pecar.me/the-15-year-old-iptables-rule-that-broke-my-dns

  • View post

    After 9 meetups full of talks, lightning talks, and even lightning turtles, it&amp;#39;s time for the Python Lisbon Meetup to take it easy. Join us at Linha d&amp;#39;Água on Thursday to relax and enjoy the summer in Lisbon with Python friends 🐒 https://www.meetup.com/python-lisbon-meetup/events/315420890/

  • View post

    Today I migrated some Go code to Python and made it 590x FASTER 😎

  • View post

    We reviewed 4,978 mypy runs in our Django app: β€’ 4,731 green β€’ 246 failed Of the 246 failures: β€’ 173 false positives β€’ 73 real issues β€’ 39 caught only by mypy and no other check! Some noise, but it prevented real bugs from reaching production. πŸŽ‰

  • View post

    I asked Claude to come up with writing guidelines based on my blog posts: &amp;gt; A few things I deliberately did not encode as guidelines: the frequent typos (characteristic of your fast publishing cadence) 88 blog post in 14 years is not fast publishing cadence πŸ˜…

  • View post

    Quite a way to start a Monday πŸ˜…

  • View post

    We benchmarked 15 models for triaging vulnerabilities. * Kimi K3 came out on top but marked a true positive as a false positive ☠️ * Opus 5 refused to give a verdict on 11 vulnerabilities * Sonnet 5 and Luna outperformed Terra and Sol Full post πŸ‘‡ https://www.fencer.dev/blog/llm-triage-sast-false-positives

  • View post

    My dog kept me in Zone 2 for 3kms. Then I had to drop him off and immediately made bad decisions. πŸ’›

  • View post

    Everyone’s favorite web framework is now also in the gelato business 🀀

  • View post

    With all the supply chain attacks going around, we have to be very careful about how we update our dependencies. I&amp;#39;ve written a full blog post about it, but here is the TLDR: 1. Pin to hashes, not just versions 2. Automate the updates 3. Use dependency cooldowns https://blog.pecar.me/how-to-safely-update-your-dependencies/

  • View post

    I&amp;#39;ve finished #adventofcode 2025 and this is the first year that I managed to get all solutions under 100ms ⚑ All but two are under 10ms. Not bad for the slowest popular language out there 🐍, although I did have to use numpy a few times.

  • View post

    I wrote a blog post about this year&amp;#39;s Advent of Code. I had a blast and I am already looking forward to 2026! * All my Python solutions were under 1s using pure Python and 100ms with a little help from mypy/scipy β€’ The AoC community is the best ❀️ https://blog.pecar.me/advent-of-code-2025

  • View post

    New board!

  • View post

    Hey all! It&amp;#39;s almost time for the next Python Lisbon Meetup! 🐍 On Thursday, pyctrl will be talking about exceptions. We&amp;#39;ll cover the origin of exceptions, their usage in OOP, how best to manage them, and more. It&amp;#39;s going to be exceptional! πŸ’Ž

  • View post

    Like pretty much everyone with a static blog site in the last 6 months, I asked Claude to migrate it to a different static site generator. Here&amp;#39;s a blog post about it, along with some of my general thoughts on agentic code. https://blog.pecar.me/agentic-adventures/

  • View post

    I wrote a blog post about some of the options for adding type checking to your Django project! Historically, Django projects have been tough to type-check, but the future feels bright, especially if PEP 827 gets accepted! https://blog.pecar.me/typing-your-django-project-in-2026/

  • View post

    Can&amp;#39;t wait for lazy imports in Python 3.15! I spent a bunch of time and tokens over the weekend inlining heavy imports so that they don&amp;#39;t get loaded during initial start of a Django app. The `https://manage.py check` command is now 3.8x faster (9.45s down to 2.48s).

  • View post

    I wrote a post on how we tracked down slow imports in our Django app, fixed them by making imports lazy, and added a lint check to prevent regressions. Now I’m waiting for Python 3.15 to make all of this easier! πŸš€ https://blog.pecar.me/speeding-up-django-startup-times-with-lazy-imports/

  • View post

    I&amp;#39;ll be giving a talk about lazy imports at the next Python Lisbon Meetup! See you there? πŸ˜€ https://www.meetup.com/python-lisbon-meetup/events/313903112/?eventOrigin=home_next_event_you_are_attending

  • View post

    Another Python Lisbon Meetup in the books! Looking forward to the next one on May 7 πŸ‘€

  • View post

    With recent Python supply chain attacks (Trivy/LiteLLM), it’s worth mentioning uv’s `exclude-newer = &amp;quot;x days&amp;quot;` config. It forces uv to only installs packages published more than x days ago, reducing risks since problematic packages should be yanked by then. https://docs.astral.sh/uv/reference/settings/#exclude-newer