Green code — Python energyusage package

Photo by Alistair MacRobert on Unsplash

Green
To make something more environmentally-friendly

How to use it?

import energyusage
energyusage.
energyusage under the hood
Function docstring Pt.1
Function docstring Pt.2
def recursive_fib(n):
if (n <= 2): return 1
else: return recursive_fib(n-1) + recursive_fib(n-2)
energyusage.evaluate(recursive_fib, 40, pdf=True)
Photo by Riccardo Annandale on Unsplash
Photo by Junior Moran on Unsplash

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store