
% Default to the notebook output style

    


% Inherit from the specified cell style.




    
\documentclass{article}

    
    
    \usepackage{graphicx} % Used to insert images
    \usepackage{adjustbox} % Used to constrain images to a maximum size 
    \usepackage{color} % Allow colors to be defined
    \usepackage{enumerate} % Needed for markdown enumerations to work
    \usepackage{geometry} % Used to adjust the document margins
    \usepackage{amsmath} % Equations
    \usepackage{amssymb} % Equations
    \usepackage[mathletters]{ucs} % Extended unicode (utf-8) support
    \usepackage[utf8x]{inputenc} % Allow utf-8 characters in the tex document
    \usepackage{fancyvrb} % verbatim replacement that allows latex
    \usepackage{grffile} % extends the file name processing of package graphics 
                         % to support a larger range 
    % The hyperref package gives us a pdf with properly built
    % internal navigation ('pdf bookmarks' for the table of contents,
    % internal cross-reference links, web links for URLs, etc.)
    \usepackage{hyperref}
    \usepackage{longtable} % longtable support required by pandoc >1.10
    \usepackage{booktabs}  % table support for pandoc > 1.12.2
    

    
    
    \definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
    \definecolor{darkorange}{rgb}{.71,0.21,0.01}
    \definecolor{darkgreen}{rgb}{.12,.54,.11}
    \definecolor{myteal}{rgb}{.26, .44, .56}
    \definecolor{gray}{gray}{0.45}
    \definecolor{lightgray}{gray}{.95}
    \definecolor{mediumgray}{gray}{.8}
    \definecolor{inputbackground}{rgb}{.95, .95, .85}
    \definecolor{outputbackground}{rgb}{.95, .95, .95}
    \definecolor{traceback}{rgb}{1, .95, .95}
    % ansi colors
    \definecolor{red}{rgb}{.6,0,0}
    \definecolor{green}{rgb}{0,.65,0}
    \definecolor{brown}{rgb}{0.6,0.6,0}
    \definecolor{blue}{rgb}{0,.145,.698}
    \definecolor{purple}{rgb}{.698,.145,.698}
    \definecolor{cyan}{rgb}{0,.698,.698}
    \definecolor{lightgray}{gray}{0.5}
    
    % bright ansi colors
    \definecolor{darkgray}{gray}{0.25}
    \definecolor{lightred}{rgb}{1.0,0.39,0.28}
    \definecolor{lightgreen}{rgb}{0.48,0.99,0.0}
    \definecolor{lightblue}{rgb}{0.53,0.81,0.92}
    \definecolor{lightpurple}{rgb}{0.87,0.63,0.87}
    \definecolor{lightcyan}{rgb}{0.5,1.0,0.83}
    
    % commands and environments needed by pandoc snippets
    % extracted from the output of `pandoc -s`
    \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
    % Add ',fontsize=\small' for more characters per line
    \newenvironment{Shaded}{}{}
    \newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
    \newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
    \newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
    \newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
    \newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
    \newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
    \newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
    \newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
    \newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
    \newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
    \newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
    \newcommand{\RegionMarkerTok}[1]{{#1}}
    \newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
    \newcommand{\NormalTok}[1]{{#1}}
    
    % Define a nice break command that doesn't care if a line doesn't already
    % exist.
    \def\br{\hspace*{\fill} \\* }
    % Math Jax compatability definitions
    \def\gt{>}
    \def\lt{<}
    % Document parameters
    \title{intro\_ipython}
    
    
    

    % Pygments definitions
    
\makeatletter
\def\PY@reset{\let\PY@it=\relax \let\PY@bf=\relax%
    \let\PY@ul=\relax \let\PY@tc=\relax%
    \let\PY@bc=\relax \let\PY@ff=\relax}
\def\PY@tok#1{\csname PY@tok@#1\endcsname}
\def\PY@toks#1+{\ifx\relax#1\empty\else%
    \PY@tok{#1}\expandafter\PY@toks\fi}
\def\PY@do#1{\PY@bc{\PY@tc{\PY@ul{%
    \PY@it{\PY@bf{\PY@ff{#1}}}}}}}
\def\PY#1#2{\PY@reset\PY@toks#1+\relax+\PY@do{#2}}

\expandafter\def\csname PY@tok@gd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
\expandafter\def\csname PY@tok@gu\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
\expandafter\def\csname PY@tok@gt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
\expandafter\def\csname PY@tok@gs\endcsname{\let\PY@bf=\textbf}
\expandafter\def\csname PY@tok@gr\endcsname{\def\PY@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
\expandafter\def\csname PY@tok@cm\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@vg\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@m\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@mh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@go\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.53,0.53,0.53}{##1}}}
\expandafter\def\csname PY@tok@ge\endcsname{\let\PY@it=\textit}
\expandafter\def\csname PY@tok@vc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@il\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@cs\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@cp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
\expandafter\def\csname PY@tok@gi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
\expandafter\def\csname PY@tok@gh\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\expandafter\def\csname PY@tok@ni\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
\expandafter\def\csname PY@tok@nl\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
\expandafter\def\csname PY@tok@nn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\expandafter\def\csname PY@tok@no\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
\expandafter\def\csname PY@tok@na\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
\expandafter\def\csname PY@tok@nb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@nc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\expandafter\def\csname PY@tok@nd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
\expandafter\def\csname PY@tok@ne\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
\expandafter\def\csname PY@tok@nf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
\expandafter\def\csname PY@tok@si\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
\expandafter\def\csname PY@tok@s2\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@vi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@nt\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@nv\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@s1\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@sh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@sc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@sx\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@bp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@c1\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@kc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@c\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
\expandafter\def\csname PY@tok@mf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@err\endcsname{\def\PY@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
\expandafter\def\csname PY@tok@kd\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@ss\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
\expandafter\def\csname PY@tok@sr\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
\expandafter\def\csname PY@tok@mo\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@kn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@mi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@gp\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\expandafter\def\csname PY@tok@o\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PY@tok@kr\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@s\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@kp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@w\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
\expandafter\def\csname PY@tok@kt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
\expandafter\def\csname PY@tok@ow\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
\expandafter\def\csname PY@tok@sb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
\expandafter\def\csname PY@tok@k\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
\expandafter\def\csname PY@tok@se\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
\expandafter\def\csname PY@tok@sd\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}

\def\PYZbs{\char`\\}
\def\PYZus{\char`\_}
\def\PYZob{\char`\{}
\def\PYZcb{\char`\}}
\def\PYZca{\char`\^}
\def\PYZam{\char`\&}
\def\PYZlt{\char`\<}
\def\PYZgt{\char`\>}
\def\PYZsh{\char`\#}
\def\PYZpc{\char`\%}
\def\PYZdl{\char`\$}
\def\PYZhy{\char`\-}
\def\PYZsq{\char`\'}
\def\PYZdq{\char`\"}
\def\PYZti{\char`\~}
% for compatibility with earlier versions
\def\PYZat{@}
\def\PYZlb{[}
\def\PYZrb{]}
\makeatother


    % Exact colors from NB
    \definecolor{incolor}{rgb}{0.0, 0.0, 0.5}
    \definecolor{outcolor}{rgb}{0.545, 0.0, 0.0}



    
    % Prevent overflowing lines due to hard-to-break entities
    \sloppy 
    % Setup hyperref package
    \hypersetup{
      breaklinks=true,  % so long urls are correctly broken across lines
      colorlinks=true,
      urlcolor=blue,
      linkcolor=darkorange,
      citecolor=darkgreen,
      }
    % Slightly bigger margins than the latex defaults
    
    \geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
    
    

    \begin{document}
    
    
    \maketitle
    
    

    

    \section{Introduction to the IPython notebook}



    \subsection{Basics}


    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  The notebook consists of individual cells
\item
  Each cell may contain code or text (amongst other options)
\item
  Text format can be
  \href{http://daringfireball.net/projects/markdown}{markdown}, HTML or
  LaTeX
\item
  Code cells are run using:
\item
  \textbf{shift + enter} will move to next cell
\item
  \textbf{ctrl + enter} will stay in the current cell
\item
  Markdown cells can be modified by double-clicking on them
\end{itemize}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}1}]:} \PY{l+s}{\PYZdq{}}\PY{l+s}{Hello IPython notebook!}\PY{l+s}{\PYZdq{}}
\end{Verbatim}

            \begin{Verbatim}[commandchars=\\\{\}]
{\color{outcolor}Out[{\color{outcolor}1}]:} 'Hello IPython notebook!'
\end{Verbatim}
        
    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}2}]:} \PY{c}{\PYZsh{} Only the last statement will be shown}
        \PY{n}{L} \PY{o}{=} \PY{p}{[}\PY{l+s}{\PYZsq{}}\PY{l+s}{red}\PY{l+s}{\PYZsq{}}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{blue}\PY{l+s}{\PYZsq{}}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{green}\PY{l+s}{\PYZsq{}}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{black}\PY{l+s}{\PYZsq{}}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{white}\PY{l+s}{\PYZsq{}}\PY{p}{]}
        \PY{n+nb}{type}\PY{p}{(}\PY{n}{L}\PY{p}{)}
        \PY{c}{\PYZsh{}sorted(L)  \PYZsh{} uncomment this line to show the sorted list instead of the type}
\end{Verbatim}

            \begin{Verbatim}[commandchars=\\\{\}]
{\color{outcolor}Out[{\color{outcolor}2}]:} list
\end{Verbatim}
        
    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}3}]:} \PY{c}{\PYZsh{} An example code cell using stuff from pylab}
        \PY{o}{\PYZpc{}}\PY{k}{matplotlib} \PY{n}{inline}
        \PY{k+kn}{from} \PY{n+nn}{matplotlib} \PY{k+kn}{import} \PY{o}{*}
        \PY{k+kn}{from} \PY{n+nn}{pylab} \PY{k+kn}{import} \PY{o}{*}
        \PY{k+kn}{from} \PY{n+nn}{numpy} \PY{k+kn}{import} \PY{o}{*}
        \PY{c}{\PYZsh{} numpy\PYZsq{}s linspace and pi}
        \PY{n}{x} \PY{o}{=} \PY{n}{np}\PY{o}{.}\PY{n}{linspace}\PY{p}{(}\PY{l+m+mi}{0}\PY{p}{,} \PY{l+m+mi}{3}\PY{o}{*}\PY{n}{pi}\PY{p}{,} \PY{l+m+mi}{500}\PY{p}{)}
        
        \PY{c}{\PYZsh{} matplotlib\PYZsq{}s plot and title}
        \PY{n}{plot}\PY{p}{(}\PY{n}{x}\PY{p}{,} \PY{n}{sin}\PY{p}{(}\PY{n}{x}\PY{o}{*}\PY{o}{*}\PY{l+m+mi}{2}\PY{p}{)}\PY{p}{)}
        \PY{n}{title}\PY{p}{(}\PY{l+s}{\PYZsq{}}\PY{l+s}{A simple chirp}\PY{l+s}{\PYZsq{}}\PY{p}{)}\PY{p}{;}
\end{Verbatim}

    \begin{center}
    \adjustimage{max size={0.9\linewidth}{0.9\paperheight}}{intro_ipython_files/intro_ipython_5_0.png}
    \end{center}
    { \hspace*{\fill} \\}
    
    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}4}]:} \PY{c}{\PYZsh{} Errors lead to detailed tracebacks}
        \PY{n}{x} \PY{o}{=} \PY{l+s}{\PYZdq{}}\PY{l+s}{Hello IPython!}\PY{l+s}{\PYZdq{}}
        
        \PY{n}{y} \PY{o}{=} \PY{l+m+mi}{42}
        
        \PY{n}{z} \PY{o}{=} \PY{n}{x} \PY{o}{+} \PY{n}{y}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]

        ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)

        <ipython-input-4-7c5427b1a943> in <module>()
          4 y = 42
          5 
    ----> 6 z = x + y
    

        TypeError: cannot concatenate 'str' and 'int' objects

    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}5}]:} \PY{c}{\PYZsh{} Echo the version of IPython}
        \PY{k+kn}{import} \PY{n+nn}{IPython}
        \PY{n}{IPython}\PY{o}{.}\PY{n}{\PYZus{}\PYZus{}version\PYZus{}\PYZus{}}
\end{Verbatim}

            \begin{Verbatim}[commandchars=\\\{\}]
{\color{outcolor}Out[{\color{outcolor}5}]:} '2.2.0'
\end{Verbatim}
        

    \subsubsection{Exercise}


    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Download the IPython notebook file
\item
  Execute \texttt{ipython notebook -\/-pylab=inline} to launch the
  notebook
\item
  Execute the cells in the above section using both \textbf{shift +
  enter} and \textbf{control + enter}
\item
  Make a tiny modification to one of the cells and execute it again
\end{itemize}


    \subsection{Navigation and cell manipulation}


    \begin{itemize}
\item
  You can:
\item
  Select/add/delete/move/insert cells
\item
  Using:
\item
  Menu
\item
  Toolbar
\item
  Keyboard shortcuts (via the Help menu)
\end{itemize}


    \subsubsection{Exercise}


    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Create a markdown cell, a header cell and a code cell
\item
  Move the cells around using Edit-\textgreater{} Move Cell
\item
  Cut and paste a cell to a different location
\item
  Use the menu, the toolbar and look at the keyboard shortcuts
\item
  Try \textbf{shift + enter} when on the last cell in the notebook. What
  happens?
\end{itemize}


    \subsection{Markdown Cells}


    Markdown basics: lists, markup and code

\begin{itemize}
\item
  list item
\item
  list item
\item
  nested list item
\item
  \emph{italics}
\item
  \textbf{bold}
\item
  \texttt{fixed\_font}
\end{itemize}

Code examples:

\begin{verbatim}
def hello_ipython():
    print "Hello IPython!"
\end{verbatim}

    Markdown cells can also contain HTML

Markdown basics: lists, markup and code

list item

list item

nested list item

italics

bold

fixed\_font

Code examples:

    Using math mode (anything between two \texttt{\$}s or two
\texttt{\$\$}s) is interpreted as \(LaTeX\) math:

\[ D_{KL}(P||Q) = \sum\limits_{i}ln (\frac{P(i)}{Q(i)}) P(i)\]


    \subsubsection{Exercises}


    \begin{itemize}
\item
  Modify or create a markdown cell and use:
\item
  Markdown
\item
  HTML
\item
  LateX math
\item
  Use either \texttt{\$} or \texttt{\$\$} for the math expressions. What
  is the difference?
\item
  Look at the
  \href{http://daringfireball.net/projects/markdown/syntax\#span}{markdown
  syntax page} (or this cell) to find out how to create hyperlinks
\end{itemize}


    \subsection{Help}


    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}6}]:} \PY{c}{\PYZsh{} Help on python objects using the \PYZsq{}?\PYZsq{}}
        \PY{k+kn}{import} \PY{n+nn}{IPython}
        \PY{n}{IPython}\PY{err}{?}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}7}]:} \PY{c}{\PYZsh{} Using the built\PYZhy{}in help}
        \PY{n}{help}\PY{p}{(}\PY{n}{IPython}\PY{p}{)}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
Help on package IPython:

NAME
    IPython - IPython: tools for interactive and parallel computing in Python.

FILE
    c:\textbackslash{}users\textbackslash{}elias\textbackslash{}anaconda\textbackslash{}lib\textbackslash{}site-packages\textbackslash{}ipython\textbackslash{}\_\_init\_\_.py

DESCRIPTION
    http://ipython.org

PACKAGE CONTENTS
    \_\_main\_\_
    config (package)
    consoleapp
    core (package)
    display
    extensions (package)
    external (package)
    frontend
    html (package)
    kernel (package)
    lib (package)
    nbconvert (package)
    nbformat (package)
    parallel (package)
    qt (package)
    sphinxext (package)
    terminal (package)
    testing (package)
    utils (package)

SUBMODULES
    release

FUNCTIONS
    embed\_kernel(module=None, local\_ns=None, **kwargs)
        Embed and start an IPython kernel in a given scope.
        
        If you don't want the kernel to initialize the namespace
        from the scope of the surrounding function,
        and/or you want to load full IPython configuration,
        you probably want `IPython.start\_kernel()` instead.
        
        Parameters
        ----------
        module : ModuleType, optional
            The module to load into IPython globals (default: caller)
        local\_ns : dict, optional
            The namespace to load into IPython user namespace (default: caller)
        
        kwargs : various, optional
            Further keyword args are relayed to the IPKernelApp constructor,
            allowing configuration of the Kernel.  Will only have an effect
            on the first embed\_kernel call for a given process.
    
    start\_ipython(argv=None, **kwargs)
        Launch a normal IPython instance (as opposed to embedded)
        
        `IPython.embed()` puts a shell in a particular calling scope,
        such as a function or method for debugging purposes,
        which is often not desirable.
        
        `start\_ipython()` does full, regular IPython initialization,
        including loading startup files, configuration, etc.
        much of which is skipped by `embed()`.
        
        This is a public API method, and will survive implementation changes.
        
        Parameters
        ----------
        
        argv : list or None, optional
            If unspecified or None, IPython will parse command-line options from sys.argv.
            To prevent any command-line parsing, pass an empty list: `argv=[]`.
        user\_ns : dict, optional
            specify this dictionary to initialize the IPython user namespace with particular values.
        kwargs : various, optional
            Any other kwargs will be passed to the Application constructor,
            such as `config`.
    
    start\_kernel(argv=None, **kwargs)
        Launch a normal IPython kernel instance (as opposed to embedded)
        
        `IPython.embed\_kernel()` puts a shell in a particular calling scope,
        such as a function or method for debugging purposes,
        which is often not desirable.
        
        `start\_kernel()` does full, regular IPython initialization,
        including loading startup files, configuration, etc.
        much of which is skipped by `embed()`.
        
        Parameters
        ----------
        
        argv : list or None, optional
            If unspecified or None, IPython will parse command-line options from sys.argv.
            To prevent any command-line parsing, pass an empty list: `argv=[]`.
        user\_ns : dict, optional
            specify this dictionary to initialize the IPython user namespace with particular values.
        kwargs : various, optional
            Any other kwargs will be passed to the Application constructor,
            such as `config`.

DATA
    \_\_author\_\_ = 'The IPython Development Team <ipython-dev@scipy.org>'
    \_\_license\_\_ = 'BSD'
    \_\_version\_\_ = '2.2.0'
    absolute\_import = \_Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0\ldots
    version\_info = (2, 2, 0, '')

VERSION
    2.2.0

AUTHOR
    The IPython Development Team <ipython-dev@scipy.org>
    \end{Verbatim}

    Double click on the divider to close the help console

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}8}]:} \PY{c}{\PYZsh{} Tab completion is available}
        \PY{n}{IPython}\PY{o}{.} \PY{c}{\PYZsh{} press TAB after the period}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]

          File "<ipython-input-8-5808c87fadd2>", line 2
        IPython. \# press TAB after the period
                                             \^{}
    SyntaxError: invalid syntax
    

    \end{Verbatim}

    The \emph{Help} menu item has links to IPython and the scientific
packages


    \subsection{Loading and Saving}


    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Dashboard shows all notebooks in the directory where it was started
  from
\item
  Use the dashboard to create new notebooks
\item
  Files saved as JSON with the \texttt{.ipynb} extension
\item
  Not meant for human consumption
\end{itemize}

    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Use File -\textgreater{} Print View for a version without the controls
\item
  Execute the cells who's output you want to show
\item
  Save to HTML or print to PDF
\end{itemize}

    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  When running from someone else's server, use File -\textgreater{}
  Download
\item
  Either as \texttt{*.ipynb} file
\item
  Or as \texttt{*.py} file with the markdown as comments
\item
  \href{http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html\#exporting-a-notebook-and-importing-existing-scripts}{\texttt{*.py}
  file can also be imported}
\end{itemize}

    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  There is also the online \href{http://nbviewer.ipython.org/}{nbviewer}
\item
  This can render a static version of a publicly available notebook.
\end{itemize}


    \subsubsection{Exercises}


    \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Create a new notebook from the dashboard
\item
  Look at a saved \texttt{*.ipynb} file. Can you decipher it at least
  somewhat.
\item
  Save the notebook as \texttt{*.py} file. What does this look like in
  the editor?
\item
  Find an IPython notebook online and try it with the nbviewer site.
\end{itemize}


    \subsection{Images and Video}


    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}9}]:} \PY{n}{cd}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
C:\textbackslash{}Users\textbackslash{}Elias
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}10}]:} \PY{k+kn}{from} \PY{n+nn}{IPython.display} \PY{k+kn}{import} \PY{n}{Image}
         
         \PY{n}{Image}\PY{p}{(}\PY{n}{filename}\PY{o}{=}\PY{l+s}{\PYZsq{}}\PY{l+s}{C:}\PY{l+s}{\PYZbs{}}\PY{l+s}{Users}\PY{l+s}{\PYZbs{}}\PY{l+s}{Elias}\PY{l+s}{\PYZbs{}}\PY{l+s}{SkyDrive}\PY{l+s}{\PYZbs{}}\PY{l+s}{PSE 2014}\PY{l+s}{\PYZbs{}}\PY{l+s}{Course resources}\PY{l+s}{\PYZbs{}}\PY{l+s}{python\PYZhy{}logo.png}\PY{l+s}{\PYZsq{}}\PY{p}{)}
\end{Verbatim}
\texttt{\color{outcolor}Out[{\color{outcolor}10}]:}
    
    \begin{center}
    \adjustimage{max size={0.9\linewidth}{0.9\paperheight}}{intro_ipython_files/intro_ipython_35_0.png}
    \end{center}
    { \hspace*{\fill} \\}
    

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}11}]:} \PY{k+kn}{from} \PY{n+nn}{IPython.display} \PY{k+kn}{import} \PY{n}{YouTubeVideo}
         
         \PY{n}{YouTubeVideo}\PY{p}{(}\PY{l+s}{\PYZsq{}}\PY{l+s}{F4rFuIb1Ie4}\PY{l+s}{\PYZsq{}}\PY{p}{)}
\end{Verbatim}

            \begin{Verbatim}[commandchars=\\\{\}]
{\color{outcolor}Out[{\color{outcolor}11}]:} <IPython.lib.display.YouTubeVideo at 0xa074390>
\end{Verbatim}
        
    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}12}]:} \PY{c}{\PYZsh{} Alternatively, load an image from a URL}
         \PY{n}{Image}\PY{p}{(}\PY{n}{url}\PY{o}{=}\PY{l+s}{\PYZsq{}}\PY{l+s}{http://octodex.github.com/images/pythocat.png}\PY{l+s}{\PYZsq{}}\PY{p}{)}
\end{Verbatim}

            \begin{Verbatim}[commandchars=\\\{\}]
{\color{outcolor}Out[{\color{outcolor}12}]:} <IPython.core.display.Image at 0xa159c50>
\end{Verbatim}
        
    \section{Go to your local directory that contains the json ipython
notebook
file}\label{go-to-your-local-directory-that-contains-the-json-ipython-notebook-file}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}13}]:} \PY{n}{cd} \PY{n}{C}\PY{p}{:}\PYZbs{}\PY{n}{Users}\PYZbs{}\PY{n}{Elias}\PYZbs{}\PY{n}{SkyDrive}\PYZbs{}\PY{n}{PSE} \PY{l+m+mi}{2014}\PYZbs{}\PY{n}{Lectures}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
C:\textbackslash{}Users\textbackslash{}Elias\textbackslash{}SkyDrive\textbackslash{}PSE 2014\textbackslash{}Lectures
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}14}]:} \PY{n}{ls}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
Volume in drive C is Windows8\_OS
 Volume Serial Number is 0E7D-FE42

 Directory of C:\textbackslash{}Users\textbackslash{}Elias\textbackslash{}SkyDrive\textbackslash{}PSE 2014\textbackslash{}Lectures

09/16/2014  02:05 PM    <DIR>          .
09/16/2014  02:05 PM    <DIR>          ..
09/14/2014  04:20 PM            24,457 05\_Animations.ipynb
09/16/2014  02:05 PM    <DIR>          animation
09/12/2014  08:44 AM           373,309 brief\_tutorial.ipynb
09/14/2014  04:04 PM        13,017,967 ffmpeg-20140913-git-bcac0f4-win64-static.7z
09/16/2014  01:52 PM           174,215 Introduction to ipython notebook.ipynb
09/16/2014  01:36 PM           113,791 Introduction to ipython notebook.pdf
09/14/2014  10:25 AM    <DIR>          jrjohansson scientific-python-lectures ú GitHub\_files
09/14/2014  08:31 AM            26,086 Lecture-0-Scientific-Computing-with-Python.ipynb
09/06/2014  09:55 AM    <DIR>          PHY 683  Python for Scientific Computing\_files
09/12/2014  08:17 AM           118,320 Python Scientific Lecture Notes - Scipy lecture notes.htm
09/12/2014  08:17 AM    <DIR>          Python Scientific Lecture Notes - Scipy lecture notes\_files
09/14/2014  02:53 PM    <DIR>          python tutorial
09/14/2014  02:54 PM    <DIR>          Python tutorial\_files
09/16/2014  02:37 PM            26,661 Scientific-Computing-with-Python.ipynb
09/16/2014  12:47 PM         1,390,647 Scientific-Computing-with-Python.pdf
09/16/2014  12:36 PM            26,086 Scientific-Computing-with-Python.txt
09/16/2014  12:39 PM            26,661 Scientific-Computing-with-Python.txt.ipynb
09/06/2014  09:54 AM    <DIR>          scientific-python-lectures
              11 File(s)     15,318,200 bytes
               9 Dir(s)  146,233,638,912 bytes free
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}15}]:} \PY{c}{\PYZsh{} Convert the ipython notebook file in json format to ipython format}
         \PY{k+kn}{import} \PY{n+nn}{IPython.nbformat.current} \PY{k+kn}{as} \PY{n+nn}{nbf}
         \PY{n}{nb} \PY{o}{=} \PY{n}{nbf}\PY{o}{.}\PY{n}{read}\PY{p}{(}\PY{n+nb}{open}\PY{p}{(}\PY{l+s}{\PYZsq{}}\PY{l+s}{Scientific\PYZhy{}Computing\PYZhy{}with\PYZhy{}Python.txt}\PY{l+s}{\PYZsq{}}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{r}\PY{l+s}{\PYZsq{}}\PY{p}{)}\PY{p}{,}\PY{l+s}{\PYZsq{}}\PY{l+s}{json}\PY{l+s}{\PYZsq{}}\PY{p}{)}
         \PY{n}{nbf}\PY{o}{.}\PY{n}{write}\PY{p}{(}\PY{n}{nb}\PY{p}{,} \PY{n+nb}{open}\PY{p}{(}\PY{l+s}{\PYZsq{}}\PY{l+s}{Scientific\PYZhy{}Computing\PYZhy{}with\PYZhy{}Python.ipynb}\PY{l+s}{\PYZsq{}}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{w}\PY{l+s}{\PYZsq{}}\PY{p}{)}\PY{p}{,} \PY{l+s}{\PYZsq{}}\PY{l+s}{ipynb}\PY{l+s}{\PYZsq{}}\PY{p}{)}
\end{Verbatim}

    \subsubsection{Convert this notebook to scipt
(name.py)}\label{convert-this-notebook-to-scipt-name.py}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}16}]:} \PY{o}{!}ipython nbconvert \PYZhy{}\PYZhy{}to\PY{o}{=}python intro\PYZus{}ipython.ipynb
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
This application is used to convert notebook files (*.ipynb) to various other
formats.

WARNING: THE COMMANDLINE INTERFACE MAY CHANGE IN FUTURE RELEASES.

Options

-------



Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.


--debug

    set log level to logging.DEBUG (maximize logging output)

--init

    Initialize profile with default config files.  This is equivalent
    to running `ipython profile create <profile>` prior to startup.

--quiet

    set log level to logging.CRITICAL (minimize logging output)

--stdout

    Write notebook output to stdout instead of files.
--profile=<Unicode> (BaseIPythonApplication.profile)

    Default: u'default'

    The IPython profile to use.

--reveal-prefix=<Unicode> (RevealHelpPreprocessor.url\_prefix)

    Default: 'reveal.js'

    The URL prefix for reveal.js. This can be a a relative URL for a local copy

    of reveal.js, or point to a CDN.

    For speaker notes to work, a local reveal.js prefix must be used.

--ipython-dir=<Unicode> (BaseIPythonApplication.ipython\_dir)

    Default: u''

    The name of the IPython directory. This directory is used for logging

    configuration (through profiles), history storage, etc. The default is

    usually \$HOME/.ipython. This options can also be specified through the

    environment variable IPYTHONDIR.

--writer=<DottedObjectName> (NbConvertApp.writer\_class)

    Default: 'FilesWriter'

    Writer class used to write the  results of the conversion

--log-level=<Enum> (Application.log\_level)

    Default: 30

    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')

    Set the log level by value or name.

--to=<CaselessStrEnum> (NbConvertApp.export\_format)

    Default: 'html'

    Choices: ['custom', 'html', 'latex', 'markdown', 'python', 'rst', 'slides']

    The export format to be used.

--template=<Unicode> (TemplateExporter.template\_file)

    Default: u'default'

    Name of the template file to use

--output=<Unicode> (NbConvertApp.output\_base)

    Default: ''

    overwrite base name use for output files. can only  be use when converting

    one notebook at a time.

--post=<DottedOrNone> (NbConvertApp.postprocessor\_class)

    Default: u''

    PostProcessor class used to write the  results of the conversion

--config=<Unicode> (BaseIPythonApplication.extra\_config\_file)

    Default: u''

    Path to an extra config file to load.

    If specified, load this config file in addition to any other IPython config.

--profile-dir=<Unicode> (ProfileDir.location)

    Default: u''

    Set the profile location directly. This overrides the logic used by the

    `profile` option.

To see all available configurables, use `--help-all`

Examples
--------

    The simplest way to use nbconvert is
    
    > ipython nbconvert mynotebook.ipynb
    
    which will convert mynotebook.ipynb to the default format (probably HTML).
    
    You can specify the export format with `--to`.
    Options include ['custom', 'html', 'latex', 'markdown', 'python', 'rst', 'slides']
    
    > ipython nbconvert --to latex mynotebook.ipynb
    
    Both HTML and LaTeX support multiple output templates. LaTeX includes
    'base', 'article' and 'report'.  HTML includes 'basic' and 'full'. You
    can specify the flavor of the format used.
    
    > ipython nbconvert --to html --template basic mynotebook.ipynb
    
    You can also pipe the output to stdout, rather than a file
    
    > ipython nbconvert mynotebook.ipynb --stdout
    
    A post-processor can be used to compile a PDF
    
    > ipython nbconvert mynotebook.ipynb --to latex --post PDF
    
    You can get (and serve) a Reveal.js-powered slideshow
    
    > ipython nbconvert myslides.ipynb --to slides --post serve
    
    Multiple notebooks can be given at the command line in a couple of 
    different ways:
    
    > ipython nbconvert notebook*.ipynb
    > ipython nbconvert notebook1.ipynb notebook2.ipynb
    
    or you can specify the notebooks list in a config file, containing::
    
        c.NbConvertApp.notebooks = ["my\_notebook.ipynb"]
    
    > ipython nbconvert --config mycfg.py
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
[NbConvertApp] Using existing profile dir: u'C:\textbackslash{}\textbackslash{}Users\textbackslash{}\textbackslash{}Elias\textbackslash{}\textbackslash{}.ipython\textbackslash{}\textbackslash{}profile\_default'
[NbConvertApp] WARNING | pattern u'intro\_ipython.ipynb' matched no files
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}17}]:} \PY{n}{cd} \PY{n}{C}\PY{p}{:}\PYZbs{}\PY{n}{Users}\PYZbs{}\PY{n}{Elias}\PYZbs{}\PY{n}{Documents}\PYZbs{}\PY{n}{IPython} \PY{n}{Notebooks}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
C:\textbackslash{}Users\textbackslash{}Elias\textbackslash{}Documents\textbackslash{}IPython Notebooks
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}18}]:} \PY{n}{ls}
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
Volume in drive C is Windows8\_OS
 Volume Serial Number is 0E7D-FE42

 Directory of C:\textbackslash{}Users\textbackslash{}Elias\textbackslash{}Documents\textbackslash{}IPython Notebooks

09/16/2014  02:59 PM    <DIR>          .
09/16/2014  02:59 PM    <DIR>          ..
09/16/2014  02:29 PM    <DIR>          .ipynb\_checkpoints
09/15/2014  07:56 PM            22,770 05\_Animations.ipynb
09/11/2014  08:37 AM            21,286 A1. Linear Regression - Overview.ipynb
09/15/2014  06:23 PM           650,537 animation.mp4
09/15/2014  08:24 AM         1,342,924 animation\_JSAnimation.ipynb
09/15/2014  08:43 PM            19,093 AnimationEmbedding\_notworking.ipynb
09/15/2014  07:52 PM           395,864 basic\_animation.mp4
09/16/2014  12:32 PM           373,309 brief\_tutorial.ipynb
09/13/2014  06:13 PM            14,361 converting\_ipython\_python.ipynb
09/15/2014  07:42 PM            89,406 DD0043\_Slice\_x\_density.png
09/15/2014  08:48 PM            12,732 embedded\_webm\_animation\_notworking.ipynb
09/14/2014  08:24 PM            17,883 example\_embeded\_animation.ipynb
09/14/2014  06:03 PM    <DIR>          ffmpeg-20140913-git-bcac0f4-win64-static
09/15/2014  06:22 PM            31,960 filename.png
09/15/2014  06:17 PM            15,787 filename.svg
09/12/2014  08:42 AM           388,023 gistfile1.ipynb
09/12/2014  08:46 AM           373,309 gistfile1-Copy0.ipynb
09/10/2014  10:06 PM            90,718 Graphing.ipynb
09/16/2014  03:00 PM           165,495 intro\_ipython.ipynb
09/16/2014  02:35 PM             5,944 intro\_ipython.py
09/16/2014  02:56 PM            46,778 intro\_ipython.tex
09/16/2014  02:56 PM    <DIR>          intro\_ipython\_files
09/16/2014  01:52 PM           174,215 Introduction to ipython notebook.ipynb
09/16/2014  12:33 PM            26,661 Lecture-0-Scientific-Computing-with-Python.ipynb
09/15/2014  06:25 PM         1,649,156 Lecture-4-Matplotlib.ipynb
09/15/2014  06:20 PM         2,173,575 Lecture-4-Matplotlib-checkpoint.ipynb
09/15/2014  07:54 PM                 0 lorenz\_attractor.mp4
09/06/2014  10:30 AM            40,196 optimization.ipynb
09/15/2014  05:11 PM         2,128,777 Plotting in the notebook.ipynb
09/13/2014  06:20 PM            29,932 recursive\_bisection\_fmin\_bfgs.ipynb
09/13/2014  06:20 PM             1,392 recursive\_bisection\_fmin\_bfgs.py
09/15/2014  08:30 AM        13,677,056 run\_examples.ipynb
09/16/2014  12:40 PM            26,661 Scientific\_Computing\_with\_Python.ipynb
09/15/2014  07:42 PM         2,741,222 Simple\_Visualization.ipynb
09/15/2014  04:23 PM         5,118,890 stegotons.ipynb
09/14/2014  08:20 PM           133,121 test.mp4
09/15/2014  06:23 PM            16,687 test.svg
09/16/2014  01:31 PM             3,628 very\_important\_jason\_to.ipython.ipynb
              35 File(s)     32,019,348 bytes
               5 Dir(s)  146,233,446,400 bytes free
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}1}]:} \PY{o}{!}ipython nbconvert  intro\PYZus{}ipython.ipynb \PYZhy{}\PYZhy{}to latex
\end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
[NbConvertApp] Using existing profile dir: u'C:\textbackslash{}\textbackslash{}Users\textbackslash{}\textbackslash{}Elias\textbackslash{}\textbackslash{}.ipython\textbackslash{}\textbackslash{}profile\_default'
[NbConvertApp] Converting notebook intro\_ipython.ipynb to latex
[NbConvertApp] Support files will be in intro\_ipython\_files\textbackslash{}
[NbConvertApp] Loaded template article.tplx
[NbConvertApp] Writing 38780 bytes to intro\_ipython.tex
    \end{Verbatim}

    \begin{Verbatim}[commandchars=\\\{\}]
{\color{incolor}In [{\color{incolor}}]:} \PY{o}{!}ipython nbconvert  intro\PYZus{}ipython.ipynb \PYZhy{}\PYZhy{}to latex \PYZhy{}\PYZhy{}post pdf
\end{Verbatim}


    % Add a bibliography block to the postdoc
    
    
    
    \end{document}
