Added save command in session1.
authorPuneeth Chaganti <punchagan@fossee.in>
Thu, 05 Nov 2009 20:47:16 +0530
changeset 280 9bed85f05eb8
parent 279 e7ce6f9d7e15
child 281 ce818f645f6b
Added save command in session1.
day1/session1.tex
day1/session2.tex
day1/session6.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}
--- 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}
 
--- 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
   ....