Created
July 13, 2017 08:32
-
-
Save blorgblerg/1dca0ff264235cdbcbd10e9934bd541e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
# These are the usual ipython objects, including this one you are creating | |
ipython_vars = ['In', 'Out', 'exit', 'quit', 'get_ipython', 'ipython_vars'] | |
# Get a sorted list of the objects and their sizes | |
sorted([(x, sys.getsizeof(globals().get(x))) for x in dir() if not x.startswith('_') and x not in sys.modules and x not in ipython_vars], key=lambda x: x[1], reverse=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created by https://stackoverflow.com/users/3135417/abdou