Articles tagged with the tag 
Caching expensive operations in python

Caching expensive operations in python

You have a function that takes a lot of time to execute. You need to call that function frequently, at different points in your code with the same arguments. This expensive function seems to be …

  Read more
Using watch to monitor output change for a command

Using watch to monitor output change for a command

This is one of the things I wish I knew earlier. There have been a lot of times, where I needed to constantly monitor the output of a command and all I would do is …

  Read more
Use named tuples to stop yourself from remembering order of tuples

Use named tuples to stop yourself from remembering order of tuples

Let's consider an example where you're returning some info about a Person object from a function in the form of a tuple.

def info():
    ...
    return name, address, age

Now, in this scenario the receiving …

  Read more