how to calculate memory for running a piece of code in python code example
Example 1: how to measure how much your of cpu your program is using in python
$ pip install memory_profiler
Example 2: how to measure how much your of cpu your program is using in python
$ pip install line_profiler