-
Python: Measure the execution time of small python code
The “timeit” module lets you measure the execution time of small bits of Python code. This can help you find the execution time of your code and thus help in a quick performance improvement of your code. A tiny example follows. Please note that every time, the execution time varies for the same snippet. in… Read More »Python: Measure the execution time of small python code
-
Git: Delete all branches except for the master/main branch – CLI Alias
It can be as simple as this alias in your terminal In my case, I had multiple branches and when I ran the gbr command, it showed the following result, deleting all three branches I had.
-
Python: Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.
This post is one of my new series solving one problem per day. For those of you solving coding challenges for your next software engineering job, here is one more problem. This problem was asked by Uber. Problem Statement Given an array of integers, return a new array such that each element at index i of the… Read More »Python: Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i.