Skip to content

Instantly share code, notes, and snippets.

@karanpathak
Created May 22, 2020 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karanpathak/0b2980ae94d216d223793102afb80e90 to your computer and use it in GitHub Desktop.
Save karanpathak/0b2980ae94d216d223793102afb80e90 to your computer and use it in GitHub Desktop.
@mem.cache(verbose=0)
def func_as_decorator(x):
print("Example of Computationally intensive function!")
print("The result is not cached for this particular input")
sleep(4.0)
return np.square(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment