Python at Netflix

Zoran and I were guests on the Talk Python Podcast to discuss how Python is used at Netflix. The host of the podcast Michael Kennedy was well prepared with the background context and led the conversation in interesting ways. We got to cover a ton of different use cases at Netflix that use Python. I got to talk about some of my favorite OSS projects (bpython, pdb++, dbcli etc). We ran out of time before we could talk about pickley but we did mention it during the episode....

June 30, 2023 · 1 min

Vector Search

Recently I learned about a new kind of search called Vector Search or Semantic Search. This is a search technique that tries to find documents that match the meaning of the user’s search term instead of trying to match keywords like a Full Text Search (FTS). I wanted to try Semantic Search for my blog. I came across Alex Garcia’s post about a new SQLite extension for Vector Search called sqlite-vss....

June 1, 2023 · 6 min

Search (FTS)

Now that my blog is statically generated I need a way to support searching. Fuse.js ships with the theme and does a pretty good job of matching words in the blog posts. I want something a little bit more powerful. I mentioned in my previous post that I am using SQLite to store the blog posts. SQLite has a full text search feature that I can use to implement search....

May 30, 2023 · 2 min

Triggering multiple api calls in HTMX

I am a big fan of htmx and use it in a lot of my projects. I recently had a use case where I needed to trigger multiple api calls in a single htmx request. I was able to do this by using the hx-trigger attribute. <html> <head> <script src="https://unpkg.com/htmx.org@1.9.2" integrity="sha384-L6OqL9pRWyyFU3+/bjdSri+iIphTN/bvYyM37tICVyOJkWZLpP2vGn6VUEXgzg6h" crossorigin="anonymous"></script> </head> <body> <input id="input-box" type="text" placeholder="Enter your input and press Enter" name="name"> <div hx-get="/api/call1" hx-trigger="keyup delay:200ms from:#input-box"> </div> <div hx-get="/api/call2" hx-trigger="keyup delay:200ms from:#input-box"> </div> <div hx-get="/api/call3" hx-trigger="keyup delay:200ms from:#input-box"> </div> </body> </html> The idea is to listen to the keyup event on the input box and trigger the api calls after a delay of 200ms....

May 29, 2023 · 1 min

Migrating out of PostHaven

My blog was hosted on PostHaven for about 12 years now. It’s a pretty good platform and has served me well. But I wanted to move my blog to a MarkDown powered static site. Unfortunately, posthaven doesn’t provide an export option, probably because it not in their financial interest. Oh well, I’ll scrape my own blog and extract the posts. My first attempt was to use the requests and BeautifulSoup to fetch the urls from the archives page....

May 19, 2023 · 2 min