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