module td_2a.custom_magics
#
Short summary#
module ensae_teaching_cs.td_2a.custom_magics
An example of a custom magic for IPython.
Classes#
class |
truncated documentation |
---|---|
Functions#
function |
truncated documentation |
---|---|
Registers magics function, can be called from a notebook. |
Properties#
property |
truncated documentation |
---|---|
|
A contextmanager for running a block with our cross validation lock set to True. At the end of the block, … |
Methods#
method |
truncated documentation |
---|---|
This command can be activated by typing |
|
This command can be activated by typing |
|
This command can be activated by typing |
Documentation#
An example of a custom magic for IPython.
- class ensae_teaching_cs.td_2a.custom_magics.CustomMagics(**kwargs: Any)#
Bases :
Magics
Create a configurable given a config config.
Parameters#
- configConfig
If this is empty, default values are used. If config is a
Config
instance, it will be used to configure the instance.- parentConfigurable instance, optional
The parent Configurable instance of this object.
Notes#
Subclasses of Configurable must call the
__init__()
method ofConfigurable
before doing anything else and usingsuper()
:class MyConfigurable(Configurable): def __init__(self, config=None): super(MyConfigurable, self).__init__(config=config) # Then any other code you need to finish initialization.
This ensures that instances will be configured properly.
- ENSAE(line, cell=None)#
This command can be activated by typing:
%ENSAE
Or:
%%ENSAE
- ENSAEb(line, cell)#
This command can be activated by typing:
%%ENSAEb
- ENSAEl(line)#
This command can be activated by typing:
%ENSAEl
- _all_trait_default_generators: Dict[str, Any] = {'config': <bound method TraitType.default of <traitlets.traitlets.Instance object>>, 'parent': <bound method TraitType.default of <traitlets.traitlets.Instance object>>}#
- _descriptors = [<traitlets.traitlets.ObserveHandler object>, <traitlets.traitlets.Instance object>, <traitlets.traitlets.Instance object>]#
- _instance_inits = [<bound method ObserveHandler.instance_init of <traitlets.traitlets.ObserveHandler object>>, <bound method Instance.instance_init of <traitlets.traitlets.Instance object>>, <bound method Instance.instance_init of <traitlets.traitlets.Instance object>>]#
- _trait_default_generators = {}#
- ensae_teaching_cs.td_2a.custom_magics.load_ipython_extension(ip)#
Registers magics function, can be called from a notebook.