Blogs to read

1st Aug 2024 https://sensortower.com/blog/speeding-up-the-backend-with-graph-theory https://www.postgresql.org/docs/8.4/high-availability.html https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes/ https://arpit.substack.com/p/implementing-hash-sets-with-hash https://zerodha.tech/blog/working-with-postgresql/ https://tailscale.com/blog/new-internet https://satoricyber.com/postgres-security/postgres-audit/

August 1, 2024 · 1 min · Abhiram R

Postgres (post 1)

Installing Postgres locally and connecting to it from Python First of all, what is Postgres and why do I care? Over the course of our working with data, we come across a lot of ways of storing data - cache, in-mem, files, file based databases, SQL databases, NoSQL databases etc. Each option has a specific set of usecases that are best satisfied by said storage mechanism. Postgres DB is one such storage mechanism - specifically an Open Source, Relational Database. ...

August 1, 2024 · 4 min · Abhiram R

Concurrency in Python

These next set of posts are going to be about Concurrency and Async in Python. So, one non-tech thing about me is that I run a bookclub that meets once a month. In this bookclub, we discuss books we’ve read that month and at the end of the meet, we have a nice list of books that each person has mentioned and/or discussed. After I get back home, I typically try and get the Goodreads link for each book discussed and create a little more comprehensive list for people to refer to later on. ...

April 21, 2024 · 4 min · Abhiram R

LC Num 21

21. Merge Two Sorted Lists First I didn’t understand the problem I think. In the sense that I accepted the inputs as two lists and returned a list - Python list. Then I read it and realized they want the operation in Linked lists. i took some time to recall how to move along a list and finally figured it out. The other thing that gave me a minor ankle break was when the test case was two empty lists. ...

April 15, 2024 · 2 min · Abhiram R

Design Patterns in Python - 2

Creational Patterns - The Factory Method In the previous article - [[Design Patterns in Python - 1]] , I wrote about the simplest creational pattern - The Singleton. In this edition, we look at another way to create objects - the Factory method. Again, we start with examining the meaning of the word and why it would have been used for the behavior to follow. A factory in the common usage of the word is a place where products are manufactured, where the factory is the entity doing the manufacturing. ...

March 15, 2024 · 4 min · Abhiram R

Design Patterns in Python - 1

If you’ve been using Python in production for a while like I have, you’ve either intentionally or inadvertently used some design patterns in your code. But what are they anyway? Design Patterns are well, patterns or reusable structures of code (templates) - that can be employed to implement solutions to software problems. These patterns have been bucketed into 3 main categories : Creational Patterns Structural Patterns Behavioural Patterns On what basis though? What do each of these words mean in a programmatic sense? I will deal with each of the meanings as we come across patterns that fall under them. ...

March 14, 2024 · 4 min · Abhiram R

Using Decorators

In Python, a decorator is a way to modify or extend the behavior of a function or class without changing its source code. Decorators are a powerful tool for adding functionality to existing code, and they are especially useful when you want to apply the same behavior to multiple functions or classes. How Decorators Work In Python, functions are first-class objects, which means they can be assigned to variables, passed as arguments to other functions, and returned as values from other functions. This makes it possible to define a decorator function that takes another function as an argument, modifies its behavior in some way, and then returns the modified function. ...

March 8, 2023 · 2 min · Abhiram R

Enabling Spark History Server Standalone

I’ve been using Spark for close to 2 years now but because I’ve always used it largely on clusters at work, I’ve never really had to struggle with the minutae of enabling monitoring pages like the Spark History Server UI etc. Now that I’m exploring some advanced concepts in Spark, one of the first things I learnt was enabling the Spark History Server locally i.e on a Standalone installation. Let’s assume that our Spark installation’s version is 2.3.2 and we’ve extracted the binary into /opt/spark-2.3.2-bin-hadoop2.7. ...

December 27, 2021 · 2 min · Abhiram R

About 3.10

Forget the intro posts. We’re diving in. I’ve wanted to check out the latest features of a Python release without it being in the middle of an explorative search to optimize your work code or make it more readable for a long time now. And I thought this initial post was as good a place as any to fulfil that long-time desire. So today I’ll be looking into what’s new in Python 3.10. I don’t know what the future posts will hold. We’ll see. ...

September 23, 2021 · 9 min · Abhiram R

Learning how to use FFMpeg

What is FFmpeg? In their own words, FFmpeg is “A complete, cross-platform solution to record, convert and stream audio and video.” I’ve been recording Bangpypers videos for the last few months and I haven’t really had access to a proper solution to edit videos and audio that I could have got for free/ low-cost. A good friend of mine, Vinay Keerthi, (who incidentally presented the webinar under discussion) told me to chuck GUI based fronts for editing them and told me to try FFmpeg, the CLI tool directly, which these tools probably use in the background anyway. ...

December 6, 2020 · 4 min · Abhiram R