getting_started_with_ipython/slides.tex
changeset 522 d33698326409
child 524 b602b4dcc87d
equal deleted inserted replaced
521:88a01948450d 522:d33698326409
       
     1 % Created 2010-11-05 Fri 20:59
       
     2 \documentclass[presentation]{beamer}
       
     3 \usepackage[latin1]{inputenc}
       
     4 \usepackage[T1]{fontenc}
       
     5 \usepackage{fixltx2e}
       
     6 \usepackage{graphicx}
       
     7 \usepackage{longtable}
       
     8 \usepackage{float}
       
     9 \usepackage{wrapfig}
       
    10 \usepackage{soul}
       
    11 \usepackage{textcomp}
       
    12 \usepackage{marvosym}
       
    13 \usepackage{wasysym}
       
    14 \usepackage{latexsym}
       
    15 \usepackage{amssymb}
       
    16 \usepackage{hyperref}
       
    17 \tolerance=1000
       
    18 \usepackage[english]{babel} \usepackage{ae,aecompl}
       
    19 \usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
       
    20 \usepackage{listings}
       
    21 \lstset{language=Python, basicstyle=\ttfamily\bfseries,
       
    22 commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
       
    23 showstringspaces=false, keywordstyle=\color{blue}\bfseries}
       
    24 \providecommand{\alert}[1]{\textbf{#1}}
       
    25 
       
    26 \title{Getting Started -- \texttt{ipython}}
       
    27 \author{FOSSEE}
       
    28 \date{}
       
    29 
       
    30 \usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
       
    31 \begin{document}
       
    32 
       
    33 \maketitle
       
    34 
       
    35 
       
    36 
       
    37 
       
    38 
       
    39 
       
    40 
       
    41 
       
    42 
       
    43 \begin{frame}
       
    44 \frametitle{Outline}
       
    45 \label{sec-1}
       
    46 
       
    47 \begin{itemize}
       
    48 \item invoke the \texttt{ipython} interpreter
       
    49 \item quit the \texttt{ipython} interpreter
       
    50 \item navigate in the history of \texttt{ipython}
       
    51 \item use tab-completion
       
    52 \item look-up documentation of functions
       
    53 \item interrupt incomplete or incorrect commands
       
    54 \end{itemize}
       
    55 \end{frame}
       
    56 \begin{frame}
       
    57 \frametitle{Question 1}
       
    58 \label{sec-2}
       
    59 
       
    60   Type \texttt{ab} and hit tab to see what happens. Next, just type \texttt{a} and
       
    61   hit tab to see what happens.
       
    62 \end{frame}
       
    63 \begin{frame}
       
    64 \frametitle{Solution 1}
       
    65 \label{sec-3}
       
    66 
       
    67   \texttt{ab} tab completes to \texttt{abs} and \texttt{a<tab>} gives us a list of all the
       
    68   commands starting with a.
       
    69 \end{frame}
       
    70 \begin{frame}
       
    71 \frametitle{Question 2}
       
    72 \label{sec-4}
       
    73 
       
    74   Look-up the documentation of \texttt{round} and see how to use it.
       
    75 \end{frame}
       
    76 \begin{frame}
       
    77 \frametitle{Solution 2}
       
    78 \label{sec-5}
       
    79 
       
    80   \texttt{round?}
       
    81 \end{frame}
       
    82 \begin{frame}[fragile]
       
    83 \frametitle{Question 3}
       
    84 \label{sec-6}
       
    85 
       
    86   Check the output of
       
    87 \lstset{language=Python}
       
    88 \begin{lstlisting}
       
    89 round(2.48)
       
    90 round(2.48, 1)
       
    91 round(2.48, 2)
       
    92 
       
    93 round(2.484)
       
    94 round(2.484, 1)
       
    95 round(2.484, 2)
       
    96 \end{lstlisting}
       
    97   Look-up the documentation of \texttt{round} and see how to use it.
       
    98 \end{frame}
       
    99 \begin{frame}
       
   100 \frametitle{Solution 3}
       
   101 \label{sec-7}
       
   102 
       
   103   We get 2.0, 2.5 and 2.48, which are what we expect. 
       
   104 \end{frame}
       
   105 \begin{frame}
       
   106 \frametitle{Question 4}
       
   107 \label{sec-8}
       
   108 
       
   109   Try typing \texttt{round(2.484}, and hit enter. and then cancel the command
       
   110   using Ctrl-C. Then, type the command, \texttt{round(2.484, 2)} and resume
       
   111   the video.
       
   112 \end{frame}
       
   113 \begin{frame}[fragile]
       
   114 \frametitle{Solution 4}
       
   115 \label{sec-9}
       
   116 
       
   117 \lstset{language=Python}
       
   118 \begin{lstlisting}
       
   119 round(2.484 
       
   120 ^C
       
   121 
       
   122 round(2.484, 2)
       
   123 \end{lstlisting}
       
   124 \end{frame}
       
   125 \begin{frame}
       
   126 \frametitle{Summary}
       
   127 \label{sec-10}
       
   128 
       
   129 \begin{itemize}
       
   130 \item invoking and quitting the \texttt{ipython} interpreter
       
   131 \item navigating the history
       
   132 \item using tab-completion to work faster
       
   133 \item looking-up documentation using \texttt{?}
       
   134 \item sending keyboard interrupts using \texttt{Ctrl-C}
       
   135 \end{itemize}
       
   136 \end{frame}
       
   137 \begin{frame}
       
   138 \frametitle{Thank you!}
       
   139 \label{sec-11}
       
   140 
       
   141   \begin{block}{}
       
   142   \begin{center}
       
   143   This spoken tutorial has been produced by the
       
   144   \textcolor{blue}{FOSSEE} team, which is funded by the 
       
   145   \end{center}
       
   146   \begin{center}
       
   147     \textcolor{blue}{National Mission on Education through \\
       
   148       Information \& Communication Technology \\ 
       
   149       MHRD, Govt. of India}.
       
   150   \end{center}  
       
   151   \end{block}
       
   152 \end{frame}
       
   153 
       
   154 \end{document}