Sathiya Sarathi Gunasekaran
Pythonist 🐍| Linux Geek who codes on WSL | Data & Cloud Fanatic | Blogging Advocate |
Guide to Elasticdump - Moving and Saving Elasticsearch Indices
Elasticsearch initially began as a custom search engine. These days, it has gone above and beyond that singular role as it's part of log aggregation stacks, security monitoring, and even as a datastore for performing exploratory analysis. Indices in Elasticsearch is where the data is stored, and there are often...
Checking Vulnerabilities in Your Python Code with Bandit
As developers, we're encouraged from the start of the journey to write clean code. Equally as important, but less talked about is writing and using secure code. In Python projects, we typically install modules and third-party packages to avoid developing solutions that already exist. However, this common practice is why...
How to Install Pip on Windows
Package managers are tools commonly created for programming languages that make the setup and management of third-party packages easier. Pip is the preferred package manager in Python for both the native Pip modules and the ones installed inside the virtual environments. When Pip is invoked, it automatically crawls against the...
Guide to Understanding chmod
File access permissions and security are at the heart of *nix-based operating systems. File objects can belong to users and/or groups, and at times they need to be shared with various combinations of those two. There are multiple ways in *nix systems to reinforce secure sharing of these objects....
How to Concatenate String Variables in Bash
Bash utilities make so many tasks simple, but not all tasks have a straightforward command or operator. A very common and usual task in many scripting scenarios is concatenating string variables. Bash doesn't have a built-in function or command-line utility to concatenate two strings together. However, there are many ways...
How to Print Colored Text in Python
It's typical for CLI apps to return text in the same color of the terminal. There are always cases when we want to highlight output to the user, for example, a warning or error message. In those cases, a dash of color could make a difference. This article shows you...
How to Split a List Into Even Chunks in Python
Splitting strings and lists are common programming activities in Python and other languages. Sometimes we have to split our data in peculiar ways, but more commonly - into even chunks. The language does not have a built-in function to do this and in this tutorial, we'll take a look at...
Python: How to Print Without Newline or Space
The print() function in Python appends a newline to the output when displayed on the tty (teletypewriter A.K.A the terminal). When you don't want your message displayed with newlines or with spaces, how can you change the behavior of print()? This can easily be achieved by altering the...
Python: How to Remove a Key from a Dictionary
In this article, we'll take a look at how to remove keys from Python dictionaries. This can be done with the pop() function, the del keyword, and with dict comprehensions. Remove a Key Using pop(key,d) The pop(key, d) function removes a key from a dictionary and returns...