#!/usr/bin/env python # coding: utf-8 # This is a test notebook for demonstrating code hiding. # In[2]: from IPython.display import display from IPython.display import HTML import IPython.core.display as di # Example: di.display_html('

%s:

' % str, raw=True) # This line will hide code by default when the notebook is exported as HTML di.display_html('', raw=True) # This line will add a button to toggle visibility of code blocks, for use with the HTML export version di.display_html('''''', raw=True) # In[3]: import numpy as np import sys # In[4]: np.random.rand(10) # In[5]: for i in range(50): print(i) # In[ ]: