Skip to content

Instantly share code, notes, and snippets.

@cereniyim
Created April 6, 2020 10:23
Show Gist options
  • Save cereniyim/eebc5e8e42481fb0608378dc7941363b to your computer and use it in GitHub Desktop.
Save cereniyim/eebc5e8e42481fb0608378dc7941363b to your computer and use it in GitHub Desktop.
Debugging enabled in jupyter notebooks
# source https://towardsdatascience.com/debugging-jupyter-notebooks-will-boost-your-productivity-a33387f4fa62
import contextlib
with contextlib.redirect_stdout(None):
import pixiedust
# New Cell
def find_max (values):
max = 0
import pdb; pdb.set_trace()
for val in values:
if val > max:
max = val
return max
find_max(random.sample(range(100), 10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment