forked from pmediano/ComputationalNeurodynamics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPythonTutorial.tex
More file actions
689 lines (534 loc) · 16.8 KB
/
PythonTutorial.tex
File metadata and controls
689 lines (534 loc) · 16.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
\documentclass[xcolor=x11names, compress]{beamer}
%% General document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx}
\graphicspath{{./img/}}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning, arrows}
\usetikzlibrary{decorations.fractals}
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{units}
\usepgfplotslibrary{external}
\usetikzlibrary{pgfplots.external}
% \tikzset{external/system call={latex \tikzexternalcheckshellescape
% -interaction=batchmode -jobname "\image" "\texsource";
% dvips -o "\image".ps "\image".dvi;
% ps2eps "\image.ps"}}
% \tikzset{external/force remake}
\tikzexternalize[prefix=tikz/external/]
\usepackage{filemod}
\newcommand{\includetikz}[2]{%
\tikzsetnextfilename{#2}%
\filemodCmp{#1#2.tikz}{#1external/#2.pdf}%
{\tikzset{external/remake next}}{}%
\input{#1#2.tikz}%
}
\pgfplotsset{
/pgfplots/scatter legend/.style={
/pgfplots/legend image code/.code={\draw[##1,yshift=-0.1em] plot coordinates {
(-0.1em, 0.1em)
(0.2em, 0.45em)
(0.3em, -0.05em)
(0.6em, 0.3em)
};},
rounded corners=1.5pt,
},
}
\usepackage{filecontents, anyfontsize, textcomp, siunitx}
\usepackage[super]{nth}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Beamer Layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\useoutertheme[subsection=false,shadow]{miniframes}
\useoutertheme[subsection=false,shadow]{miniframes}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\slideentry}
{\advance\beamer@xpos by1\relax}{}{}{}
\def\beamer@subsectionentry#1#2#3#4#5{\advance\beamer@xpos by1\relax}
\makeatother
%\setbeamertemplate{footline}{%
%\begin{beamercolorbox}{section in head/foot}
% \color{gray}\vskip2pt~ \insertsection\hfill\insertpagenumber{} %
% / \insertpresentationendpage{} ~\vskip2pt
%\end{beamercolorbox}
%}
\setbeamertemplate{footline}{%
\begin{beamercolorbox}{0}
\color{black}\vskip2pt~ \hfill\insertframenumber{} \hspace{10pt} \vspace{3pt} ~\vskip2pt
\end{beamercolorbox}
}
\setbeamertemplate{navigation symbols}{}
\useinnertheme{default}
\usefonttheme{structuresmallcapsserif} % could be default, serif, structurebold, professionalfonts, structureitalicserif or structuresmallcapsserif
\usepackage{palatino}
\setbeamerfont{title like}{shape=\scshape}
\setbeamerfont{frametitle}{shape=\scshape}
\setbeamercolor*{lower separation line head}{bg=DeepSkyBlue4}
\setbeamercolor*{normal text}{fg=black,bg=white}
\setbeamercolor*{alerted text}{fg=red}
\setbeamercolor*{example text}{fg=black}
\setbeamercolor*{structure}{fg=black}
\setbeamercolor*{palette tertiary}{fg=black,bg=black!10}
\setbeamercolor*{palette quaternary}{fg=black,bg=black!10}
\renewcommand{\(}{\begin{columns}}
\renewcommand{\)}{\end{columns}}
\newcommand{\<}[1]{\begin{column}{#1}}
\renewcommand{\>}{\end{column}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginSection[]
{
{
\tikzexternaldisable
\setbeamertemplate{footline}{}
\begin{frame}[noframenumbering]{}
\vfill
\begin{center}
\rmfamily \LARGE \insertsection
\end{center}
\begin{tikzpicture}[scale=0.1]
% finalsectionnumber * delta = 115
\pgfmathsetmacro\res{\insertsectionnumber * 28.75}
\fill [lightgray] (9cm,0cm) rectangle (115cm,1cm);
\fill [black] (9cm, 0cm) rectangle (\res cm,1cm);
\end{tikzpicture}
\vfill
\end{frame}
\tikzexternalenable
}
}
\definecolor{lightgray}{gray}{0.75}
\definecolor{darkgreen}{RGB}{50,200,10}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
\newcommand{\ver}[1]{\texttt{\textbf{#1}}}
\everymath{\displaystyle}
\newcommand{\btVFill}{\vskip0pt plus 1filll}
\DeclareSIUnit\nat{nat}
\usepackage{listings}
% \lstset{
% language=Python,
% showstringspaces=false,
% formfeed=newpage,
% tabsize=4,
% commentstyle=itshape,
% morekeywords={models, lambda, forms}
% }
% \definecolor{keywords}{RGB}{255,0,90}
% \definecolor{comments}{RGB}{0,0,113}
% \definecolor{red}{RGB}{160,0,0}
% \definecolor{green}{RGB}{0,150,0}
% \lstset{language=Python,
% basicstyle=\ttfamily\small,
% keywordstyle=\color{keywords},
% commentstyle=\color{comments},
% stringstyle=\color{red},
% showstringspaces=false,
% identifierstyle=\color{green},
% tabsize=4,
% procnamekeys={def,class},
% morekeywords={models, lambda, forms}
% }
\usepackage{setspace}
\definecolor{Code}{rgb}{0,0,0}
\definecolor{Decorators}{rgb}{0.5,0.5,0.5}
\definecolor{Numbers}{rgb}{0.5,0,0}
\definecolor{MatchingBrackets}{rgb}{0.25,0.5,0.5}
\definecolor{Keywords}{rgb}{0,0,1}
\definecolor{self}{rgb}{0,0,0}
\definecolor{Strings}{rgb}{0,0.63,0}
\definecolor{Comments}{rgb}{0,0.63,1}
\definecolor{Backquotes}{rgb}{0,0,0}
\definecolor{Classname}{rgb}{0,0,0}
\definecolor{FunctionName}{rgb}{0,0,0}
\definecolor{Operators}{rgb}{0,0,0}
\definecolor{Background}{rgb}{0.98,0.98,0.98}
\lstnewenvironment{python}[1][]{
\lstset{
% numbers=left,
% numberstyle=\footnotesize,
% numbersep=1em,
xleftmargin=1em,
framextopmargin=2em,
framexbottommargin=2em,
showspaces=false,
showtabs=false,
showstringspaces=false,
% frame=l,
% tabsize=4,
tabsize=2,
% Basic
basicstyle=\ttfamily\small\setstretch{1},
backgroundcolor=\color{Background},
language=Python,
% Comments
commentstyle=\color{Comments}\slshape,
% Strings
stringstyle=\color{Strings},
morecomment=[s][\color{Strings}]{"""}{"""},
morecomment=[s][\color{Strings}]{'''}{'''},
% keywords
morekeywords={import,from,class,def,for,while,if,is,in,elif,else,not,and,or,print,break,continue,return,True,False,None,access,as,,del,except,exec,finally,global,import,lambda,pass,print,raise,try,assert},
keywordstyle={\color{Keywords}\bfseries},
% additional keywords
morekeywords={[2]@invariant},
keywordstyle={[2]\color{Decorators}\slshape},
emph={self},
emphstyle={\color{self}\slshape},
%
}}{}
\usepackage{minted}
\usemintedstyle{pastie}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[plain]
\title{ {\fontsize{14}{1}\selectfont \bfseries Basic Python Tutorial} \\ \vspace{-3pt} {\fontsize{10}{1}\selectfont For Computational Neurodynamics Students} \\ }
\subtitle{ ~ }
\date{}
\vspace{5pt}
\titlepage
\vfill
\begin{center}
% {
% \tikzexternaldisable
% \begin{tikzpicture}
% \tikzstyle{inhib}=[-*, semithick, opacity=0.8, black!20!blue]
% \tikzstyle{excit}=[-stealth', shorten >=1pt, opacity=0.8, semithick, black!20!blue]
% \tikzstyle{synap}=[-stealth', gray!90!white, dashed]
% \def\neuronR{1.6cm};
% \def\netR{3cm}
%
% % \node[circle, fill=purple!50!black, opacity=0.2, minimum size=1.7*\neuronR] (INC) at (0:0cm) {};
% \node[circle, thick, fill=blue!50!green] (titleInhib) at (0,0) {};
%
% \node[circle, fill=blue!60!green, opacity=0.4, minimum size=\neuronR] (titleExcit) at (2,0) {};
% \draw[inhib] (titleInhib) -- (titleExcit);
%
% \path[excit, bend left] (titleExcit) edge (titleInhib);
%
% \end{tikzpicture}
%
% \tikzexternalenable
% }
~ \\
\vfill
{\large Pedro Mediano \hspace{30pt} Marta Garnelo}\\ \vspace{-8pt}
{\includegraphics[width=0.7\textwidth]{logo3.png}}\\ \vspace{-10pt}
\ver{pmediano@ic.ac.uk} \hspace{20pt} \ver{garnelo@ic.ac.uk}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{ \scshape Introduction}
\subsection{Introduction}
\begin{frame}{}
\large
Completely legitimate question:
\vfill
\pause
\begin{itemize}
\item \textbf{\Large Why are we using Python?}
\end{itemize}
\vfill
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Reasons to move to Python}
(Or at least our reasons to do it)
\begin{itemize}
\Large
\newcommand{\myitem}{\vfill \pause \item[{\color{darkgreen}\checkmark}]}
\myitem It's free software.
\myitem We know Python better than Matlab.
\myitem We're making the code better.
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\scshape Python basics}
\subsection{The import system}
\begin{frame}[fragile]{Python basics}
\textbf{The import system}
\begin{itemize}
\item Often the definitions (e.g. functions) we want to use might be stored in a different script, i.e. another \textit{module}.
\item In order to use definitions from other modules we need to import these modules at the beginning of our script.
\item This is done via the \textit{import} command:
\mint{python}@ import numpy@
\mint{python}@ import numpy as np@
\begin{minted}{python}
from scipy import *
from matplotlib import pyplot
\end{minted}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{\scshape Classes}
\begin{frame}[fragile]{Python basics}
\textbf{Classes}
\begin{itemize}
\item Classes can contain \emph{members} and \emph{methods}.
\item The constructor is the reserved method \verb@__init__@
\end{itemize}
\begin{minted}{python}
class Shape:
def __init__(self, x , y):
self.x = x
self.y = y
def area(self):
return self.x * self.y
rectangle = Shape(100, 45)
print rectangle.area()
\end{minted}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Indentation}
\begin{frame}[fragile]{Python basics}
\textbf{Indentations in python}
\begin{itemize}
\item Indentations mark the blocks of code within script
\item Each line of a block must be indented by the same amount
\end{itemize}
\begin{minted}{python}
if some_condition:
if the_number == 4:
do_something(fancy)
else:
do_something(different)
\end{minted}
\begin{itemize}
\item Mind that beginnings of blocks are indicated with a colon ":"
\end{itemize}
\pause
\textbf{0 - indexing}
\begin{itemize}
\item The index of the first element in python is 0
\item Tip: "-1" refers to the last element
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{ \scshape For Matlab Fans}
\begin{frame}{}
\large
\vspace{30pt}
First piece of advice:
\pause
\vspace{10pt}
\begin{itemize}
\item \textbf{\Large Don't panic.}
\end{itemize}
\vspace{20pt}
\begin{figure}[b]
\centering
\includegraphics[width=\textwidth, clip, trim= 0 100 0 0]{HolyGrail072}
\end{figure}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]{General comments}
\textbf{Replacing Matlab with python}
\begin{itemize}
\item Overall Matlab and python are very similar in terms of syntax
\item \textbf{Similarities:}
\begin{enumerate}
\item Both are \textit{dynamically typed} (every variable can contain data of any type)
\item Both are \textit{interpreted}, they do not need to be compiled (almost)
\end{enumerate}
\item \textbf{Differences}
\begin{enumerate}
\item Python files can contain unlimited functions that can all be accessed
\item Python does not have a matrix engine but there are useful packages with similar functionalities
\begin{itemize}
\item \textbf{Numpy}: enables basic matrix arithmetic on arrays
\item \textbf{Scipy}: advanced mathematical routines
\item \textbf{Matplotlib}: plotting
\end{itemize}
\end{enumerate}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Basic commands}
\begin{frame}{Basic commands}
\large
Most Matlab has direct correspondence in Python:
\vspace{5pt}
\begin{itemize}
\newcommand{\myitem}{\vspace{3pt} \pause \item}
\myitem Variable declaration
\myitem Loops
\myitem Flow control
\myitem Function handles
\myitem That's it!
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Data structures}
\begin{frame}[fragile]{Common data structures}
\large
\vspace{-5pt}
\begin{description}
\item[Python] ~ \\ \hspace{-30pt} Lists, dictionaries, arrays, \ldots
\vspace{8pt}
\item[Matlab] ~ \\ \hspace{-30pt} Arrays, cells, structs, \ldots
\end{description}
\vspace{10pt}
\pause
\(
\<{0.6\linewidth}
\centering
\textbf{Python}
\begin{minted}{python}
A = [1,3,2,4]
B = {'a': 0.2,
'b': 0.02}
C = np.array([10,20])
\end{minted}
\> \<{0.6\linewidth}
\centering
\textbf{Matlab}
\begin{minted}[frame=leftline]{octave}
A = [1,3,2,4];
B.a = 0.1;
B.b = 0.02;
C = [10,20];
\end{minted}
\>
\)
\vspace{25pt}
\pause
We recommend to use always \textbf{\texttt{np.array}}.
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The Question}
\begin{frame}{The big question}
\large
\textbf{\Large Can I use Matlab?}
\vspace{20pt}
\pause
Yes, but:
\vspace{3pt}
\begin{itemize}
\newcommand{\myitem}{\vspace{3pt} \pause \item[{\color{darkgreen}\checkmark}]}
\newcommand{\baditem}{\vspace{3pt} \pause \item[{\color{red}$\boldsymbol\times$}]}
\baditem The Matlab code is not maintained.
\baditem Matlab makes the markers sad.
\baditem We provide limited support for Matlab questions.
\myitem Come on, use Python.
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{ \scshape Tools}
\subsection{Development tools}
\begin{frame}{Development tools}
\Large
\begin{itemize}
\newcommand{\myitem}{\vfill \pause \item}
\myitem Editor + terminal
\myitem Spyder
\myitem iPython (notebook)
\end{itemize}
\vfill
\pause
Remember to use a debugger! \\
~ ~ $\rightarrow$ \textbf{pdb}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Virtual environments and packages}
\begin{frame}{Logistics and installation}
\large
\vfill
\begin{itemize}
\item If you still don't have access to the DoC machines, talk with me ASAP!
\vfill
\pause
\item No mortal is allowed to install programs on the DoC machines, so we'll
use Python's \textbf{virtualenv}.
\begin{itemize}
\item A \emph{virtual environment} is a small Python bubble.
\vspace{3pt}
\item You can~ \ver{pip install} packages inside without requiring permissions.
\end{itemize}
\end{itemize}
\vfill
~
\vfill
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]{Virtual environment}
\begin{itemize}
\item Setting up your \ver{virtualenv}:
\end{itemize}
\begin{minted}[bgcolor=aliceblue]{bash}
virtualenv venv
cd venv
source bin/activate
pip install scipy
pip install matplotlib
pip install jpype1
\end{minted}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]{Virtual environment}
\begin{itemize}
\item To install Spyder:
\end{itemize}
\begin{minted}[bgcolor=aliceblue]{bash}
pip install PySide
pip install spyder
\end{minted}
\vspace{10pt}
\begin{itemize}
\item Using the \ver{virtualenv}:
\end{itemize}
\begin{minted}[bgcolor=aliceblue]{bash}
source /<PATHTOVENV>/bin/activate
python EulerDemo.py
spyder
\end{minted}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Links}
\begin{frame}{Useful links}
\large
\begin{itemize}
\item NumPy for Matlab users:
\vspace{5pt}
{\scriptsize \centering \url{http://mathesaurus.sourceforge.net/matlab-numpy.html}\\}
\vspace{8pt}
\item Using Vim as a Python IDE:
\vspace{5pt}
{\scriptsize \centering \url{https://www.youtube.com/watch?v=YhqsjUUHj6g} \\
\url{http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/}}
\vspace{8pt}
\item The Python tutorial:
\vspace{5pt}
{\scriptsize \centering \url{https://docs.python.org/2/tutorial/}\\}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{}
\begin{frame}{Live example}
\Large
Let's go through \ver{IzNeuronDemo.py}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
\usebackgroundtemplate{\includegraphics[width=\paperwidth, clip, trim=80 0 80 0]{HolyGrail065}}
\begin{frame}[plain, noframenumbering]
\end{frame}
}
\end{document}