getting-started-ipython/slides.org
changeset 522 d33698326409
parent 521 88a01948450d
child 523 54bdda4aefa5
equal deleted inserted replaced
521:88a01948450d 522:d33698326409
     1 #+LaTeX_CLASS: beamer
       
     2 #+LaTeX_CLASS_OPTIONS: [presentation]
       
     3 #+BEAMER_FRAME_LEVEL: 1
       
     4 
       
     5 #+BEAMER_HEADER_EXTRA: \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
       
     6 #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
       
     7 #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC
       
     8 
       
     9 #+LaTeX_CLASS: beamer
       
    10 #+LaTeX_CLASS_OPTIONS: [presentation]
       
    11 
       
    12 #+LaTeX_HEADER: \usepackage[english]{babel} \usepackage{ae,aecompl}
       
    13 #+LaTeX_HEADER: \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
       
    14 
       
    15 #+LaTeX_HEADER:\usepackage{listings}
       
    16 
       
    17 #+LaTeX_HEADER:\lstset{language=Python, basicstyle=\ttfamily\bfseries,
       
    18 #+LaTeX_HEADER:  commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
       
    19 #+LaTeX_HEADER:  showstringspaces=false, keywordstyle=\color{blue}\bfseries}
       
    20 
       
    21 #+TITLE:    Getting Started -- ~ipython~
       
    22 #+AUTHOR:    FOSSEE
       
    23 #+EMAIL:     
       
    24 #+DATE:    
       
    25 
       
    26 #+DESCRIPTION: 
       
    27 #+KEYWORDS: 
       
    28 #+LANGUAGE:  en
       
    29 #+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
       
    30 #+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:not-in-toc
       
    31 
       
    32 * Outline
       
    33   + invoke the ~ipython~ interpreter
       
    34   + quit the ~ipython~ interpreter
       
    35   + navigate in the history of ~ipython~
       
    36   + use tab-completion
       
    37   + look-up documentation of functions
       
    38   + interrupt incomplete or incorrect commands
       
    39 * Question 1
       
    40   Type =ab= and hit tab to see what happens. Next, just type =a= and
       
    41   hit tab to see what happens.
       
    42 * Solution 1
       
    43   =ab= tab completes to =abs= and =a<tab>= gives us a list of all the
       
    44   commands starting with a.
       
    45 * Question 2
       
    46   Look-up the documentation of =round= and see how to use it.
       
    47 * Solution 2
       
    48   =round?=
       
    49 * Question 3
       
    50   Check the output of
       
    51   #+begin_src python
       
    52     round(2.48)
       
    53     round(2.48, 1)
       
    54     round(2.48, 2)
       
    55     
       
    56     round(2.484)
       
    57     round(2.484, 1)
       
    58     round(2.484, 2)
       
    59   #+end_src 
       
    60   Look-up the documentation of =round= and see how to use it.
       
    61 * Solution 3
       
    62   We get 2.0, 2.5 and 2.48, which are what we expect. 
       
    63 * Question 4
       
    64   Try typing =round(2.484=, and hit enter. and then cancel the command
       
    65   using Ctrl-C. Then, type the command, =round(2.484, 2)= and resume
       
    66   the video.
       
    67 * Solution 4
       
    68   #+begin_src python
       
    69     round(2.484 
       
    70     ^C
       
    71     
       
    72     round(2.484, 2)
       
    73   #+end_src 
       
    74 
       
    75 
       
    76 
       
    77 * Summary
       
    78   + invoking and quitting the ~ipython~ interpreter
       
    79   + navigating the history
       
    80   + using tab-completion to work faster
       
    81   + looking-up documentation using ~?~
       
    82   + sending keyboard interrupts using ~Ctrl-C~
       
    83 
       
    84 * Thank you!
       
    85 #+begin_latex
       
    86   \begin{block}{}
       
    87   \begin{center}
       
    88   This spoken tutorial has been produced by the
       
    89   \textcolor{blue}{FOSSEE} team, which is funded by the 
       
    90   \end{center}
       
    91   \begin{center}
       
    92     \textcolor{blue}{National Mission on Education through \\
       
    93       Information \& Communication Technology \\ 
       
    94       MHRD, Govt. of India}.
       
    95   \end{center}  
       
    96   \end{block}
       
    97 #+end_latex
       
    98 
       
    99