#!/usr/bin/env python # coding: utf-8 --- title: Foo --- # # A Title # > A description # This notebook is used to demonstrate and test all the features of nbdev's export functionality. See the notebooks in `nbs` for how it's used. # In[ ]: #|export from __future__ import print_function # In[ ]: #|export from __future__ import absolute_import from fastcore.utils import patch # In[ ]: #|hide #|default_exp everything #|default_cls_lvl 3 # Each symbol name below has >=2 parts, split on `_`. First part is a unique name. Second is `y` if it should be exported. Third is `nall` if it shouldn't appear in `__all__`. # In[ ]: import nbdev.x,y,nbdev.z from nbdev.x import * # In[ ]: #|export def a_y(): ... # In[ ]: #|export def a_y(f): # should only appear once def ai_n(): ... class a2i_n(): ... return f # In[ ]: #|hide #|export def b_y(a:bool)->int: ... # In[ ]: #|exporti #just another comment def c_y_nall(): ... # In[ ]: #|export class d_y(): def di_n(): ... class d2i_n(): ... @a_y async def e_y(): ... # In[ ]: #|export @patch def d3i_n(self:d_y): ... # In[ ]: #|export def _f_y_nall(): ... # In[ ]: #|export some.thing def h_n(): ... # In[ ]: def i_n(): ... # In[ ]: def j_n(): ... #|export # In[ ]: #export is used in a full sentence here #therefore this is not exported def k_n(): ... # In[ ]: #exporting def l_n(): ... # In[ ]: #|export m_y = n_y = 1 # In[ ]: #|export exec("o_y=1") exec("p_y=1") _all_ = [o_y, 'p_y'] # In[ ]: #|export q_y,_r_n = (1,1) # In[ ]: #|export a_y.test = 1 # In[ ]: #|printme testing _tmp = "Cell for testing processor subclass" # In[ ]: get_ipython().run_cell_magic('html', '', 'a test\n') # In[1]: print('\033[94mhello') # In[ ]: