Tips

Revisiting IntStreams in Java8+

1 minute read

This post is mainly a reiteration of an article, I found online. As of Java 8, we have had the ability to replace looping operations on collections with streams and functional operations. This applies to situations where we don’t have an up-front collection to iterate upon.

How to Create a New Empty Branch for a New Project

less than 1 minute read

Sometimes, you might need branches in your git repositories, which are off the track of the main repository timeline. You want to store specific files there, and none of the original files, stored across your master and other feature branches. Luckily, git comes with an option called orphan branch. An orphan branch is basically like a store on its own, with its own history. You can delete all the existing files inside an orphan branch, and this won’t affect their state across master and other branches at...

[Pandas] Finding a Row Where One of Its Values Is at a Minimum/Maximum

1 minute read

Often, we will want to get to get a specific row, which marks the minimum or maximum of one of its columns. Let’s suppose we have the SF Salaries dataset from Kaggle. We want to find the employee name, with the largest total pay benefits. The experience with writing NumPy/Pandas filter conditions will quickly let us produce the following version: