wiki:IPython

Version 4 (modified by acosce, 9 years ago) (diff)

--

Boîte à outils IPython

Avant toute chose

Déclarer un port pour l'utilisation de Ipython. Pour cela il faut updater le tableau sur cette page

Premier test depuis obelix

Depuis sa machine locale (si le port est 70XX et le login sur obelix : YYYY)

ssh -X -t -L 70XX:localhost:70XX YYYY@obelix.lscelb.extra.cea.fr

Loader les modules nécessaires

module load python/2.7.5

Sourcer pyferret (en csh)

source ~brock/pyferret-1.0.2/ferret_paths.csh

Créer un répertoire de travail

mkdir ~/IPy_Notebooks

Lancer ipython

ipython notebook --no-browser --port=70XX --notebook-dir=~/IPy_Notebooks

Sur sa machine locale ouvrir la page suivante http://localhost:70XX/ dans un navigateur web. Cette page est votre bibliothèque de notebook.

Créer un premier notebook

  • créer un nouveau notebook avec le bouton "new notebook". Un nouvel onglet s'ouvre alors pour ce nouveau notebook.
  • Sur cette nouvelle page, vous pouvez changer le nom du notebook en cliquant sur "untitled0". Le nom est immédiatement changé dans votre bibliothèque
  • Pour utiliser ferret
    In[1]: %install_ext https://raw.github.com/PBrockmann/ipython-ferretmagic/master/ferretmagic.py
    In[2]: %load_ext ferretmagic
    
  • Pour lancer l'exécution d'une cellule : appuyer sur la touche "play", ou "ctrl + entree"
  • Pour utiliser un fichier sous le dods store du tgcc
    %%ferret 
    use "http://dods.extra.cea.fr/cgi-bin/nph-dods/store/login/path_on_store"