The following example shows how to define custom logic to your
notebooks. You will find more details here: Defining your own
It works pretty simple. I just defined the magic commands
%%ENSAEb and both
downloading of http://www.xavierdupre.fr/enseignement/complements/stations.txt to stations.txt
You will find the code there: custom_magics.py.