Traditionally, singletons use a global var plus a guarded getter. Since Python 3.9, functools.cache turns a simple factory into a clean singleton. Less boilerplate, clearer intent.
Python at 35: Still Shaping the Future of Software
On February 20, 1991, Guido van Rossum published Python 0.9.0 to alt.sources. What started as a pragmatic experiment became one of the most influential programming languages in modern computing.
Accessing computed Excel values in Python should be easy, but the existing tools make it more difficult than it needs to be.
github.com/a-bentofreire/…
Last Saturday, I attended Google I/O Extended in Rio de Janeiro.
Several speakers presented how to make the most of Google products and the latest technological advancements, covering topics like BigQuery, Gemini, Google Earth, and Google Colab.
One presentation that caught my attention demonstrated how Agents can estimate the calories in sushi. Instead of developing an entire pipeline for image recognition and data analysis, a few lines of code were enough to send an image to an LLM, along with a prompt specifying the desired JSON output format. That alone provided all the necessary information.
Chumphon is, for most travelers, just a jump-off point to the islands. But I ended up hospitalized for two days in a public hospital due to an internal infection. The doctors didn’t speak English, so I had to communicate through gestures. I didn’t know whether I was going to live
Welcome to Thailand! After more than five months traveling in India, with a final brief stop in Kolkata, I'm back in Bangkok. All I can think about is taking a few days off on a beach on Ko Tao island.
It feels good to be back and to switch to an environment I'm so familiar with.
Finally made it to Delhi. After months of traveling across India, my time there was brief, as I was preparing to return. I focused on exploring the city’s main attractions before continuing my journey.
McLeod Ganj, the official home of the Dalai Lama, had a totally different vibe from the rest of India. A Buddhist stronghold with a cold mountain breeze. I didn't get to visit Tibet when I was in China, so being here felt like a way to compensate.
The Golden Temple in Amritsar is profoundly beautiful and my favorite place in India. I spent days contemplating the temple and watching people pass by. I also saw the guard change at the Pakistan border, quite an exotic experience. I have had this t-shirt since my teens.
Next stop: Pushkar. Known for its sacred lake and annual camel fair, it felt much more peaceful than Jaipur. I spent my days sitting by the lake and hiking through the surrounding hills.
My time in Jaipur was filled with celebrations. I got to witness the soulful Jhulelal Jayanti Festival, a parade by the Sindhi community, full of devotion and sound.
I was in Jaipur during the Gangaur Festival and witnessed one of the most exotic parades in India. A grand procession filled the streets with elephants, horses, vibrant colors, and incredible performances! More photos of the event on my FB page.
I traveled to Jaipur, the pink city, to see the iconic Hawa Mahal, the Palace of Winds. But what truly amazed me were the chaotic markets, bursting with colors, scents, and life everywhere.
The main reason to come to Bikaner was to use it as a jump point for the Karni Mata Temple. Still, I wanted to see the city, and it didn’t disappoint. A mix of a majestic palace and chaotic traffic, where camels are still commonly used to carry goods.
Karni Mata Temple in Deshnoke, Rajasthan is not for the faint-hearted. Known as the Rat Temple, it’s home to thousands of holy rats, tied to an ancient legend. I had read about it years ago and finally got to see it. Truly surreal and unforgettable!