Python Tricks#

  • This notebook mostly includes useful Python tricks provided by Dan Bader.

  • He has a very useful book: Python Tricks: A Buffet of Awesome Python Features. Highly recommended!!

  • Also, I include other tricks that came from different sources as well as many trial-and-errors. Not very organized, but always good to keep all these referneces.

Module Path#

## Find module path
import re, os
#print(re.__path__[0]) # if the module is a directory
print(re.__file__)
path = os.path.abspath(re.__file__)
/Users/Alvin/opt/anaconda3/lib/python3.7/re.py

Sorting Iterables#

## convert a int List into str List
a = [1,5,10]
type(a)

b = str(a)
print(b)
print(type(b))

c = [str(i) for i in a]
print(c)
print(type(c))

# convert a int tuple into str tuple
e = [(2,3,4),(23,42,54)]
f = [tuple([str(i) for i in tp]) for tp in e]
print(e)
print(f)
[1, 5, 10]
<class 'str'>
['1', '5', '10']
<class 'list'>
[(2, 3, 4), (23, 42, 54)]
[('2', '3', '4'), ('23', '42', '54')]
## How to sort a Python dict by value
# (== get a representation sorted by value)
xs = {'a': 4, 'b': 3, 'c': 2, 'd': 1}
sorted(xs.items(), key=lambda x: x[1])
[('d', 1), ('c', 2), ('b', 3), ('a', 4)]
## How to sort a Python dict using operator
import operator
sorted(xs.items(), key=operator.itemgetter(0))
#operator.itemgette
[('a', 4), ('b', 3), ('c', 2), ('d', 1)]
for item in xs.items():
    print(item)
('a', 4)
('b', 3)
('c', 2)
('d', 1)
## sort a list
from random import randrange
num = [randrange(1,100) for _ in range(20)]
#sorted(num, reverse=True)
#sorted(num) # default ascending order
print(num)
num.sort()# this mutates the list and does not return anything
print(num) # list is mutable
[6, 13, 91, 87, 55, 5, 7, 9, 43, 96, 5, 67, 73, 20, 31, 57, 32, 59, 41, 79]
[5, 5, 6, 7, 9, 13, 20, 31, 32, 41, 43, 55, 57, 59, 67, 73, 79, 87, 91, 96]
## sort a tuple?

tuple_ex = (2,50, -2, 30)
#tuple_ex
tuple_ex_sorted = sorted(tuple_ex)
print(tuple_ex)
print(tuple_ex_sorted)
type(tuple_ex_sorted)
(2, 50, -2, 30)
[-2, 2, 30, 50]
list
# into string 
def convertTuple(tup, split=''): 
    str =  split.join(tup) 
    return str
  
# Driver code 
print(convertTuple(tuple([str(i) for i in tuple_ex]), split=','))
2,50,-2,30
tuple_lexicon = [
    ('the', 'det',[23, 800]),
    ('off', 'prep', [70, 100])
]

# sort according to alphabets?
#print(sorted(tuple_lexicon, key=lambda x:x[0]))

print(tuple_lexicon)
print(tuple_lexicon.sort())
print(tuple_lexicon)
[('the', 'det', [23, 800]), ('off', 'prep', [70, 100])]
None
[('off', 'prep', [70, 100]), ('the', 'det', [23, 800])]

Find Modules in Memory#

#!pip list
import sys
modulenames = set(sys.modules) & set(globals())
allmodules = [sys.modules[name] for name in modulenames]
print(allmodules)
import sys
import pprint

# pretty print loaded modules
pprint.pprint(sys.modules)
{'IPython': <module 'IPython' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/__init__.py'>,
 'IPython.core': <module 'IPython.core' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/__init__.py'>,
 'IPython.core.alias': <module 'IPython.core.alias' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/alias.py'>,
 'IPython.core.application': <module 'IPython.core.application' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/application.py'>,
 'IPython.core.async_helpers': <module 'IPython.core.async_helpers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/async_helpers.py'>,
 'IPython.core.autocall': <module 'IPython.core.autocall' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/autocall.py'>,
 'IPython.core.builtin_trap': <module 'IPython.core.builtin_trap' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/builtin_trap.py'>,
 'IPython.core.compilerop': <module 'IPython.core.compilerop' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/compilerop.py'>,
 'IPython.core.completer': <module 'IPython.core.completer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/completer.py'>,
 'IPython.core.completerlib': <module 'IPython.core.completerlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/completerlib.py'>,
 'IPython.core.crashhandler': <module 'IPython.core.crashhandler' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/crashhandler.py'>,
 'IPython.core.debugger': <module 'IPython.core.debugger' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/debugger.py'>,
 'IPython.core.display': <module 'IPython.core.display' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/display.py'>,
 'IPython.core.display_trap': <module 'IPython.core.display_trap' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/display_trap.py'>,
 'IPython.core.displayhook': <module 'IPython.core.displayhook' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/displayhook.py'>,
 'IPython.core.displaypub': <module 'IPython.core.displaypub' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/displaypub.py'>,
 'IPython.core.error': <module 'IPython.core.error' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/error.py'>,
 'IPython.core.events': <module 'IPython.core.events' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/events.py'>,
 'IPython.core.excolors': <module 'IPython.core.excolors' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/excolors.py'>,
 'IPython.core.extensions': <module 'IPython.core.extensions' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/extensions.py'>,
 'IPython.core.formatters': <module 'IPython.core.formatters' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/formatters.py'>,
 'IPython.core.getipython': <module 'IPython.core.getipython' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/getipython.py'>,
 'IPython.core.history': <module 'IPython.core.history' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/history.py'>,
 'IPython.core.hooks': <module 'IPython.core.hooks' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/hooks.py'>,
 'IPython.core.inputtransformer2': <module 'IPython.core.inputtransformer2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/inputtransformer2.py'>,
 'IPython.core.interactiveshell': <module 'IPython.core.interactiveshell' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py'>,
 'IPython.core.latex_symbols': <module 'IPython.core.latex_symbols' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/latex_symbols.py'>,
 'IPython.core.logger': <module 'IPython.core.logger' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/logger.py'>,
 'IPython.core.macro': <module 'IPython.core.macro' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/macro.py'>,
 'IPython.core.magic': <module 'IPython.core.magic' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magic.py'>,
 'IPython.core.magic_arguments': <module 'IPython.core.magic_arguments' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magic_arguments.py'>,
 'IPython.core.magics': <module 'IPython.core.magics' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/__init__.py'>,
 'IPython.core.magics.auto': <module 'IPython.core.magics.auto' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/auto.py'>,
 'IPython.core.magics.basic': <module 'IPython.core.magics.basic' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/basic.py'>,
 'IPython.core.magics.code': <module 'IPython.core.magics.code' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/code.py'>,
 'IPython.core.magics.config': <module 'IPython.core.magics.config' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/config.py'>,
 'IPython.core.magics.display': <module 'IPython.core.magics.display' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/display.py'>,
 'IPython.core.magics.execution': <module 'IPython.core.magics.execution' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/execution.py'>,
 'IPython.core.magics.extension': <module 'IPython.core.magics.extension' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/extension.py'>,
 'IPython.core.magics.history': <module 'IPython.core.magics.history' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/history.py'>,
 'IPython.core.magics.logging': <module 'IPython.core.magics.logging' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/logging.py'>,
 'IPython.core.magics.namespace': <module 'IPython.core.magics.namespace' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/namespace.py'>,
 'IPython.core.magics.osm': <module 'IPython.core.magics.osm' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/osm.py'>,
 'IPython.core.magics.packaging': <module 'IPython.core.magics.packaging' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/packaging.py'>,
 'IPython.core.magics.pylab': <module 'IPython.core.magics.pylab' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/pylab.py'>,
 'IPython.core.magics.script': <module 'IPython.core.magics.script' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/magics/script.py'>,
 'IPython.core.oinspect': <module 'IPython.core.oinspect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/oinspect.py'>,
 'IPython.core.page': <module 'IPython.core.page' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/page.py'>,
 'IPython.core.payload': <module 'IPython.core.payload' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/payload.py'>,
 'IPython.core.payloadpage': <module 'IPython.core.payloadpage' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/payloadpage.py'>,
 'IPython.core.prefilter': <module 'IPython.core.prefilter' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/prefilter.py'>,
 'IPython.core.profiledir': <module 'IPython.core.profiledir' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/profiledir.py'>,
 'IPython.core.pylabtools': <module 'IPython.core.pylabtools' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/pylabtools.py'>,
 'IPython.core.release': <module 'IPython.core.release' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/release.py'>,
 'IPython.core.shellapp': <module 'IPython.core.shellapp' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/shellapp.py'>,
 'IPython.core.splitinput': <module 'IPython.core.splitinput' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/splitinput.py'>,
 'IPython.core.ultratb': <module 'IPython.core.ultratb' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/ultratb.py'>,
 'IPython.core.usage': <module 'IPython.core.usage' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/core/usage.py'>,
 'IPython.display': <module 'IPython.display' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/display.py'>,
 'IPython.extensions': <module 'IPython.extensions' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/extensions/__init__.py'>,
 'IPython.extensions.storemagic': <module 'IPython.extensions.storemagic' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/extensions/storemagic.py'>,
 'IPython.lib': <module 'IPython.lib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/lib/__init__.py'>,
 'IPython.lib.backgroundjobs': <module 'IPython.lib.backgroundjobs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/lib/backgroundjobs.py'>,
 'IPython.lib.clipboard': <module 'IPython.lib.clipboard' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/lib/clipboard.py'>,
 'IPython.lib.display': <module 'IPython.lib.display' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/lib/display.py'>,
 'IPython.lib.pretty': <module 'IPython.lib.pretty' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/lib/pretty.py'>,
 'IPython.lib.security': <module 'IPython.lib.security' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/lib/security.py'>,
 'IPython.paths': <module 'IPython.paths' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/paths.py'>,
 'IPython.terminal': <module 'IPython.terminal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/__init__.py'>,
 'IPython.terminal.debugger': <module 'IPython.terminal.debugger' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/debugger.py'>,
 'IPython.terminal.embed': <module 'IPython.terminal.embed' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/embed.py'>,
 'IPython.terminal.interactiveshell': <module 'IPython.terminal.interactiveshell' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py'>,
 'IPython.terminal.ipapp': <module 'IPython.terminal.ipapp' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/ipapp.py'>,
 'IPython.terminal.magics': <module 'IPython.terminal.magics' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/magics.py'>,
 'IPython.terminal.prompts': <module 'IPython.terminal.prompts' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/prompts.py'>,
 'IPython.terminal.pt_inputhooks': <module 'IPython.terminal.pt_inputhooks' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/pt_inputhooks/__init__.py'>,
 'IPython.terminal.ptutils': <module 'IPython.terminal.ptutils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/ptutils.py'>,
 'IPython.terminal.shortcuts': <module 'IPython.terminal.shortcuts' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/terminal/shortcuts.py'>,
 'IPython.testing': <module 'IPython.testing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/testing/__init__.py'>,
 'IPython.testing.skipdoctest': <module 'IPython.testing.skipdoctest' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/testing/skipdoctest.py'>,
 'IPython.utils': <module 'IPython.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/__init__.py'>,
 'IPython.utils.PyColorize': <module 'IPython.utils.PyColorize' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/PyColorize.py'>,
 'IPython.utils._process_common': <module 'IPython.utils._process_common' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/_process_common.py'>,
 'IPython.utils._process_posix': <module 'IPython.utils._process_posix' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/_process_posix.py'>,
 'IPython.utils._sysinfo': <module 'IPython.utils._sysinfo' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/_sysinfo.py'>,
 'IPython.utils.capture': <module 'IPython.utils.capture' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/capture.py'>,
 'IPython.utils.colorable': <module 'IPython.utils.colorable' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/colorable.py'>,
 'IPython.utils.coloransi': <module 'IPython.utils.coloransi' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/coloransi.py'>,
 'IPython.utils.contexts': <module 'IPython.utils.contexts' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/contexts.py'>,
 'IPython.utils.data': <module 'IPython.utils.data' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/data.py'>,
 'IPython.utils.decorators': <module 'IPython.utils.decorators' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/decorators.py'>,
 'IPython.utils.dir2': <module 'IPython.utils.dir2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/dir2.py'>,
 'IPython.utils.encoding': <module 'IPython.utils.encoding' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/encoding.py'>,
 'IPython.utils.frame': <module 'IPython.utils.frame' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/frame.py'>,
 'IPython.utils.generics': <module 'IPython.utils.generics' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/generics.py'>,
 'IPython.utils.importstring': <module 'IPython.utils.importstring' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/importstring.py'>,
 'IPython.utils.io': <module 'IPython.utils.io' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/io.py'>,
 'IPython.utils.ipstruct': <module 'IPython.utils.ipstruct' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/ipstruct.py'>,
 'IPython.utils.module_paths': <module 'IPython.utils.module_paths' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/module_paths.py'>,
 'IPython.utils.openpy': <module 'IPython.utils.openpy' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/openpy.py'>,
 'IPython.utils.path': <module 'IPython.utils.path' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/path.py'>,
 'IPython.utils.process': <module 'IPython.utils.process' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/process.py'>,
 'IPython.utils.py3compat': <module 'IPython.utils.py3compat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/py3compat.py'>,
 'IPython.utils.sentinel': <module 'IPython.utils.sentinel' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/sentinel.py'>,
 'IPython.utils.strdispatch': <module 'IPython.utils.strdispatch' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/strdispatch.py'>,
 'IPython.utils.sysinfo': <module 'IPython.utils.sysinfo' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/sysinfo.py'>,
 'IPython.utils.syspathcontext': <module 'IPython.utils.syspathcontext' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/syspathcontext.py'>,
 'IPython.utils.tempdir': <module 'IPython.utils.tempdir' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/tempdir.py'>,
 'IPython.utils.terminal': <module 'IPython.utils.terminal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/terminal.py'>,
 'IPython.utils.text': <module 'IPython.utils.text' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/text.py'>,
 'IPython.utils.timing': <module 'IPython.utils.timing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/timing.py'>,
 'IPython.utils.tokenutil': <module 'IPython.utils.tokenutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/tokenutil.py'>,
 'IPython.utils.wildcard': <module 'IPython.utils.wildcard' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/utils/wildcard.py'>,
 '__future__': <module '__future__' from '/Users/Alvin/opt/anaconda3/lib/python3.7/__future__.py'>,
 '__main__': <module '__main__'>,
 '_abc': <module '_abc' (built-in)>,
 '_ast': <module '_ast' (built-in)>,
 '_asyncio': <module '_asyncio' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_asyncio.cpython-37m-darwin.so'>,
 '_bisect': <module '_bisect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_bisect.cpython-37m-darwin.so'>,
 '_blake2': <module '_blake2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_blake2.cpython-37m-darwin.so'>,
 '_bootlocale': <module '_bootlocale' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_bootlocale.py'>,
 '_bz2': <module '_bz2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_bz2.cpython-37m-darwin.so'>,
 '_codecs': <module '_codecs' (built-in)>,
 '_collections': <module '_collections' (built-in)>,
 '_collections_abc': <module '_collections_abc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_collections_abc.py'>,
 '_compat_pickle': <module '_compat_pickle' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_compat_pickle.py'>,
 '_compression': <module '_compression' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_compression.py'>,
 '_contextvars': <module '_contextvars' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_contextvars.cpython-37m-darwin.so'>,
 '_ctypes': <module '_ctypes' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so'>,
 '_curses': <module '_curses' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_curses.cpython-37m-darwin.so'>,
 '_cython_0_29_14': <module '_cython_0_29_14'>,
 '_datetime': <module '_datetime' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_datetime.cpython-37m-darwin.so'>,
 '_decimal': <module '_decimal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_decimal.cpython-37m-darwin.so'>,
 '_frozen_importlib': <module 'importlib._bootstrap' (frozen)>,
 '_frozen_importlib_external': <module 'importlib._bootstrap_external' (frozen)>,
 '_functools': <module '_functools' (built-in)>,
 '_hashlib': <module '_hashlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_hashlib.cpython-37m-darwin.so'>,
 '_heapq': <module '_heapq' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_heapq.cpython-37m-darwin.so'>,
 '_imp': <module '_imp' (built-in)>,
 '_io': <module 'io' (built-in)>,
 '_json': <module '_json' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_json.cpython-37m-darwin.so'>,
 '_locale': <module '_locale' (built-in)>,
 '_lsprof': <module '_lsprof' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_lsprof.cpython-37m-darwin.so'>,
 '_lzma': <module '_lzma' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_lzma.cpython-37m-darwin.so'>,
 '_opcode': <module '_opcode' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_opcode.cpython-37m-darwin.so'>,
 '_operator': <module '_operator' (built-in)>,
 '_osx_support': <module '_osx_support' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_osx_support.py'>,
 '_pickle': <module '_pickle' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_pickle.cpython-37m-darwin.so'>,
 '_posixsubprocess': <module '_posixsubprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-darwin.so'>,
 '_queue': <module '_queue' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_queue.cpython-37m-darwin.so'>,
 '_random': <module '_random' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_random.cpython-37m-darwin.so'>,
 '_scproxy': <module '_scproxy' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_scproxy.cpython-37m-darwin.so'>,
 '_sha3': <module '_sha3' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_sha3.cpython-37m-darwin.so'>,
 '_signal': <module '_signal' (built-in)>,
 '_sitebuiltins': <module '_sitebuiltins' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_sitebuiltins.py'>,
 '_socket': <module '_socket' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_socket.cpython-37m-darwin.so'>,
 '_sqlite3': <module '_sqlite3' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_sqlite3.cpython-37m-darwin.so'>,
 '_sre': <module '_sre' (built-in)>,
 '_ssl': <module '_ssl' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so'>,
 '_stat': <module '_stat' (built-in)>,
 '_string': <module '_string' (built-in)>,
 '_strptime': <module '_strptime' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_strptime.py'>,
 '_struct': <module '_struct' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_struct.cpython-37m-darwin.so'>,
 '_sysconfigdata_m_darwin_darwin': <module '_sysconfigdata_m_darwin_darwin' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_sysconfigdata_m_darwin_darwin.py'>,
 '_thread': <module '_thread' (built-in)>,
 '_uuid': <module '_uuid' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/_uuid.cpython-37m-darwin.so'>,
 '_warnings': <module '_warnings' (built-in)>,
 '_weakref': <module '_weakref' (built-in)>,
 '_weakrefset': <module '_weakrefset' from '/Users/Alvin/opt/anaconda3/lib/python3.7/_weakrefset.py'>,
 'abc': <module 'abc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/abc.py'>,
 'appnope': <module 'appnope' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/appnope/__init__.py'>,
 'appnope._nope': <module 'appnope._nope' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/appnope/_nope.py'>,
 'argparse': <module 'argparse' from '/Users/Alvin/opt/anaconda3/lib/python3.7/argparse.py'>,
 'array': <module 'array' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/array.cpython-37m-darwin.so'>,
 'ast': <module 'ast' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ast.py'>,
 'asyncio': <module 'asyncio' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/__init__.py'>,
 'asyncio.base_events': <module 'asyncio.base_events' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/base_events.py'>,
 'asyncio.base_futures': <module 'asyncio.base_futures' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/base_futures.py'>,
 'asyncio.base_subprocess': <module 'asyncio.base_subprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/base_subprocess.py'>,
 'asyncio.base_tasks': <module 'asyncio.base_tasks' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/base_tasks.py'>,
 'asyncio.constants': <module 'asyncio.constants' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/constants.py'>,
 'asyncio.coroutines': <module 'asyncio.coroutines' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/coroutines.py'>,
 'asyncio.events': <module 'asyncio.events' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/events.py'>,
 'asyncio.format_helpers': <module 'asyncio.format_helpers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/format_helpers.py'>,
 'asyncio.futures': <module 'asyncio.futures' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/futures.py'>,
 'asyncio.locks': <module 'asyncio.locks' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/locks.py'>,
 'asyncio.log': <module 'asyncio.log' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/log.py'>,
 'asyncio.protocols': <module 'asyncio.protocols' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/protocols.py'>,
 'asyncio.queues': <module 'asyncio.queues' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/queues.py'>,
 'asyncio.runners': <module 'asyncio.runners' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/runners.py'>,
 'asyncio.selector_events': <module 'asyncio.selector_events' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/selector_events.py'>,
 'asyncio.sslproto': <module 'asyncio.sslproto' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/sslproto.py'>,
 'asyncio.streams': <module 'asyncio.streams' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/streams.py'>,
 'asyncio.subprocess': <module 'asyncio.subprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/subprocess.py'>,
 'asyncio.tasks': <module 'asyncio.tasks' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/tasks.py'>,
 'asyncio.transports': <module 'asyncio.transports' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/transports.py'>,
 'asyncio.unix_events': <module 'asyncio.unix_events' from '/Users/Alvin/opt/anaconda3/lib/python3.7/asyncio/unix_events.py'>,
 'atexit': <module 'atexit' (built-in)>,
 'backcall': <module 'backcall' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/backcall/__init__.py'>,
 'backcall.backcall': <module 'backcall.backcall' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/backcall/backcall.py'>,
 'base64': <module 'base64' from '/Users/Alvin/opt/anaconda3/lib/python3.7/base64.py'>,
 'bdb': <module 'bdb' from '/Users/Alvin/opt/anaconda3/lib/python3.7/bdb.py'>,
 'binascii': <module 'binascii' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/binascii.cpython-37m-darwin.so'>,
 'bisect': <module 'bisect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/bisect.py'>,
 'builtins': <module 'builtins' (built-in)>,
 'bz2': <module 'bz2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/bz2.py'>,
 'cProfile': <module 'cProfile' from '/Users/Alvin/opt/anaconda3/lib/python3.7/cProfile.py'>,
 'calendar': <module 'calendar' from '/Users/Alvin/opt/anaconda3/lib/python3.7/calendar.py'>,
 'cmd': <module 'cmd' from '/Users/Alvin/opt/anaconda3/lib/python3.7/cmd.py'>,
 'code': <module 'code' from '/Users/Alvin/opt/anaconda3/lib/python3.7/code.py'>,
 'codecs': <module 'codecs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/codecs.py'>,
 'codeop': <module 'codeop' from '/Users/Alvin/opt/anaconda3/lib/python3.7/codeop.py'>,
 'collections': <module 'collections' from '/Users/Alvin/opt/anaconda3/lib/python3.7/collections/__init__.py'>,
 'collections.abc': <module 'collections.abc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/collections/abc.py'>,
 'colorama': <module 'colorama' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/colorama/__init__.py'>,
 'colorama.ansi': <module 'colorama.ansi' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/colorama/ansi.py'>,
 'colorama.ansitowin32': <module 'colorama.ansitowin32' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/colorama/ansitowin32.py'>,
 'colorama.initialise': <module 'colorama.initialise' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/colorama/initialise.py'>,
 'colorama.win32': <module 'colorama.win32' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/colorama/win32.py'>,
 'colorama.winterm': <module 'colorama.winterm' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/colorama/winterm.py'>,
 'colorsys': <module 'colorsys' from '/Users/Alvin/opt/anaconda3/lib/python3.7/colorsys.py'>,
 'concurrent': <module 'concurrent' from '/Users/Alvin/opt/anaconda3/lib/python3.7/concurrent/__init__.py'>,
 'concurrent.futures': <module 'concurrent.futures' from '/Users/Alvin/opt/anaconda3/lib/python3.7/concurrent/futures/__init__.py'>,
 'concurrent.futures._base': <module 'concurrent.futures._base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/concurrent/futures/_base.py'>,
 'contextlib': <module 'contextlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/contextlib.py'>,
 'contextvars': <module 'contextvars' from '/Users/Alvin/opt/anaconda3/lib/python3.7/contextvars.py'>,
 'copy': <module 'copy' from '/Users/Alvin/opt/anaconda3/lib/python3.7/copy.py'>,
 'copyreg': <module 'copyreg' from '/Users/Alvin/opt/anaconda3/lib/python3.7/copyreg.py'>,
 'ctypes': <module 'ctypes' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/__init__.py'>,
 'ctypes._endian': <module 'ctypes._endian' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/_endian.py'>,
 'ctypes.macholib': <module 'ctypes.macholib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/macholib/__init__.py'>,
 'ctypes.macholib.dyld': <module 'ctypes.macholib.dyld' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/macholib/dyld.py'>,
 'ctypes.macholib.dylib': <module 'ctypes.macholib.dylib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/macholib/dylib.py'>,
 'ctypes.macholib.framework': <module 'ctypes.macholib.framework' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/macholib/framework.py'>,
 'ctypes.util': <module 'ctypes.util' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ctypes/util.py'>,
 'curses': <module 'curses' from '/Users/Alvin/opt/anaconda3/lib/python3.7/curses/__init__.py'>,
 'cython_runtime': <module 'cython_runtime'>,
 'datetime': <module 'datetime' from '/Users/Alvin/opt/anaconda3/lib/python3.7/datetime.py'>,
 'dateutil': <module 'dateutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/__init__.py'>,
 'dateutil._common': <module 'dateutil._common' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/_common.py'>,
 'dateutil._version': <module 'dateutil._version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/_version.py'>,
 'dateutil.parser': <module 'dateutil.parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/parser/__init__.py'>,
 'dateutil.parser._parser': <module 'dateutil.parser._parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/parser/_parser.py'>,
 'dateutil.parser.isoparser': <module 'dateutil.parser.isoparser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/parser/isoparser.py'>,
 'dateutil.relativedelta': <module 'dateutil.relativedelta' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/relativedelta.py'>,
 'dateutil.tz': <module 'dateutil.tz' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/tz/__init__.py'>,
 'dateutil.tz._common': <module 'dateutil.tz._common' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/tz/_common.py'>,
 'dateutil.tz._factories': <module 'dateutil.tz._factories' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/tz/_factories.py'>,
 'dateutil.tz.tz': <module 'dateutil.tz.tz' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/dateutil/tz/tz.py'>,
 'decimal': <module 'decimal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/decimal.py'>,
 'decorator': <module 'decorator' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/decorator.py'>,
 'difflib': <module 'difflib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/difflib.py'>,
 'dis': <module 'dis' from '/Users/Alvin/opt/anaconda3/lib/python3.7/dis.py'>,
 'distutils': <module 'distutils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/distutils/__init__.py'>,
 'distutils.version': <module 'distutils.version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/distutils/version.py'>,
 'email': <module 'email' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/__init__.py'>,
 'email._encoded_words': <module 'email._encoded_words' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/_encoded_words.py'>,
 'email._parseaddr': <module 'email._parseaddr' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/_parseaddr.py'>,
 'email._policybase': <module 'email._policybase' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/_policybase.py'>,
 'email.base64mime': <module 'email.base64mime' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/base64mime.py'>,
 'email.charset': <module 'email.charset' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/charset.py'>,
 'email.encoders': <module 'email.encoders' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/encoders.py'>,
 'email.errors': <module 'email.errors' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/errors.py'>,
 'email.feedparser': <module 'email.feedparser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/feedparser.py'>,
 'email.header': <module 'email.header' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/header.py'>,
 'email.iterators': <module 'email.iterators' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/iterators.py'>,
 'email.message': <module 'email.message' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/message.py'>,
 'email.parser': <module 'email.parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/parser.py'>,
 'email.quoprimime': <module 'email.quoprimime' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/quoprimime.py'>,
 'email.utils': <module 'email.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/email/utils.py'>,
 'encodings': <module 'encodings' from '/Users/Alvin/opt/anaconda3/lib/python3.7/encodings/__init__.py'>,
 'encodings.aliases': <module 'encodings.aliases' from '/Users/Alvin/opt/anaconda3/lib/python3.7/encodings/aliases.py'>,
 'encodings.latin_1': <module 'encodings.latin_1' from '/Users/Alvin/opt/anaconda3/lib/python3.7/encodings/latin_1.py'>,
 'encodings.utf_8': <module 'encodings.utf_8' from '/Users/Alvin/opt/anaconda3/lib/python3.7/encodings/utf_8.py'>,
 'enum': <module 'enum' from '/Users/Alvin/opt/anaconda3/lib/python3.7/enum.py'>,
 'errno': <module 'errno' (built-in)>,
 'faulthandler': <module 'faulthandler' (built-in)>,
 'fcntl': <module 'fcntl' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/fcntl.cpython-37m-darwin.so'>,
 'filecmp': <module 'filecmp' from '/Users/Alvin/opt/anaconda3/lib/python3.7/filecmp.py'>,
 'fnmatch': <module 'fnmatch' from '/Users/Alvin/opt/anaconda3/lib/python3.7/fnmatch.py'>,
 'functools': <module 'functools' from '/Users/Alvin/opt/anaconda3/lib/python3.7/functools.py'>,
 'gc': <module 'gc' (built-in)>,
 'genericpath': <module 'genericpath' from '/Users/Alvin/opt/anaconda3/lib/python3.7/genericpath.py'>,
 'getopt': <module 'getopt' from '/Users/Alvin/opt/anaconda3/lib/python3.7/getopt.py'>,
 'getpass': <module 'getpass' from '/Users/Alvin/opt/anaconda3/lib/python3.7/getpass.py'>,
 'gettext': <module 'gettext' from '/Users/Alvin/opt/anaconda3/lib/python3.7/gettext.py'>,
 'glob': <module 'glob' from '/Users/Alvin/opt/anaconda3/lib/python3.7/glob.py'>,
 'grp': <module 'grp' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/grp.cpython-37m-darwin.so'>,
 'hashlib': <module 'hashlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/hashlib.py'>,
 'heapq': <module 'heapq' from '/Users/Alvin/opt/anaconda3/lib/python3.7/heapq.py'>,
 'hmac': <module 'hmac' from '/Users/Alvin/opt/anaconda3/lib/python3.7/hmac.py'>,
 'html': <module 'html' from '/Users/Alvin/opt/anaconda3/lib/python3.7/html/__init__.py'>,
 'html.entities': <module 'html.entities' from '/Users/Alvin/opt/anaconda3/lib/python3.7/html/entities.py'>,
 'http': <module 'http' from '/Users/Alvin/opt/anaconda3/lib/python3.7/http/__init__.py'>,
 'http.client': <module 'http.client' from '/Users/Alvin/opt/anaconda3/lib/python3.7/http/client.py'>,
 'imp': <module 'imp' from '/Users/Alvin/opt/anaconda3/lib/python3.7/imp.py'>,
 'importlib': <module 'importlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/importlib/__init__.py'>,
 'importlib._bootstrap': <module 'importlib._bootstrap' (frozen)>,
 'importlib._bootstrap_external': <module 'importlib._bootstrap_external' (frozen)>,
 'importlib.abc': <module 'importlib.abc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/importlib/abc.py'>,
 'importlib.machinery': <module 'importlib.machinery' from '/Users/Alvin/opt/anaconda3/lib/python3.7/importlib/machinery.py'>,
 'importlib.util': <module 'importlib.util' from '/Users/Alvin/opt/anaconda3/lib/python3.7/importlib/util.py'>,
 'inspect': <module 'inspect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/inspect.py'>,
 'io': <module 'io' from '/Users/Alvin/opt/anaconda3/lib/python3.7/io.py'>,
 'ipykernel': <module 'ipykernel' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/__init__.py'>,
 'ipykernel._version': <module 'ipykernel._version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/_version.py'>,
 'ipykernel.codeutil': <module 'ipykernel.codeutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/codeutil.py'>,
 'ipykernel.comm': <module 'ipykernel.comm' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/comm/__init__.py'>,
 'ipykernel.comm.comm': <module 'ipykernel.comm.comm' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/comm/comm.py'>,
 'ipykernel.comm.manager': <module 'ipykernel.comm.manager' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/comm/manager.py'>,
 'ipykernel.connect': <module 'ipykernel.connect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/connect.py'>,
 'ipykernel.datapub': <module 'ipykernel.datapub' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/datapub.py'>,
 'ipykernel.displayhook': <module 'ipykernel.displayhook' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/displayhook.py'>,
 'ipykernel.eventloops': <module 'ipykernel.eventloops' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/eventloops.py'>,
 'ipykernel.heartbeat': <module 'ipykernel.heartbeat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/heartbeat.py'>,
 'ipykernel.iostream': <module 'ipykernel.iostream' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/iostream.py'>,
 'ipykernel.ipkernel': <module 'ipykernel.ipkernel' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/ipkernel.py'>,
 'ipykernel.jsonutil': <module 'ipykernel.jsonutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/jsonutil.py'>,
 'ipykernel.kernelapp': <module 'ipykernel.kernelapp' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py'>,
 'ipykernel.kernelbase': <module 'ipykernel.kernelbase' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/kernelbase.py'>,
 'ipykernel.parentpoller': <module 'ipykernel.parentpoller' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/parentpoller.py'>,
 'ipykernel.pickleutil': <module 'ipykernel.pickleutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/pickleutil.py'>,
 'ipykernel.serialize': <module 'ipykernel.serialize' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/serialize.py'>,
 'ipykernel.zmqshell': <module 'ipykernel.zmqshell' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipykernel/zmqshell.py'>,
 'ipython_genutils': <module 'ipython_genutils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/__init__.py'>,
 'ipython_genutils._version': <module 'ipython_genutils._version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/_version.py'>,
 'ipython_genutils.encoding': <module 'ipython_genutils.encoding' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/encoding.py'>,
 'ipython_genutils.importstring': <module 'ipython_genutils.importstring' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/importstring.py'>,
 'ipython_genutils.path': <module 'ipython_genutils.path' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/path.py'>,
 'ipython_genutils.py3compat': <module 'ipython_genutils.py3compat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/py3compat.py'>,
 'ipython_genutils.text': <module 'ipython_genutils.text' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ipython_genutils/text.py'>,
 'itertools': <module 'itertools' (built-in)>,
 'jedi': <module 'jedi' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/__init__.py'>,
 'jedi._compatibility': <module 'jedi._compatibility' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/_compatibility.py'>,
 'jedi.api': <module 'jedi.api' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/__init__.py'>,
 'jedi.api.classes': <module 'jedi.api.classes' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/classes.py'>,
 'jedi.api.completion': <module 'jedi.api.completion' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/completion.py'>,
 'jedi.api.environment': <module 'jedi.api.environment' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/environment.py'>,
 'jedi.api.exceptions': <module 'jedi.api.exceptions' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/exceptions.py'>,
 'jedi.api.helpers': <module 'jedi.api.helpers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/helpers.py'>,
 'jedi.api.interpreter': <module 'jedi.api.interpreter' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/interpreter.py'>,
 'jedi.api.keywords': <module 'jedi.api.keywords' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/keywords.py'>,
 'jedi.api.project': <module 'jedi.api.project' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/api/project.py'>,
 'jedi.cache': <module 'jedi.cache' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/cache.py'>,
 'jedi.common': <module 'jedi.common' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/common/__init__.py'>,
 'jedi.common.context': <module 'jedi.common.context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/common/context.py'>,
 'jedi.common.utils': <module 'jedi.common.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/common/utils.py'>,
 'jedi.debug': <module 'jedi.debug' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/debug.py'>,
 'jedi.evaluate': <module 'jedi.evaluate' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/__init__.py'>,
 'jedi.evaluate.analysis': <module 'jedi.evaluate.analysis' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/analysis.py'>,
 'jedi.evaluate.arguments': <module 'jedi.evaluate.arguments' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/arguments.py'>,
 'jedi.evaluate.base_context': <module 'jedi.evaluate.base_context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/base_context.py'>,
 'jedi.evaluate.cache': <module 'jedi.evaluate.cache' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/cache.py'>,
 'jedi.evaluate.compiled': <module 'jedi.evaluate.compiled' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/__init__.py'>,
 'jedi.evaluate.compiled.access': <module 'jedi.evaluate.compiled.access' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/access.py'>,
 'jedi.evaluate.compiled.context': <module 'jedi.evaluate.compiled.context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/context.py'>,
 'jedi.evaluate.compiled.getattr_static': <module 'jedi.evaluate.compiled.getattr_static' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/getattr_static.py'>,
 'jedi.evaluate.compiled.mixed': <module 'jedi.evaluate.compiled.mixed' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/mixed.py'>,
 'jedi.evaluate.compiled.subprocess': <module 'jedi.evaluate.compiled.subprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/subprocess/__init__.py'>,
 'jedi.evaluate.compiled.subprocess.functions': <module 'jedi.evaluate.compiled.subprocess.functions' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/compiled/subprocess/functions.py'>,
 'jedi.evaluate.context': <module 'jedi.evaluate.context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/context/__init__.py'>,
 'jedi.evaluate.context.function': <module 'jedi.evaluate.context.function' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/context/function.py'>,
 'jedi.evaluate.context.instance': <module 'jedi.evaluate.context.instance' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/context/instance.py'>,
 'jedi.evaluate.context.iterable': <module 'jedi.evaluate.context.iterable' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/context/iterable.py'>,
 'jedi.evaluate.context.klass': <module 'jedi.evaluate.context.klass' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/context/klass.py'>,
 'jedi.evaluate.context.module': <module 'jedi.evaluate.context.module' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/context/module.py'>,
 'jedi.evaluate.docstrings': <module 'jedi.evaluate.docstrings' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/docstrings.py'>,
 'jedi.evaluate.filters': <module 'jedi.evaluate.filters' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/filters.py'>,
 'jedi.evaluate.finder': <module 'jedi.evaluate.finder' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/finder.py'>,
 'jedi.evaluate.flow_analysis': <module 'jedi.evaluate.flow_analysis' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/flow_analysis.py'>,
 'jedi.evaluate.gradual': <module 'jedi.evaluate.gradual' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/__init__.py'>,
 'jedi.evaluate.gradual.annotation': <module 'jedi.evaluate.gradual.annotation' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/annotation.py'>,
 'jedi.evaluate.gradual.conversion': <module 'jedi.evaluate.gradual.conversion' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/conversion.py'>,
 'jedi.evaluate.gradual.stub_context': <module 'jedi.evaluate.gradual.stub_context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/stub_context.py'>,
 'jedi.evaluate.gradual.typeshed': <module 'jedi.evaluate.gradual.typeshed' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/typeshed.py'>,
 'jedi.evaluate.gradual.typing': <module 'jedi.evaluate.gradual.typing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/typing.py'>,
 'jedi.evaluate.gradual.utils': <module 'jedi.evaluate.gradual.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/gradual/utils.py'>,
 'jedi.evaluate.helpers': <module 'jedi.evaluate.helpers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/helpers.py'>,
 'jedi.evaluate.imports': <module 'jedi.evaluate.imports' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/imports.py'>,
 'jedi.evaluate.lazy_context': <module 'jedi.evaluate.lazy_context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/lazy_context.py'>,
 'jedi.evaluate.names': <module 'jedi.evaluate.names' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/names.py'>,
 'jedi.evaluate.param': <module 'jedi.evaluate.param' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/param.py'>,
 'jedi.evaluate.parser_cache': <module 'jedi.evaluate.parser_cache' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/parser_cache.py'>,
 'jedi.evaluate.recursion': <module 'jedi.evaluate.recursion' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/recursion.py'>,
 'jedi.evaluate.signature': <module 'jedi.evaluate.signature' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/signature.py'>,
 'jedi.evaluate.syntax_tree': <module 'jedi.evaluate.syntax_tree' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/syntax_tree.py'>,
 'jedi.evaluate.sys_path': <module 'jedi.evaluate.sys_path' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/sys_path.py'>,
 'jedi.evaluate.usages': <module 'jedi.evaluate.usages' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/usages.py'>,
 'jedi.evaluate.utils': <module 'jedi.evaluate.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/evaluate/utils.py'>,
 'jedi.file_io': <module 'jedi.file_io' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/file_io.py'>,
 'jedi.parser_utils': <module 'jedi.parser_utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/parser_utils.py'>,
 'jedi.settings': <module 'jedi.settings' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jedi/settings.py'>,
 'json': <module 'json' from '/Users/Alvin/opt/anaconda3/lib/python3.7/json/__init__.py'>,
 'json.decoder': <module 'json.decoder' from '/Users/Alvin/opt/anaconda3/lib/python3.7/json/decoder.py'>,
 'json.encoder': <module 'json.encoder' from '/Users/Alvin/opt/anaconda3/lib/python3.7/json/encoder.py'>,
 'json.scanner': <module 'json.scanner' from '/Users/Alvin/opt/anaconda3/lib/python3.7/json/scanner.py'>,
 'jupyter_client': <module 'jupyter_client' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/__init__.py'>,
 'jupyter_client._version': <module 'jupyter_client._version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/_version.py'>,
 'jupyter_client.adapter': <module 'jupyter_client.adapter' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/adapter.py'>,
 'jupyter_client.asynchronous': <module 'jupyter_client.asynchronous' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/asynchronous/__init__.py'>,
 'jupyter_client.asynchronous.channels': <module 'jupyter_client.asynchronous.channels' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/asynchronous/channels.py'>,
 'jupyter_client.asynchronous.client': <module 'jupyter_client.asynchronous.client' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/asynchronous/client.py'>,
 'jupyter_client.blocking': <module 'jupyter_client.blocking' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/blocking/__init__.py'>,
 'jupyter_client.blocking.channels': <module 'jupyter_client.blocking.channels' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/blocking/channels.py'>,
 'jupyter_client.blocking.client': <module 'jupyter_client.blocking.client' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/blocking/client.py'>,
 'jupyter_client.channels': <module 'jupyter_client.channels' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/channels.py'>,
 'jupyter_client.channelsabc': <module 'jupyter_client.channelsabc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/channelsabc.py'>,
 'jupyter_client.client': <module 'jupyter_client.client' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/client.py'>,
 'jupyter_client.clientabc': <module 'jupyter_client.clientabc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/clientabc.py'>,
 'jupyter_client.connect': <module 'jupyter_client.connect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py'>,
 'jupyter_client.jsonutil': <module 'jupyter_client.jsonutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/jsonutil.py'>,
 'jupyter_client.kernelspec': <module 'jupyter_client.kernelspec' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/kernelspec.py'>,
 'jupyter_client.launcher': <module 'jupyter_client.launcher' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/launcher.py'>,
 'jupyter_client.localinterfaces': <module 'jupyter_client.localinterfaces' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/localinterfaces.py'>,
 'jupyter_client.manager': <module 'jupyter_client.manager' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py'>,
 'jupyter_client.managerabc': <module 'jupyter_client.managerabc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/managerabc.py'>,
 'jupyter_client.multikernelmanager': <module 'jupyter_client.multikernelmanager' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py'>,
 'jupyter_client.session': <module 'jupyter_client.session' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_client/session.py'>,
 'jupyter_core': <module 'jupyter_core' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_core/__init__.py'>,
 'jupyter_core.paths': <module 'jupyter_core.paths' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_core/paths.py'>,
 'jupyter_core.version': <module 'jupyter_core.version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/jupyter_core/version.py'>,
 'keyword': <module 'keyword' from '/Users/Alvin/opt/anaconda3/lib/python3.7/keyword.py'>,
 'linecache': <module 'linecache' from '/Users/Alvin/opt/anaconda3/lib/python3.7/linecache.py'>,
 'locale': <module 'locale' from '/Users/Alvin/opt/anaconda3/lib/python3.7/locale.py'>,
 'logging': <module 'logging' from '/Users/Alvin/opt/anaconda3/lib/python3.7/logging/__init__.py'>,
 'logging.handlers': <module 'logging.handlers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/logging/handlers.py'>,
 'lzma': <module 'lzma' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lzma.py'>,
 'marshal': <module 'marshal' (built-in)>,
 'math': <module 'math' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/math.cpython-37m-darwin.so'>,
 'mimetypes': <module 'mimetypes' from '/Users/Alvin/opt/anaconda3/lib/python3.7/mimetypes.py'>,
 'mpl_toolkits': <module 'mpl_toolkits' (namespace)>,
 'ntpath': <module 'ntpath' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ntpath.py'>,
 'numbers': <module 'numbers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/numbers.py'>,
 'opcode': <module 'opcode' from '/Users/Alvin/opt/anaconda3/lib/python3.7/opcode.py'>,
 'operator': <module 'operator' from '/Users/Alvin/opt/anaconda3/lib/python3.7/operator.py'>,
 'os': <module 'os' from '/Users/Alvin/opt/anaconda3/lib/python3.7/os.py'>,
 'os.path': <module 'posixpath' from '/Users/Alvin/opt/anaconda3/lib/python3.7/posixpath.py'>,
 'parso': <module 'parso' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/__init__.py'>,
 'parso._compatibility': <module 'parso._compatibility' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/_compatibility.py'>,
 'parso.cache': <module 'parso.cache' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/cache.py'>,
 'parso.file_io': <module 'parso.file_io' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/file_io.py'>,
 'parso.grammar': <module 'parso.grammar' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/grammar.py'>,
 'parso.normalizer': <module 'parso.normalizer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/normalizer.py'>,
 'parso.parser': <module 'parso.parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/parser.py'>,
 'parso.pgen2': <module 'parso.pgen2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/pgen2/__init__.py'>,
 'parso.pgen2.generator': <module 'parso.pgen2.generator' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/pgen2/generator.py'>,
 'parso.pgen2.grammar_parser': <module 'parso.pgen2.grammar_parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/pgen2/grammar_parser.py'>,
 'parso.python': <module 'parso.python' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/__init__.py'>,
 'parso.python.diff': <module 'parso.python.diff' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/diff.py'>,
 'parso.python.errors': <module 'parso.python.errors' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/errors.py'>,
 'parso.python.parser': <module 'parso.python.parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/parser.py'>,
 'parso.python.pep8': <module 'parso.python.pep8' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/pep8.py'>,
 'parso.python.prefix': <module 'parso.python.prefix' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/prefix.py'>,
 'parso.python.token': <module 'parso.python.token' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/token.py'>,
 'parso.python.tokenize': <module 'parso.python.tokenize' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/tokenize.py'>,
 'parso.python.tree': <module 'parso.python.tree' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/python/tree.py'>,
 'parso.tree': <module 'parso.tree' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/tree.py'>,
 'parso.utils': <module 'parso.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/parso/utils.py'>,
 'pathlib': <module 'pathlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pathlib.py'>,
 'pdb': <module 'pdb' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pdb.py'>,
 'pexpect': <module 'pexpect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/__init__.py'>,
 'pexpect.exceptions': <module 'pexpect.exceptions' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/exceptions.py'>,
 'pexpect.expect': <module 'pexpect.expect' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/expect.py'>,
 'pexpect.pty_spawn': <module 'pexpect.pty_spawn' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/pty_spawn.py'>,
 'pexpect.run': <module 'pexpect.run' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/run.py'>,
 'pexpect.spawnbase': <module 'pexpect.spawnbase' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/spawnbase.py'>,
 'pexpect.utils': <module 'pexpect.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pexpect/utils.py'>,
 'pickle': <module 'pickle' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pickle.py'>,
 'pickleshare': <module 'pickleshare' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pickleshare.py'>,
 'pip': <module 'pip' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pip/__init__.py'>,
 'pip._internal': <module 'pip._internal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pip/_internal/__init__.py'>,
 'pip._internal.utils': <module 'pip._internal.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pip/_internal/utils/__init__.py'>,
 'pip._internal.utils.inject_securetransport': <module 'pip._internal.utils.inject_securetransport' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pip/_internal/utils/inject_securetransport.py'>,
 'pip._internal.utils.typing': <module 'pip._internal.utils.typing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pip/_internal/utils/typing.py'>,
 'pkg_resources': <module 'pkg_resources' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py'>,
 'pkg_resources._vendor': <module 'pkg_resources._vendor' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/__init__.py'>,
 'pkg_resources._vendor.appdirs': <module 'pkg_resources._vendor.appdirs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/appdirs.py'>,
 'pkg_resources._vendor.packaging': <module 'pkg_resources._vendor.packaging' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__init__.py'>,
 'pkg_resources._vendor.packaging.__about__': <module 'pkg_resources._vendor.packaging.__about__' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__about__.py'>,
 'pkg_resources._vendor.pyparsing': <module 'pkg_resources._vendor.pyparsing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py'>,
 'pkg_resources._vendor.six': <module 'pkg_resources._vendor.six' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/six.py'>,
 'pkg_resources._vendor.six.moves': <module 'pkg_resources._vendor.six.moves' (<pkg_resources._vendor.six._SixMetaPathImporter object at 0x7fa9485da2d0>)>,
 'pkg_resources._vendor.six.moves.urllib': <module 'pkg_resources._vendor.six.moves.urllib' (<pkg_resources._vendor.six._SixMetaPathImporter object at 0x7fa9485da2d0>)>,
 'pkg_resources.extern': <module 'pkg_resources.extern' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/extern/__init__.py'>,
 'pkg_resources.extern.appdirs': <module 'pkg_resources._vendor.appdirs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/appdirs.py'>,
 'pkg_resources.extern.packaging': <module 'pkg_resources._vendor.packaging' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__init__.py'>,
 'pkg_resources.extern.packaging._compat': <module 'pkg_resources.extern.packaging._compat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_compat.py'>,
 'pkg_resources.extern.packaging._structures': <module 'pkg_resources.extern.packaging._structures' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_structures.py'>,
 'pkg_resources.extern.packaging.markers': <module 'pkg_resources.extern.packaging.markers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/markers.py'>,
 'pkg_resources.extern.packaging.requirements': <module 'pkg_resources.extern.packaging.requirements' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/requirements.py'>,
 'pkg_resources.extern.packaging.specifiers': <module 'pkg_resources.extern.packaging.specifiers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/specifiers.py'>,
 'pkg_resources.extern.packaging.version': <module 'pkg_resources.extern.packaging.version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py'>,
 'pkg_resources.extern.pyparsing': <module 'pkg_resources._vendor.pyparsing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py'>,
 'pkg_resources.extern.six': <module 'pkg_resources._vendor.six' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/_vendor/six.py'>,
 'pkg_resources.extern.six.moves': <module 'pkg_resources._vendor.six.moves' (<pkg_resources._vendor.six._SixMetaPathImporter object at 0x7fa9485da2d0>)>,
 'pkg_resources.extern.six.moves.urllib': <module 'pkg_resources._vendor.six.moves.urllib' (<pkg_resources._vendor.six._SixMetaPathImporter object at 0x7fa9485da2d0>)>,
 'pkg_resources.py2_warn': <module 'pkg_resources.py2_warn' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/py2_warn.py'>,
 'pkg_resources.py31compat': <module 'pkg_resources.py31compat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pkg_resources/py31compat.py'>,
 'pkgutil': <module 'pkgutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pkgutil.py'>,
 'platform': <module 'platform' from '/Users/Alvin/opt/anaconda3/lib/python3.7/platform.py'>,
 'plistlib': <module 'plistlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/plistlib.py'>,
 'posix': <module 'posix' (built-in)>,
 'posixpath': <module 'posixpath' from '/Users/Alvin/opt/anaconda3/lib/python3.7/posixpath.py'>,
 'pprint': <module 'pprint' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pprint.py'>,
 'profile': <module 'profile' from '/Users/Alvin/opt/anaconda3/lib/python3.7/profile.py'>,
 'prompt_toolkit': <module 'prompt_toolkit' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/__init__.py'>,
 'prompt_toolkit.application': <module 'prompt_toolkit.application' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/application/__init__.py'>,
 'prompt_toolkit.application.application': <module 'prompt_toolkit.application.application' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/application/application.py'>,
 'prompt_toolkit.application.current': <module 'prompt_toolkit.application.current' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/application/current.py'>,
 'prompt_toolkit.application.dummy': <module 'prompt_toolkit.application.dummy' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/application/dummy.py'>,
 'prompt_toolkit.application.run_in_terminal': <module 'prompt_toolkit.application.run_in_terminal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/application/run_in_terminal.py'>,
 'prompt_toolkit.auto_suggest': <module 'prompt_toolkit.auto_suggest' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/auto_suggest.py'>,
 'prompt_toolkit.buffer': <module 'prompt_toolkit.buffer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/buffer.py'>,
 'prompt_toolkit.cache': <module 'prompt_toolkit.cache' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/cache.py'>,
 'prompt_toolkit.clipboard': <module 'prompt_toolkit.clipboard' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/clipboard/__init__.py'>,
 'prompt_toolkit.clipboard.base': <module 'prompt_toolkit.clipboard.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/clipboard/base.py'>,
 'prompt_toolkit.clipboard.in_memory': <module 'prompt_toolkit.clipboard.in_memory' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/clipboard/in_memory.py'>,
 'prompt_toolkit.completion': <module 'prompt_toolkit.completion' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/completion/__init__.py'>,
 'prompt_toolkit.completion.base': <module 'prompt_toolkit.completion.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/completion/base.py'>,
 'prompt_toolkit.completion.filesystem': <module 'prompt_toolkit.completion.filesystem' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/completion/filesystem.py'>,
 'prompt_toolkit.completion.fuzzy_completer': <module 'prompt_toolkit.completion.fuzzy_completer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/completion/fuzzy_completer.py'>,
 'prompt_toolkit.completion.nested': <module 'prompt_toolkit.completion.nested' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/completion/nested.py'>,
 'prompt_toolkit.completion.word_completer': <module 'prompt_toolkit.completion.word_completer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/completion/word_completer.py'>,
 'prompt_toolkit.data_structures': <module 'prompt_toolkit.data_structures' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/data_structures.py'>,
 'prompt_toolkit.document': <module 'prompt_toolkit.document' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/document.py'>,
 'prompt_toolkit.enums': <module 'prompt_toolkit.enums' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/enums.py'>,
 'prompt_toolkit.eventloop': <module 'prompt_toolkit.eventloop' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/eventloop/__init__.py'>,
 'prompt_toolkit.eventloop.async_generator': <module 'prompt_toolkit.eventloop.async_generator' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/eventloop/async_generator.py'>,
 'prompt_toolkit.eventloop.inputhook': <module 'prompt_toolkit.eventloop.inputhook' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/eventloop/inputhook.py'>,
 'prompt_toolkit.eventloop.utils': <module 'prompt_toolkit.eventloop.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/eventloop/utils.py'>,
 'prompt_toolkit.filters': <module 'prompt_toolkit.filters' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/filters/__init__.py'>,
 'prompt_toolkit.filters.app': <module 'prompt_toolkit.filters.app' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/filters/app.py'>,
 'prompt_toolkit.filters.base': <module 'prompt_toolkit.filters.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/filters/base.py'>,
 'prompt_toolkit.filters.cli': <module 'prompt_toolkit.filters.cli' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/filters/cli.py'>,
 'prompt_toolkit.filters.utils': <module 'prompt_toolkit.filters.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/filters/utils.py'>,
 'prompt_toolkit.formatted_text': <module 'prompt_toolkit.formatted_text' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/formatted_text/__init__.py'>,
 'prompt_toolkit.formatted_text.ansi': <module 'prompt_toolkit.formatted_text.ansi' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/formatted_text/ansi.py'>,
 'prompt_toolkit.formatted_text.base': <module 'prompt_toolkit.formatted_text.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/formatted_text/base.py'>,
 'prompt_toolkit.formatted_text.html': <module 'prompt_toolkit.formatted_text.html' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/formatted_text/html.py'>,
 'prompt_toolkit.formatted_text.pygments': <module 'prompt_toolkit.formatted_text.pygments' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/formatted_text/pygments.py'>,
 'prompt_toolkit.formatted_text.utils': <module 'prompt_toolkit.formatted_text.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/formatted_text/utils.py'>,
 'prompt_toolkit.history': <module 'prompt_toolkit.history' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/history.py'>,
 'prompt_toolkit.input': <module 'prompt_toolkit.input' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/input/__init__.py'>,
 'prompt_toolkit.input.ansi_escape_sequences': <module 'prompt_toolkit.input.ansi_escape_sequences' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/input/ansi_escape_sequences.py'>,
 'prompt_toolkit.input.base': <module 'prompt_toolkit.input.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/input/base.py'>,
 'prompt_toolkit.input.defaults': <module 'prompt_toolkit.input.defaults' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/input/defaults.py'>,
 'prompt_toolkit.input.typeahead': <module 'prompt_toolkit.input.typeahead' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/input/typeahead.py'>,
 'prompt_toolkit.input.vt100_parser': <module 'prompt_toolkit.input.vt100_parser' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/input/vt100_parser.py'>,
 'prompt_toolkit.key_binding': <module 'prompt_toolkit.key_binding' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/__init__.py'>,
 'prompt_toolkit.key_binding.bindings': <module 'prompt_toolkit.key_binding.bindings' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/__init__.py'>,
 'prompt_toolkit.key_binding.bindings.auto_suggest': <module 'prompt_toolkit.key_binding.bindings.auto_suggest' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/auto_suggest.py'>,
 'prompt_toolkit.key_binding.bindings.basic': <module 'prompt_toolkit.key_binding.bindings.basic' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/basic.py'>,
 'prompt_toolkit.key_binding.bindings.completion': <module 'prompt_toolkit.key_binding.bindings.completion' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/completion.py'>,
 'prompt_toolkit.key_binding.bindings.cpr': <module 'prompt_toolkit.key_binding.bindings.cpr' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/cpr.py'>,
 'prompt_toolkit.key_binding.bindings.emacs': <module 'prompt_toolkit.key_binding.bindings.emacs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/emacs.py'>,
 'prompt_toolkit.key_binding.bindings.focus': <module 'prompt_toolkit.key_binding.bindings.focus' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/focus.py'>,
 'prompt_toolkit.key_binding.bindings.mouse': <module 'prompt_toolkit.key_binding.bindings.mouse' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/mouse.py'>,
 'prompt_toolkit.key_binding.bindings.named_commands': <module 'prompt_toolkit.key_binding.bindings.named_commands' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/named_commands.py'>,
 'prompt_toolkit.key_binding.bindings.open_in_editor': <module 'prompt_toolkit.key_binding.bindings.open_in_editor' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/open_in_editor.py'>,
 'prompt_toolkit.key_binding.bindings.page_navigation': <module 'prompt_toolkit.key_binding.bindings.page_navigation' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/page_navigation.py'>,
 'prompt_toolkit.key_binding.bindings.scroll': <module 'prompt_toolkit.key_binding.bindings.scroll' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/scroll.py'>,
 'prompt_toolkit.key_binding.bindings.vi': <module 'prompt_toolkit.key_binding.bindings.vi' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/bindings/vi.py'>,
 'prompt_toolkit.key_binding.defaults': <module 'prompt_toolkit.key_binding.defaults' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/defaults.py'>,
 'prompt_toolkit.key_binding.digraphs': <module 'prompt_toolkit.key_binding.digraphs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/digraphs.py'>,
 'prompt_toolkit.key_binding.emacs_state': <module 'prompt_toolkit.key_binding.emacs_state' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/emacs_state.py'>,
 'prompt_toolkit.key_binding.key_bindings': <module 'prompt_toolkit.key_binding.key_bindings' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_bindings.py'>,
 'prompt_toolkit.key_binding.key_processor': <module 'prompt_toolkit.key_binding.key_processor' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_processor.py'>,
 'prompt_toolkit.key_binding.vi_state': <module 'prompt_toolkit.key_binding.vi_state' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/key_binding/vi_state.py'>,
 'prompt_toolkit.keys': <module 'prompt_toolkit.keys' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/keys.py'>,
 'prompt_toolkit.layout': <module 'prompt_toolkit.layout' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/__init__.py'>,
 'prompt_toolkit.layout.containers': <module 'prompt_toolkit.layout.containers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/containers.py'>,
 'prompt_toolkit.layout.controls': <module 'prompt_toolkit.layout.controls' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/controls.py'>,
 'prompt_toolkit.layout.dimension': <module 'prompt_toolkit.layout.dimension' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/dimension.py'>,
 'prompt_toolkit.layout.dummy': <module 'prompt_toolkit.layout.dummy' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/dummy.py'>,
 'prompt_toolkit.layout.layout': <module 'prompt_toolkit.layout.layout' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/layout.py'>,
 'prompt_toolkit.layout.margins': <module 'prompt_toolkit.layout.margins' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/margins.py'>,
 'prompt_toolkit.layout.menus': <module 'prompt_toolkit.layout.menus' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/menus.py'>,
 'prompt_toolkit.layout.mouse_handlers': <module 'prompt_toolkit.layout.mouse_handlers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/mouse_handlers.py'>,
 'prompt_toolkit.layout.processors': <module 'prompt_toolkit.layout.processors' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/processors.py'>,
 'prompt_toolkit.layout.screen': <module 'prompt_toolkit.layout.screen' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/screen.py'>,
 'prompt_toolkit.layout.utils': <module 'prompt_toolkit.layout.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/layout/utils.py'>,
 'prompt_toolkit.lexers': <module 'prompt_toolkit.lexers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/lexers/__init__.py'>,
 'prompt_toolkit.lexers.base': <module 'prompt_toolkit.lexers.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/lexers/base.py'>,
 'prompt_toolkit.lexers.pygments': <module 'prompt_toolkit.lexers.pygments' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/lexers/pygments.py'>,
 'prompt_toolkit.mouse_events': <module 'prompt_toolkit.mouse_events' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/mouse_events.py'>,
 'prompt_toolkit.output': <module 'prompt_toolkit.output' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/output/__init__.py'>,
 'prompt_toolkit.output.base': <module 'prompt_toolkit.output.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/output/base.py'>,
 'prompt_toolkit.output.color_depth': <module 'prompt_toolkit.output.color_depth' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/output/color_depth.py'>,
 'prompt_toolkit.output.defaults': <module 'prompt_toolkit.output.defaults' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/output/defaults.py'>,
 'prompt_toolkit.output.vt100': <module 'prompt_toolkit.output.vt100' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/output/vt100.py'>,
 'prompt_toolkit.patch_stdout': <module 'prompt_toolkit.patch_stdout' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/patch_stdout.py'>,
 'prompt_toolkit.renderer': <module 'prompt_toolkit.renderer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/renderer.py'>,
 'prompt_toolkit.search': <module 'prompt_toolkit.search' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/search.py'>,
 'prompt_toolkit.selection': <module 'prompt_toolkit.selection' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/selection.py'>,
 'prompt_toolkit.shortcuts': <module 'prompt_toolkit.shortcuts' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/__init__.py'>,
 'prompt_toolkit.shortcuts.dialogs': <module 'prompt_toolkit.shortcuts.dialogs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/dialogs.py'>,
 'prompt_toolkit.shortcuts.progress_bar': <module 'prompt_toolkit.shortcuts.progress_bar' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/progress_bar/__init__.py'>,
 'prompt_toolkit.shortcuts.progress_bar.base': <module 'prompt_toolkit.shortcuts.progress_bar.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/progress_bar/base.py'>,
 'prompt_toolkit.shortcuts.progress_bar.formatters': <module 'prompt_toolkit.shortcuts.progress_bar.formatters' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/progress_bar/formatters.py'>,
 'prompt_toolkit.shortcuts.prompt': <module 'prompt_toolkit.shortcuts.prompt' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/prompt.py'>,
 'prompt_toolkit.shortcuts.utils': <module 'prompt_toolkit.shortcuts.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/shortcuts/utils.py'>,
 'prompt_toolkit.styles': <module 'prompt_toolkit.styles' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/__init__.py'>,
 'prompt_toolkit.styles.base': <module 'prompt_toolkit.styles.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/base.py'>,
 'prompt_toolkit.styles.defaults': <module 'prompt_toolkit.styles.defaults' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/defaults.py'>,
 'prompt_toolkit.styles.named_colors': <module 'prompt_toolkit.styles.named_colors' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/named_colors.py'>,
 'prompt_toolkit.styles.pygments': <module 'prompt_toolkit.styles.pygments' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/pygments.py'>,
 'prompt_toolkit.styles.style': <module 'prompt_toolkit.styles.style' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/style.py'>,
 'prompt_toolkit.styles.style_transformation': <module 'prompt_toolkit.styles.style_transformation' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/styles/style_transformation.py'>,
 'prompt_toolkit.utils': <module 'prompt_toolkit.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/utils.py'>,
 'prompt_toolkit.validation': <module 'prompt_toolkit.validation' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/validation.py'>,
 'prompt_toolkit.widgets': <module 'prompt_toolkit.widgets' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/widgets/__init__.py'>,
 'prompt_toolkit.widgets.base': <module 'prompt_toolkit.widgets.base' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/widgets/base.py'>,
 'prompt_toolkit.widgets.dialogs': <module 'prompt_toolkit.widgets.dialogs' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/widgets/dialogs.py'>,
 'prompt_toolkit.widgets.menus': <module 'prompt_toolkit.widgets.menus' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/widgets/menus.py'>,
 'prompt_toolkit.widgets.toolbars': <module 'prompt_toolkit.widgets.toolbars' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/prompt_toolkit/widgets/toolbars.py'>,
 'pstats': <module 'pstats' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pstats.py'>,
 'pty': <module 'pty' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pty.py'>,
 'ptyprocess': <module 'ptyprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ptyprocess/__init__.py'>,
 'ptyprocess.ptyprocess': <module 'ptyprocess.ptyprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ptyprocess/ptyprocess.py'>,
 'ptyprocess.util': <module 'ptyprocess.util' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/ptyprocess/util.py'>,
 'pwd': <module 'pwd' (built-in)>,
 'pydoc': <module 'pydoc' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pydoc.py'>,
 'pydoc_data': <module 'pydoc_data' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pydoc_data/__init__.py'>,
 'pydoc_data.topics': <module 'pydoc_data.topics' from '/Users/Alvin/opt/anaconda3/lib/python3.7/pydoc_data/topics.py'>,
 'pyexpat': <module 'pyexpat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/pyexpat.cpython-37m-darwin.so'>,
 'pyexpat.errors': <module 'pyexpat.errors'>,
 'pyexpat.model': <module 'pyexpat.model'>,
 'pygments': <module 'pygments' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/__init__.py'>,
 'pygments.filter': <module 'pygments.filter' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/filter.py'>,
 'pygments.filters': <module 'pygments.filters' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/filters/__init__.py'>,
 'pygments.formatter': <module 'pygments.formatter' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/formatter.py'>,
 'pygments.formatters': <module 'pygments.formatters' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/formatters/__init__.py'>,
 'pygments.formatters._mapping': <module 'pygments.formatters._mapping' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/formatters/_mapping.py'>,
 'pygments.formatters.html': <module 'pygments.formatters.html' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/formatters/html.py'>,
 'pygments.lexer': <module 'pygments.lexer' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/lexer.py'>,
 'pygments.lexers': <module 'pygments.lexers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/lexers/__init__.py'>,
 'pygments.lexers._mapping': <module 'pygments.lexers._mapping' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/lexers/_mapping.py'>,
 'pygments.lexers.python': <module 'pygments.lexers.python' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/lexers/python.py'>,
 'pygments.modeline': <module 'pygments.modeline' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/modeline.py'>,
 'pygments.plugin': <module 'pygments.plugin' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/plugin.py'>,
 'pygments.regexopt': <module 'pygments.regexopt' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/regexopt.py'>,
 'pygments.style': <module 'pygments.style' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/style.py'>,
 'pygments.styles': <module 'pygments.styles' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/styles/__init__.py'>,
 'pygments.token': <module 'pygments.token' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/token.py'>,
 'pygments.unistring': <module 'pygments.unistring' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/unistring.py'>,
 'pygments.util': <module 'pygments.util' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/pygments/util.py'>,
 'queue': <module 'queue' from '/Users/Alvin/opt/anaconda3/lib/python3.7/queue.py'>,
 'quopri': <module 'quopri' from '/Users/Alvin/opt/anaconda3/lib/python3.7/quopri.py'>,
 'random': <module 'random' from '/Users/Alvin/opt/anaconda3/lib/python3.7/random.py'>,
 're': <module 're' from '/Users/Alvin/opt/anaconda3/lib/python3.7/re.py'>,
 'reprlib': <module 'reprlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/reprlib.py'>,
 'resource': <module 'resource' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/resource.cpython-37m-darwin.so'>,
 'runpy': <module 'runpy' from '/Users/Alvin/opt/anaconda3/lib/python3.7/runpy.py'>,
 'select': <module 'select' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/select.cpython-37m-darwin.so'>,
 'selectors': <module 'selectors' from '/Users/Alvin/opt/anaconda3/lib/python3.7/selectors.py'>,
 'shlex': <module 'shlex' from '/Users/Alvin/opt/anaconda3/lib/python3.7/shlex.py'>,
 'shutil': <module 'shutil' from '/Users/Alvin/opt/anaconda3/lib/python3.7/shutil.py'>,
 'signal': <module 'signal' from '/Users/Alvin/opt/anaconda3/lib/python3.7/signal.py'>,
 'site': <module 'site' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site.py'>,
 'six': <module 'six' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/six.py'>,
 'six.moves': <module 'six.moves' (<six._SixMetaPathImporter object at 0x7fa960342590>)>,
 'socket': <module 'socket' from '/Users/Alvin/opt/anaconda3/lib/python3.7/socket.py'>,
 'sphinxcontrib': <module 'sphinxcontrib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/sphinxcontrib/__init__.py'>,
 'sqlite3': <module 'sqlite3' from '/Users/Alvin/opt/anaconda3/lib/python3.7/sqlite3/__init__.py'>,
 'sqlite3.dbapi2': <module 'sqlite3.dbapi2' from '/Users/Alvin/opt/anaconda3/lib/python3.7/sqlite3/dbapi2.py'>,
 'sre_compile': <module 'sre_compile' from '/Users/Alvin/opt/anaconda3/lib/python3.7/sre_compile.py'>,
 'sre_constants': <module 'sre_constants' from '/Users/Alvin/opt/anaconda3/lib/python3.7/sre_constants.py'>,
 'sre_parse': <module 'sre_parse' from '/Users/Alvin/opt/anaconda3/lib/python3.7/sre_parse.py'>,
 'ssl': <module 'ssl' from '/Users/Alvin/opt/anaconda3/lib/python3.7/ssl.py'>,
 'stat': <module 'stat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/stat.py'>,
 'storemagic': <module 'storemagic' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/IPython/extensions/storemagic.py'>,
 'string': <module 'string' from '/Users/Alvin/opt/anaconda3/lib/python3.7/string.py'>,
 'struct': <module 'struct' from '/Users/Alvin/opt/anaconda3/lib/python3.7/struct.py'>,
 'subprocess': <module 'subprocess' from '/Users/Alvin/opt/anaconda3/lib/python3.7/subprocess.py'>,
 'sys': <module 'sys' (built-in)>,
 'sysconfig': <module 'sysconfig' from '/Users/Alvin/opt/anaconda3/lib/python3.7/sysconfig.py'>,
 'tempfile': <module 'tempfile' from '/Users/Alvin/opt/anaconda3/lib/python3.7/tempfile.py'>,
 'termios': <module 'termios' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/termios.cpython-37m-darwin.so'>,
 'textwrap': <module 'textwrap' from '/Users/Alvin/opt/anaconda3/lib/python3.7/textwrap.py'>,
 'threading': <module 'threading' from '/Users/Alvin/opt/anaconda3/lib/python3.7/threading.py'>,
 'time': <module 'time' (built-in)>,
 'timeit': <module 'timeit' from '/Users/Alvin/opt/anaconda3/lib/python3.7/timeit.py'>,
 'token': <module 'token' from '/Users/Alvin/opt/anaconda3/lib/python3.7/token.py'>,
 'tokenize': <module 'tokenize' from '/Users/Alvin/opt/anaconda3/lib/python3.7/tokenize.py'>,
 'tornado': <module 'tornado' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/__init__.py'>,
 'tornado.concurrent': <module 'tornado.concurrent' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/concurrent.py'>,
 'tornado.escape': <module 'tornado.escape' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/escape.py'>,
 'tornado.gen': <module 'tornado.gen' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/gen.py'>,
 'tornado.ioloop': <module 'tornado.ioloop' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/ioloop.py'>,
 'tornado.locks': <module 'tornado.locks' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/locks.py'>,
 'tornado.log': <module 'tornado.log' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/log.py'>,
 'tornado.platform': <module 'tornado.platform' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/platform/__init__.py'>,
 'tornado.platform.asyncio': <module 'tornado.platform.asyncio' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/platform/asyncio.py'>,
 'tornado.queues': <module 'tornado.queues' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/queues.py'>,
 'tornado.speedups': <module 'tornado.speedups' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/speedups.cpython-37m-darwin.so'>,
 'tornado.util': <module 'tornado.util' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/tornado/util.py'>,
 'traceback': <module 'traceback' from '/Users/Alvin/opt/anaconda3/lib/python3.7/traceback.py'>,
 'traitlets': <module 'traitlets' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/__init__.py'>,
 'traitlets._version': <module 'traitlets._version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/_version.py'>,
 'traitlets.config': <module 'traitlets.config' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/__init__.py'>,
 'traitlets.config.application': <module 'traitlets.config.application' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py'>,
 'traitlets.config.configurable': <module 'traitlets.config.configurable' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/configurable.py'>,
 'traitlets.config.loader': <module 'traitlets.config.loader' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/config/loader.py'>,
 'traitlets.log': <module 'traitlets.log' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/log.py'>,
 'traitlets.traitlets': <module 'traitlets.traitlets' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/traitlets.py'>,
 'traitlets.utils': <module 'traitlets.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/utils/__init__.py'>,
 'traitlets.utils.bunch': <module 'traitlets.utils.bunch' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/utils/bunch.py'>,
 'traitlets.utils.getargspec': <module 'traitlets.utils.getargspec' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/utils/getargspec.py'>,
 'traitlets.utils.importstring': <module 'traitlets.utils.importstring' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/utils/importstring.py'>,
 'traitlets.utils.sentinel': <module 'traitlets.utils.sentinel' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/traitlets/utils/sentinel.py'>,
 'tty': <module 'tty' from '/Users/Alvin/opt/anaconda3/lib/python3.7/tty.py'>,
 'types': <module 'types' from '/Users/Alvin/opt/anaconda3/lib/python3.7/types.py'>,
 'typing': <module 'typing' from '/Users/Alvin/opt/anaconda3/lib/python3.7/typing.py'>,
 'typing.io': <class 'typing.io'>,
 'typing.re': <class 'typing.re'>,
 'unicodedata': <module 'unicodedata' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/unicodedata.cpython-37m-darwin.so'>,
 'urllib': <module 'urllib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/urllib/__init__.py'>,
 'urllib.error': <module 'urllib.error' from '/Users/Alvin/opt/anaconda3/lib/python3.7/urllib/error.py'>,
 'urllib.parse': <module 'urllib.parse' from '/Users/Alvin/opt/anaconda3/lib/python3.7/urllib/parse.py'>,
 'urllib.request': <module 'urllib.request' from '/Users/Alvin/opt/anaconda3/lib/python3.7/urllib/request.py'>,
 'urllib.response': <module 'urllib.response' from '/Users/Alvin/opt/anaconda3/lib/python3.7/urllib/response.py'>,
 'uu': <module 'uu' from '/Users/Alvin/opt/anaconda3/lib/python3.7/uu.py'>,
 'uuid': <module 'uuid' from '/Users/Alvin/opt/anaconda3/lib/python3.7/uuid.py'>,
 'warnings': <module 'warnings' from '/Users/Alvin/opt/anaconda3/lib/python3.7/warnings.py'>,
 'wcwidth': <module 'wcwidth' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/wcwidth/__init__.py'>,
 'wcwidth.table_wide': <module 'wcwidth.table_wide' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/wcwidth/table_wide.py'>,
 'wcwidth.table_zero': <module 'wcwidth.table_zero' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/wcwidth/table_zero.py'>,
 'wcwidth.wcwidth': <module 'wcwidth.wcwidth' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/wcwidth/wcwidth.py'>,
 'weakref': <module 'weakref' from '/Users/Alvin/opt/anaconda3/lib/python3.7/weakref.py'>,
 'xml': <module 'xml' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/__init__.py'>,
 'xml.dom': <module 'xml.dom' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/dom/__init__.py'>,
 'xml.dom.NodeFilter': <module 'xml.dom.NodeFilter' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/dom/NodeFilter.py'>,
 'xml.dom.domreg': <module 'xml.dom.domreg' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/dom/domreg.py'>,
 'xml.dom.minicompat': <module 'xml.dom.minicompat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/dom/minicompat.py'>,
 'xml.dom.minidom': <module 'xml.dom.minidom' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/dom/minidom.py'>,
 'xml.dom.xmlbuilder': <module 'xml.dom.xmlbuilder' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/dom/xmlbuilder.py'>,
 'xml.parsers': <module 'xml.parsers' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/parsers/__init__.py'>,
 'xml.parsers.expat': <module 'xml.parsers.expat' from '/Users/Alvin/opt/anaconda3/lib/python3.7/xml/parsers/expat.py'>,
 'xml.parsers.expat.errors': <module 'pyexpat.errors'>,
 'xml.parsers.expat.model': <module 'pyexpat.model'>,
 'zipfile': <module 'zipfile' from '/Users/Alvin/opt/anaconda3/lib/python3.7/zipfile.py'>,
 'zipimport': <module 'zipimport' (built-in)>,
 'zlib': <module 'zlib' from '/Users/Alvin/opt/anaconda3/lib/python3.7/lib-dynload/zlib.cpython-37m-darwin.so'>,
 'zmq': <module 'zmq' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/__init__.py'>,
 'zmq._future': <module 'zmq._future' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/_future.py'>,
 'zmq.asyncio': <module 'zmq.asyncio' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/asyncio/__init__.py'>,
 'zmq.backend': <module 'zmq.backend' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/__init__.py'>,
 'zmq.backend.cython': <module 'zmq.backend.cython' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/__init__.py'>,
 'zmq.backend.cython._device': <module 'zmq.backend.cython._device' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/_device.cpython-37m-darwin.so'>,
 'zmq.backend.cython._poll': <module 'zmq.backend.cython._poll' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/_poll.cpython-37m-darwin.so'>,
 'zmq.backend.cython._proxy_steerable': <module 'zmq.backend.cython._proxy_steerable' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/_proxy_steerable.cpython-37m-darwin.so'>,
 'zmq.backend.cython._version': <module 'zmq.backend.cython._version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/_version.cpython-37m-darwin.so'>,
 'zmq.backend.cython.constants': <module 'zmq.backend.cython.constants' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/constants.cpython-37m-darwin.so'>,
 'zmq.backend.cython.context': <module 'zmq.backend.cython.context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/context.cpython-37m-darwin.so'>,
 'zmq.backend.cython.error': <module 'zmq.backend.cython.error' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/error.cpython-37m-darwin.so'>,
 'zmq.backend.cython.message': <module 'zmq.backend.cython.message' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/message.cpython-37m-darwin.so'>,
 'zmq.backend.cython.socket': <module 'zmq.backend.cython.socket' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/socket.cpython-37m-darwin.so'>,
 'zmq.backend.cython.utils': <module 'zmq.backend.cython.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/cython/utils.cpython-37m-darwin.so'>,
 'zmq.backend.select': <module 'zmq.backend.select' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/backend/select.py'>,
 'zmq.error': <module 'zmq.error' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/error.py'>,
 'zmq.eventloop': <module 'zmq.eventloop' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/eventloop/__init__.py'>,
 'zmq.eventloop.ioloop': <module 'zmq.eventloop.ioloop' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/eventloop/ioloop.py'>,
 'zmq.eventloop.zmqstream': <module 'zmq.eventloop.zmqstream' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/eventloop/zmqstream.py'>,
 'zmq.sugar': <module 'zmq.sugar' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/__init__.py'>,
 'zmq.sugar.attrsettr': <module 'zmq.sugar.attrsettr' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/attrsettr.py'>,
 'zmq.sugar.constants': <module 'zmq.sugar.constants' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/constants.py'>,
 'zmq.sugar.context': <module 'zmq.sugar.context' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/context.py'>,
 'zmq.sugar.frame': <module 'zmq.sugar.frame' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/frame.py'>,
 'zmq.sugar.poll': <module 'zmq.sugar.poll' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/poll.py'>,
 'zmq.sugar.socket': <module 'zmq.sugar.socket' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/socket.py'>,
 'zmq.sugar.stopwatch': <module 'zmq.sugar.stopwatch' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/stopwatch.py'>,
 'zmq.sugar.tracker': <module 'zmq.sugar.tracker' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/tracker.py'>,
 'zmq.sugar.version': <module 'zmq.sugar.version' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/sugar/version.py'>,
 'zmq.utils': <module 'zmq.utils' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/utils/__init__.py'>,
 'zmq.utils.constant_names': <module 'zmq.utils.constant_names' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/utils/constant_names.py'>,
 'zmq.utils.jsonapi': <module 'zmq.utils.jsonapi' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/utils/jsonapi.py'>,
 'zmq.utils.strtypes': <module 'zmq.utils.strtypes' from '/Users/Alvin/opt/anaconda3/lib/python3.7/site-packages/zmq/utils/strtypes.py'>}

Format Dict Output#

## How to output a dictionary
my_mapping = {'a': 23, 'b': 42, 'c': 0xc0ffee}
print(my_mapping)
# The "json" module can do a much better job:
import json
import pprint
print(json.dumps(my_mapping, indent=4, sort_keys=True))


# # Note this only works with dicts containing
# # primitive types (check out the "pprint" module):
# json.dumps({all: 'yup'})
{'a': 23, 'b': 42, 'c': 12648430}
{
    "a": 23,
    "b": 42,
    "c": 12648430
}
import pprint
pprint.pprint(my_mapping, depth=1)
mPP = pprint.PrettyPrinter()
mPP.pprint(my_mapping)
{'a': 23, 'b': 42, 'c': 12648430}
{'a': 23, 'b': 42, 'c': 12648430}
my_mapping
{'a': 23, 'b': 42, 'c': 12648430}

Unpacking Tuples#

## Unpacking function arguments

def myfunc(x, y, z):
    print(x, y, z)

tuple_vec = (1, 0, 1)
dict_vec = {'x': 1, 'y': 0, 'z': 1}
dict_vec2 = {'z':3, 'x': 1, 'y': 2}
myfunc(*tuple_vec) # pass all necessary function arguments all at once, using a tuple
myfunc(**dict_vec) # pass all necessary function arguments all at once, using a dict
myfunc(**dict_vec2) # dict would help match which values go with which function argument!
1 0 1
1 0 1
1 2 3

filter()#

  • filter(function, iterable) is useful when you need to filter elements in a sequence by using self-defined methods (which returns either True or False.

  • If function is None, then the fiter() returns only True elements from the iterable.

  • Source

# list of letters
letters = ['a', 'b', 'd', 'e', 'i', 'j', 'o']

# function that filters vowels
def filterVowels(letter):
    vowels = ['a', 'e', 'i', 'o', 'u']

    if(letter in vowels):
        return True
    else:
        return False

filteredVowels = filter(filterVowels, letters)

print('The filtered vowels are:')
for vowel in filteredVowels:
    print(vowel)
The filtered vowels are:
a
e
i
o
# random list
randomList = [1, 'a', 0, False, True, '0']

filteredList = filter(None, randomList)

print('The filtered elements are:')
for element in filteredList:
    print(element)
The filtered elements are:
1
a
True
0

Asterisk *#

That FUNCTION(*iterable) is passing all of the items in the iterable into the function call as separate arguments, without us even needing to know how many arguments are in the list.

fruits = ['lemon', 'pear', 'watermelon', 'tomato']
print(fruits)
print(fruits[0], fruits[1], fruits[2], fruits[3])
print(*fruits)
['lemon', 'pear', 'watermelon', 'tomato']
lemon pear watermelon tomato
lemon pear watermelon tomato
def transpose_list(list_of_lists):
    return [
        list(row)
        for row in zip(*list_of_lists)
    ]
transpose_list([[1, 4, 7], [2, 5, 8], [3, 6, 9]])
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]

Find Index of Specific Values in List#

Four methods to identify indices of List element which are specific values.

# Python3 code to demonstrate  
# finding indices of values 
# using naive method  
  
# initializing list  
test_list = [1, 3, 4, 3, 6, 7] 
  
# using naive method 
# to find indices for 3 
res_list = [] 
for i in range(0, len(test_list)) : 
    if test_list[i] == 3 : 
        res_list.append(i) 
        
res_list
[1, 3]
# Python3 code to demonstrate  
# finding indices of values 
# using list comprehension  
  
# initializing list  
test_list = [1, 3, 4, 3, 6, 7] 
  
# printing initial list  
print ("Original list : " + str(test_list)) 
  
# using list comprehension 
# to find indices for 3 
res_list = [i for i in range(len(test_list)) if test_list[i] == 3] 
          
# printing resultant list  
print ("New indices list : " + str(res_list)) 
Original list : [1, 3, 4, 3, 6, 7]
New indices list : [1, 3]
# Python3 code to demonstrate 
# finding indices of values 
# using enumerate() 

# initializing list 
test_list = [1, 3, 4, 3, 6, 7] 

# printing initial list 
print ("Original list : " + str(test_list)) 

# using enumerate() 
# to find indices for 3 
res_list = [i for i, value in enumerate(test_list) if value == 3] 
		
# printing resultant list 
print ("New indices list : " + str(res_list)) 
Original list : [1, 3, 4, 3, 6, 7]
New indices list : [1, 3]
# Python3 code to demonstrate 
# finding indices of values 
# using filter() 

# initializing list 
test_list = [1, 3, 4, 3, 6, 7] 

# printing initial list 
print ("Original list : " + str(test_list)) 

# using filter() 
# to find indices for 3 
res_list = list(filter(lambda x: test_list[x] == 3, range(len(test_list)))) 
		
# printing resultant list 
print ("New indices list : " + str(res_list)) 
Original list : [1, 3, 4, 3, 6, 7]
New indices list : [1, 3]