75 \title[Tricks of the trade]{Python for Science and Engg: Tricks of the trade} |
75 \title[Tricks of the trade]{Python for Science and Engg: Tricks of the trade} |
76 |
76 |
77 \author[FOSSEE] {FOSSEE} |
77 \author[FOSSEE] {FOSSEE} |
78 |
78 |
79 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
79 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
80 \date[] {28 January, 2010\\Day 1, Introduction} |
80 \date[] {28 January, 2010\\Day 1, Tricks of the Trade} |
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
82 |
82 |
83 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
83 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo} |
84 %\logo{\pgfuseimage{iitmlogo}} |
84 %\logo{\pgfuseimage{iitmlogo}} |
85 |
85 |
123 %% \end{frame} |
123 %% \end{frame} |
124 |
124 |
125 \begin{frame} |
125 \begin{frame} |
126 \frametitle{Workshop Schedule: Day 1} |
126 \frametitle{Workshop Schedule: Day 1} |
127 \begin{description} |
127 \begin{description} |
128 \item[Session 1] Mon 09:00--10:00 |
128 \item[Tricks of the trade] Thu 09:00--09:30 |
129 \item[Session 2] Mon 10:05--11:05 |
129 \item[Session 1] Thu 09:30--10:30 |
130 \item[Session 3] Mon 11:20--12:20 |
130 \item[Session 2] Thu 10:45--11:45 |
131 \item[Session 4] Mon 12:25--13:25 |
131 \item[Session 3] Thu 11:50--12:30 |
132 \item[Quiz 1] Mon 14:25--14:40 |
132 \item[Session 4] Thu 12:30--1:30 |
133 \item[Exercises] Mon 14:40--15:25 |
133 \item[Quiz 1] Thu 14:30--14:45 |
134 \item[Session 5] Mon 15:40--16:40 |
134 \item[Exercises] Thu 14:45--15:30 |
135 \item[Quiz 2] Mon 16:45--17:00 |
135 \item[Session 5] Thu 15:45--16:45 |
|
136 \item[Quiz 2] Thu 16:50--17:05 |
136 \end{description} |
137 \end{description} |
137 \end{frame} |
138 \end{frame} |
138 |
139 |
139 \begin{frame} |
140 \begin{frame} |
140 \frametitle{Workshop Schedule: Day 2} |
141 \frametitle{Workshop Schedule: Day 2} |
141 \begin{description} |
142 \begin{description} |
142 \item[Session 1] Tue 09:00--10:00 |
143 \item[Session 1] Fri 09:00--10:00 |
143 \item[Session 2] Tue 10:05--11:05 |
144 \item[Session 2] Fri 10:05--11:05 |
144 \item[Session 3] Tue 11:20--12:20 |
145 \item[Session 3] Fri 11:20--12:20 |
145 \item[Session 4] Tue 12:25--13:25 |
146 \item[Session 4] Fri 12:25--13:25 |
146 \item[Quiz 1] Tue 14:25--14:40 |
147 \item[Quiz 1] Fri 14:25--14:40 |
147 \item[Exercises] Tue 14:40--15:25 |
148 \item[Exercises] Fri 14:40--15:25 |
148 \item[Session 5] Tue 15:40--16:40 |
149 \item[Session 5] Fri 15:40--16:40 |
149 \item[Quiz 2] Tue 16:45--17:00 |
150 \item[Quiz 2] Fri 16:45--17:00 |
150 \end{description} |
151 \end{description} |
151 \end{frame} |
152 \end{frame} |
152 |
153 |
153 \section{Checklist} |
154 \section{Checklist} |
154 \begin{frame} |
155 \begin{frame} |
188 \begin{lstlisting} |
189 \begin{lstlisting} |
189 In []: print "Hello, World!" |
190 In []: print "Hello, World!" |
190 Hello, World! |
191 Hello, World! |
191 \end{lstlisting} |
192 \end{lstlisting} |
192 Exiting |
193 Exiting |
193 \begin{lstlisting} |
194 \begin{lstlisting} |
194 In []: ^D(Ctrl-D) |
195 In []: ^D(Ctrl-D) |
195 Do you really want to exit([y]/n)? y |
196 Do you really want to exit([y]/n)? y |
196 \end{lstlisting} |
197 \end{lstlisting} |
197 \end{frame} |
198 \end{frame} |
198 |
199 |
199 \section{Loops - Indentation and Breaking out of loops} |
200 \section{Loops} |
200 \begin{frame}[fragile] |
201 \begin{frame}[fragile] |
201 \frametitle{Loops} |
202 \frametitle{Loops} |
202 Breaking out of loops |
203 Breaking out of loops |
203 \begin{lstlisting} |
204 \begin{lstlisting} |
204 In []: while True: |
205 In []: while True: |
206 ...: |
207 ...: |
207 Hello, World! |
208 Hello, World! |
208 Hello, World!^C(Ctrl-C) |
209 Hello, World!^C(Ctrl-C) |
209 ------------------------------------ |
210 ------------------------------------ |
210 KeyboardInterrupt |
211 KeyboardInterrupt |
211 |
|
212 \end{lstlisting} |
212 \end{lstlisting} |
213 \emphbar{\alert{Indentation: Notice the 4 spaces before\\} \typ{print "Hello, World!"}} |
213 \end{frame} |
|
214 |
|
215 \section{Indentation} |
|
216 \begin{frame}[fragile] |
|
217 \frametitle{Indentation} |
|
218 \begin{lstlisting} |
|
219 In []: while True: |
|
220 ...: print "Hello, World!" |
|
221 ...: |
|
222 \end{lstlisting} |
|
223 \emphbar{\alert{Indentation: Notice the 4 spaces before\\} \typ{print "Hello, World!"}\\ |
|
224 Hit the ``ENTER'' key twice to return to the previous indentation level} |
|
225 \end{frame} |
|
226 |
|
227 \section{Tab completion} |
|
228 \begin{frame}[fragile] |
|
229 \frametitle{Tab completion} |
|
230 Type \typ{pri} and hit the Tab key |
|
231 \begin{lstlisting} |
|
232 In []: pri <Tab> |
|
233 In []: print |
|
234 \end{lstlisting} |
|
235 Type \typ{whi} and hit the Tab key |
|
236 \begin{lstlisting} |
|
237 In []: whi <Tab> |
|
238 In []: while |
|
239 \end{lstlisting} |
|
240 \end{frame} |
|
241 |
|
242 \section{Tab Suggestion} |
|
243 \begin{frame}[fragile] |
|
244 \frametitle{Tab suggestion} |
|
245 |
214 \end{frame} |
246 \end{frame} |
215 |
247 |
216 \section{Saving Commands} |
248 \section{Saving Commands} |
217 \begin{frame}[fragile] |
249 \begin{frame}[fragile] |
218 \frametitle{History and Saving of Commands} |
250 \frametitle{History and Saving of Commands} |
239 |
271 |
240 \section{Scite - How to} |
272 \section{Scite - How to} |
241 \begin{frame}[fragile] |
273 \begin{frame}[fragile] |
242 \frametitle{Scite - How to \ldots} |
274 \frametitle{Scite - How to \ldots} |
243 \begin{itemize} |
275 \begin{itemize} |
244 \item Opening scite - run scite from command line |
276 \item Opening scite |
|
277 \begin{itemize} |
|
278 \item GNU/Linux: Applications $\rightarrow$ Programming $\rightarrow$ SciTE Text Editor |
|
279 \item Windows: Double click on Desktop icon |
|
280 \end{itemize} |
245 \item Type the contents |
281 \item Type the contents |
246 \item Saving the file with a filename \alert{File $\rightarrow$ Save as} |
282 \item Saving the file with a filename \alert{File $\rightarrow$ Save as} |
247 \item Exiting the editor \alert{File $\rightarrow$ Exit} |
283 \item Exiting the editor \alert{File $\rightarrow$ Exit} |
248 \item To open an existing file: \alert{File $\rightarrow$ Open} |
284 \item To open an existing file: \alert{File $\rightarrow$ Open} |
249 \end{itemize} |
285 \end{itemize} |