# HG changeset patch # User Puneeth Chaganti # Date 1257434236 -19800 # Node ID 9bed85f05eb8fc4d310f3401016d3d6905f4d8e0 # Parent e7ce6f9d7e1549774dbe569fb639e3197a680f15 Added save command in session1. diff -r e7ce6f9d7e15 -r 9bed85f05eb8 day1/session1.tex --- a/day1/session1.tex Thu Nov 05 14:56:52 2009 +0530 +++ b/day1/session1.tex Thu Nov 05 20:47:16 2009 +0530 @@ -473,6 +473,20 @@ \end{lstlisting} \end{frame} +\begin{frame}[fragile] +\frametitle{Saving Commands} +Save commands of review problem into file +\begin{itemize} +\item Use \typ{\%hist} command of IPython +\item Identify the required line numbers +\item Then, use \typ{\%save} command of IPython +\end{itemize} +\begin{lstlisting} + In []: %hist + In []: %save four_plot.py 16 18-27 +\end{lstlisting} +\end{frame} + \begin{frame} \frametitle{What did we learn?} \begin{itemize} @@ -481,10 +495,6 @@ \item Annotating plots. \item Changing the looks: size, linewidth \end{itemize} - \begin{block}{Note} - \centerline{\alert{Don't Close \typ{IPython}}} - \end{block} -%%\inctime{10} \end{frame} \end{document} diff -r e7ce6f9d7e15 -r 9bed85f05eb8 day1/session2.tex --- a/day1/session2.tex Thu Nov 05 14:56:52 2009 +0530 +++ b/day1/session2.tex Thu Nov 05 20:47:16 2009 +0530 @@ -78,7 +78,7 @@ \author[FOSSEE] {FOSSEE} \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} -\date[] {31, October 2009\\Day 1, Session 2} +\date[] {31 October, 2009\\Day 1, Session 2} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} @@ -123,46 +123,13 @@ % You might wish to add the option [pausesections] \end{frame} -\begin{frame} -\frametitle{Why we didn't close IPython?} - IPython provides a convenient feature to go back, edit, and re-run commands.\\ - \alert{But when you close, all this is lost.} -\end{frame} +\section{Scripts} -\begin{frame} -\frametitle{But its impractical..} -\begin{itemize} - \item We can't keep running IPython for days - \item And its a pain to go back and edit -\end{itemize} -And the solution is..\\ -\begin{center} -\alert {\typ{Scripts!!}} -\end{center} -\end{frame} - -\section{Scripts} \begin{frame}[fragile] \frametitle{Python Scripts} -\begin{itemize} -\item Put commands used in review problem into file. -\item use hist command of IPython. -\end{itemize} -\begin{lstlisting} - In []: %hist - In []: %hist -n -\end{lstlisting} -\end{frame} - -\begin{frame} -\frametitle{Python Scripts\ldots} \begin{itemize} - \item Open a new file in an \alert{editor} - \item Copy and paste from the output of \typ{\%hist -n} - \item Save the file as \typ{sine_plot.py} - \end{itemize} - \begin{itemize} - \item run the file in IPython using \typ{\%run -i sine_plot.py}\\ + \item four\_plot.py is called a Python Script + \item run the file in IPython using \typ{\%run -i four_plot.py} \end{itemize} \end{frame} diff -r e7ce6f9d7e15 -r 9bed85f05eb8 day1/session6.tex --- a/day1/session6.tex Thu Nov 05 14:56:52 2009 +0530 +++ b/day1/session6.tex Thu Nov 05 20:47:16 2009 +0530 @@ -347,7 +347,7 @@ \begin{lstlisting} In []: def pend_int(initial, t): .... theta, omega = initial - .... g, L = -9.81, 0.2 + .... g, L = 9.81, 0.2 .... f=[omega, -(g/L)*sin(theta)] .... return f ....