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