forked from sbu-python-class/python-science
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·637 lines (476 loc) · 27.2 KB
/
index.html
File metadata and controls
executable file
·637 lines (476 loc) · 27.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHY 546: Python for Scientific Computing</title>
<link rel="stylesheet" type="text/css" href="./class.css">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<div id="main">
<div id="heading">
<h1>PHY 546: Python for Scientific Computing</h1><br>
<h4>a weekly graduate seminar on techniques for scientific programming</h4>
<h3>Instructor: <a href="http://www.astro.sunysb.edu/mzingale/">Michael Zingale</a></h3>(Spring 2017)
</div>
<p class="center"><img src="python.png" alt="xkcd"><br>(xkcd)
<div class="getpython">
Some basic programming background, be
it C/C++, Fortran, matlab, mathematica, ..., (enough to
understand the logic of programming, control statements,
basic data structures, etc.) would be useful.
<p>This is intended to be a 1-credit class. The primary
method of evaluation is class participation.
<p>To make the most of this class, you should have python
installed on a laptop that you can bring to the seminar.
On Linux machines, you can get python and the needed
libraries through your package manager. For Mac and
Windows, you might want to consider the free distributions
provided
by <a href="https://www.enthought.com/products/canopy/">Enthought
Canopy</a>
or <a href="https://store.continuum.io/cshop/anaconda/">Anaconda</a>.
These both install everything you need.
<!-- <p>Alternately, if you run the Chrome web browser, you can
install
the <a href="https://chrome.google.com/webstore/detail/colaboratory-notebook/pianggobfjcgeihlmfhfgkfalopndooo?hl=en-US">coLaboratory
Notebook</a> app—it will provide an IPython
environment that runs in your browser with no other
dependencies needed (not all the libraries we need will be
installed, but it is a good way to get started).
-->
</div>
<div class="getgit">
All of the course slides (in LibreOffice flat XML format),
scripts, and IPython notebooks are availble on the course
github page: <a href="https://github.com/sbu-python-class/python-science">https://github.com/sbu-python-class/python-science</a>
</div>
<p><h2>Course Information:</h2>
<p>syllabus: <a href="./syllabus.pdf">syllabus.pdf</a>
<p><h2>Online Resources:</h2>
<p>The following free online books might be helpful:
<ul>
<li><a href="http://www.greenteapress.com/thinkpython/">Think
Python</a></li>
<li><a href="http://www.diveintopython.net/">Dive Into
Python</a></li>
<li><a href="http://scipy-lectures.github.io/">Python
Scientific Lecture Notes</a></li>
<li><a href="https://hplgit.github.io/primer.html/doc/pub/half/book.pdf">A Primer on Scientific Programming with Python</a> by Hans Petter Langtangen</li>
<li><a href="https://developers.google.com/edu/python/">Google's
Python Class</a></li>
<li>and a whole lot of other texts that are free can be
found
here: <a href="http://pythonbooks.revolunet.com/">python
books</a></li>
</ul>
<p><h2>Other Readings (dealing with Open science and managing
code projects):</h2>
<p>
<ul>
<li><a href="http://arxiv.org/pdf/1401.2134v1.pdf"><em>10
Simple Rules for the Care and Feeding of Scientic
Data</em></a> by Goodman et al.</li>
<li><a href="http://arxiv.org/abs/1301.7064"><em>How to
Scale a Code in the Human Dimension</em></a> by Matt
Turk</li>
<li><a href="http://arxiv.org/abs/1304.6780"><em>Practices
in source code sharing in astrophysics</em></a> by L. Shamir
et al.</li>
<li><a href="http://arxiv.org/abs/1210.0530">
<em>Best Practices for Scientific Computing</em></a> by
G. Wilson et al.</li>
<li><a href="http://arxiv.org/abs/1609.00037">
<em>Good Enough Practices in Scientific Computing</em></a> by
G. Wilson et al.</li>
<li><a href="http://openresearchsoftware.metajnl.com/article/view/jors.ay/63"><em>Best
Practices for Computational Science: Software Infrastructure
and Environments for Reproducible and Extensible
Research</em></a> by V. Stodden and Sheila Miguez</li>
<li><a href="http://arxiv.org/abs/astro-ph/0210161">
<em>Reliability in the Face of Complexity; The Challenge
of High-End Scientific Computing</em></a> by
G. Ferland</li>
<li><a href="http://arxiv.org/abs/1404.6248">
<em>The Nature of Scientific Proof in the Age of
Simulations</em></a> by K. Heng</li>
</ul>
<p><h2>Python Resources by Disicipline:</h2>
<p>The following list provides links to discipline-specific python
software:
<ul>
<li>Astronomy resources:
<ul>
<li><a href="http://adsabs.harvard.edu/abs/2013A%26A...558A..33A">
<em>Astropy: A community Python package for
astronomy</em></a>: an article describing a
community Astronomy package for python</li>
<li><a href="http://www.astropython.org/">AstroPython</a></li>
</ul>
</li>
<li>Atmospheric Sciences resources:
<ul>
<li><a href="http://pyaos.johnny-lin.com/">PyAOS</a>: a
list of python resources for Atmospheric Sciences</li>
</ul>
</li>
<li>Biology resources:
<ul>
<li><a href="http://arxiv.org/pdf/0803.1838v1.pdf">
<em>Python—All a Scientist Needs</em></a>: an
article describing how python is used in
bioinformatics</li>
<li><a href="http://biopython.org/wiki/Main_Page">
Biopython</a>: a set of tools for computational
biology</li>
</ul>
</li>
<!-- <li>Cognitive Science resources: -->
<!-- <ul> -->
<!-- <li><a href="http://www.pycogsci.info/"> pycogsci</a>:a -->
<!-- blog providing information about how python is used -->
<!-- in Cognitive Science</li> -->
<!-- </ul> -->
<!-- </li> -->
<li>Ocean and marine sciences resources:
<ul>
<li><a href="http://oceanpython.org/">OceanPython.org</a>:
a blog for the ocean and marine sciences
communities</li>
</ul>
</li>
<li>Physics resources:
<ul>
<li><a href="http://qutip.org/">QuTiP</a>: the Quantum
Toolbok in Python</li>
</ul>
</li>
<li>Social sciences resources:
<ul>
<li><a href="http://networkx.github.io/">NetworkX</a>: a
library for exploring the structure and complexity of social
networks</li>
</ul>
</li>
<li>Solar physics resources:
<ul>
<li><a href="http://sunpy.org/"> SunPy</a>: a library
providing routines to analyze solar data</li>
</ul>
</li>
<li>Psychology resources:
<ul>
<li><a href="http://www.psychopy.org/">PyschoPy</a>:
psychology software to "allow the presentation of
stimuli and collection of data for a wide range of
neuroscience, psychology and psychophysics
experiments."</li>
</ul>
</li>
</ul>
<p><h2>Course Topics:</h2><br>
Note: this information will be updated continuously throughout the
semester, so it is best to look at the relevant topics just before the
class meeting.
<p><h3>Introduction to python</h3> (lectures 1–4)
<ul>
<li>Readings:
<ul>
<li>The official <a href="http://docs.python.org/3/tutorial/">
<em>python tutorial</em></a></li>
<li><a href="http://ipython.readthedocs.org/en/stable/"><em>IPython tutorial</em></a></li>
<li><a href="http://maxburstein.com/blog/python-shortcuts-for-the-python-beginner/"><em>Python Shortcuts for the Python Beginner</em></a></li>
<li><a href="http://dl.acm.org/citation.cfm?id=103163">
<em>What every computer scientist should know about
floating-point arithmetic</em></a> by
D. Goldberg</li>
<li><a href="https://github.com/asmeurer/python3-presentation/blob/gh-pages/python3-presentation.pdf">
<em>10 awesome features of Python that you can't use because you refuse to upgrade to Python 3</em></a> by A. Meurer</li>
</ul>
</li>
<li>Practice on your own:
<ul>
<li><a href="http://www.codecademy.com/tracks/python">
Code Academy python track</a>: a step-by-step tutorial
through the basics of the language</li>
<li><a href="https://projecteuler.net/">Project Euler</a>:
a set of increasingly complex programming tasks to try
out with python</li>
</ul>
</li>
<li>Lecture
slides: <a href="./lectures/python.pdf">python.pdf</a></li>
<li>Lecture IPython notebooks (based on the python tutorial
above):
<ul>
<li>datatypes: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-datatypes.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-datatypes.ipynb">python-datatypes.ipynb</a></li>
<li>more
datatypes: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-advanced-datatypes.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-advanced-datatypes.ipynb">python-advanced-datatypes.ipynb</a></li>
<li>control
flow: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-control-flow.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-control-flow.ipynb">python-control-flow.ipynb</a></li>
<li>functions: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-functions.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-functions.ipynb">python-functions.ipynb</a></li>
<li><b>in-class exercises:</b> <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-inclass-2.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-inclass-2.ipynb">python-inclass-2.ipynb</a></li>
<li>classes: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-classes.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-classes.ipynb">python-classes.ipynb</a></li>
<li><b>in-class exercises:</b> <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-inclass-3.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-inclass-3.ipynb">python-inclass-3.ipynb</a></li>
<li>modules: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-modules.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-modules.ipynb">python-modules.ipynb</a>;<br>
<a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/myprofile.py">[myprofile.py]</a>
(the module example file) </li>
<li>exceptions: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-exceptions.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-exceptions.ipynb">python-exceptions.ipynb</a></li>
<li>I/O: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/01-python/python-io.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/01-python/python-io.ipynb">python-io.ipynb</a>;<br>
<a href="./lectures/test.txt">[plain text sample]</a>
<a href="./lectures/shopping.csv">[CSV sample]</a>
<a href="./lectures/VARDEN-tests.ini">[Config/INI sample]</a></li>
</ul>
</li>
</ul>
<p><h3>The NumPy library</h3> (lecture 5)
<ul>
<li>Readings:
<ul>
<li>The
official <a href="http://www.scipy.org/Tentative_NumPy_Tutorial">
<em>NumPy Tutorial</em></a></li>
<li><a href="http://mathesaurus.sourceforge.net/idl-numpy.html">
<em>NumPy for IDL users</em></a></li>
</ul>
</li>
<!-- <li>Lecture slides: <a href="./lectures/numpy.pdf">numpy.pdf</a></li> -->
<li>NumPy notebook:
<a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/02-numpy/numpy-basics.ipynb">github link</a>,
raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/02-numpy/numpy-basics.ipynb">numpy-basics.ipynb</a>
</li>
</ul>
<p><h3>Python Practices</h3> (lecture 6)
<ul>
<li>Readings:
<ul>
<li><a href="http://legacy.python.org/dev/peps/pep-0008/"><em>PEP-0008:
Style Guide for Python Code</em></a></li>
</ul>
</li>
<li>Lecture
slides: <a href="lectures/python-practices.pdf">python-practices.pdf</a></li>
</ul>
<p><h3>Matplotlib and others</h3> (lecture 7)
<ul>
<li>Readings:
<ul>
<li>The
official <a href="http://matplotlib.org/users/pyplot_tutorial.html"><em>matplotlib
tutorial</em></a></li>
<li>The <a href="http://matplotlib.org/faq/index.html"><em>matplotlib
FAQ</em></a></li>
<li>The <a href="http://wiki.scipy.org/Cookbook/Matplotlib"><em>matplotlib
cookbook</em></a></li>
<li>The <a href="http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html"><em>mplot3d
tutorial</em></a>: basic 3-d plotting (surfaces, lines,
scatter plots)</li>
<li><a href="http://www.loria.fr/~rougier/teaching/matplotlib/"><em>Matplotlib
Tutorial</em></a> by Nicolas P. Rougier</li>
</ul>
</li>
<!-- <li>Lecture slides: <a href="./lectures/matplotlib.pdf">matplotlib.pdf</a></li> -->
<li>Lecture notebooks:
<ul>
<li>basics:
<a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/04-matplotlib/matplotlib-basics.ipynb">github link</a>, raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/04-matplotlib/matplotlib-basics.ipynb">matplotlib-basics.ipynb</a>
<a href="./lectures/test1.exact.128.out">[sample data]</a></li>
<li>interactive backend: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/04-matplotlib/matplotlib-interactive-backend.ipynb">github line</a>, raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/04-matplotlib/matplotlib-interactive-backend.ipynb">matplotlib-interactive-backend.ipynb</a></li>
<li>ipyvolume example: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/04-matplotlib/ipyvolume-example.ipynb">github line</a>, raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/04-matplotlib/ipyvolume-example.ipynb">ipyvolume-example.ipynb</a></li>
</ul>
</li>
</ul>
<p><h3>SciPy and numerical methods</h3> (lectures 8–9)
<ul>
<li>Readings:
<ul>
<li>The official <a href="http://docs.scipy.org/doc/scipy/reference/tutorial/index.html"><em>SciPy Tutorial</em></a></li>
<li>The <a href="http://wiki.scipy.org/Cookbook"><em>SciPy cookbook</em></a></li>
<li><a href="http://scikits.appspot.com/scikits"><em>SciKits</em></a> are additional toolkits for SciPy which provide extra functionality</li>
<li><a href="http://scipy-central.org/"><em>SciPy Central</em></a> user-submitted SciPy snippets</li>
<li><a href="http://www.scipy.org/NumPy_for_Matlab_Users"><em>NumPy for Matlab Users</em></a></li>
<li><a href="http://adsabs.harvard.edu/abs/1963JAtS...20..130L"><em>Deterministic Nonperiodic Flow</em></a> by E. N. Lorenz—this is the system we integrated when discussing ODEs</li>
<li><a href="http://dl.acm.org/citation.cfm?id=1052672"><em>A simple example of an ill-conditioned matrix</em> by G. J. Tee</a></li>
</ul>
</li>
<!-- <li>Lecture slides: <a href="./lectures/scipy.pdf">scipy.pdf</a></li> -->
<li>Lecture IPython notebooks:
<ul>
<li>overview: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/05-scipy/scipy-basics.ipynb">github link</a>, raw file:
<a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/05-scipy/scipy-basics.ipynb">scipy-basics.ipynb</a></li>
<li>in-class exercises: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/05-scipy/scipy-exercises.ipynb">github link</a>, raw file:
<a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/05-scipy/scipy-exercises.ipynb">scipy-exercises.ipynb</a></li>
<li>in-class exercises 2: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/05-scipy/scipy-exercises-2.ipynb">github link</a>, raw file:
<a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/05-scipy/scipy-exercises-2.ipynb">scipy-exercises-2.ipynb</a></li>
</ul>
</li>
<li>Other examples:
<ul>
<li>Gaussian elimination with pivoting:
<a href="examples/gauss.py">gauss.py</a> (main module),
<a href="examples/gauss-test.py">gauss-test.py</a> (test routine)
<a href="examples/matmul.py">matmul.py</a> (auxillary routine)</li>
</ul>
</li>
</ul>
<p><h3>SymPy</h3> (lecture 10)
<ul>
<li>Readings:
<ul>
<li>The official <a href="http://docs.sympy.org/latest/tutorial/"><em>SymPy tutorial</em></a></li>
</ul>
</li>
<li>Lecture IPython notebook: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/06-sympy/sympy-examples.ipynb">github link</a>, raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/06-sympy/sympy-examples.ipynb">sympy-examples.ipynb</a></li>
</ul>
<p><h3>Pandas and the data frame</h3> (lecture 11)
<ul>
<li>Readings: <em><a href="http://pandas.pydata.org/pandas-docs/stable/10min.html">10 Minutes to Pandas</a></em>
</li>
<li>Sample datasets: <a href="https://github.com/wesm/pydata-book">pydata-book examples</a></li>
<li>Lecture IPython notebooks:
<ul>
<li>intro: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/07-pandas/pandas-intro.ipynb">github link</a>, raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/07-pandas/pandas-intro.ipynb">pandas-intro.ipynb</a> (sample data: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/07-pandas/sample.csv">sample.csv</a>)</li>
<li>in-class exercise: <a href="https://github.com/sbu-python-class/python-science/blob/master/lectures/07-pandas/pandas-babynames.ipynb">github link</a>, raw file: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/07-pandas/pandas-babynames.ipynb">pandas-babynames.ipynb</a></li>
</ul>
</li>
</ul>
<p><h3>Extending python with C/Fortran & System Operations</h3> (lecture 12)
<ul>
<li>Readings:
<ul>
<li><a href="http://scipy-lectures.github.io/advanced/interfacing_with_c/interfacing_with_c.html"><em>Interfacing with C</em></a> by Valentin Haenel as part of his SciPy lecture notes. This is a very nice comparison of different methods</li>
<li><a href="http://technicaldiscovery.blogspot.com/2011/06/speeding-up-python-numpy-cython-and.html"><em>Speeding up Python (NumPy, Cython, and Weave)</em></a> by T. Oliphant</li>
<li>C-API:
<ul>
<li><a href="https://docs.python.org/3/extending/extending.html">
<em>Extending Python with C or C++</em></a>: this is the "hard" way to do things.</li>
</ul>
</li>
<li>ctypes:
<ul>
<li><a href="https://docs.python.org/3/library/ctypes.html"><em>ctypes — A foreign function library for Python</em></a>:
ctypes makes it easy to call existing C code.</li>
<li><a href="http://scipy-cookbook.readthedocs.io/items/Ctypes.html"><em>SciPy ctypes cookbook</em></a>
</ul>
</li>
<li>f2py:
<ul>
<li><a href="https://docs.scipy.org/doc/numpy-dev/f2py/">
<em>f2py Users Guide</em></a></li>
<li><a href="http://cens.ioc.ee/~pearu/papers/IJCSE4.4_Paper_8.pdf">
<em>F2PY: a tool for connecting Fortran and Python programs</em></a></li>
</ul>
</li>
<li>Cython:
<ul>
<li><a href="http://cython.org/"><em>Cython, C-Extensions for Python</em></a>
the official project page</li>
<li><a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5582062">
<em>Cython: The Best of Both Worlds</em></a>
by S. Behnet et al. (alternate links:
<a href="http://folk.uio.no/dagss/cython_cise.pdf">[here]</a>)</li>
</ul>
</li>
</ul>
</li>
<li>Lecture slides: <a href="lectures/extensions.pdf">extensions.pdf</a></li>
<li>Example codes:
<ul>
<li>C-API: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/C-API/test-C-API.py">test-C-API.py</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/C-API/numpy-ex.c">numpy-ex.c</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/C-API/setup.py">setup.py</a></li>
<li>ctypes: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/ctypes/simple/numpy-example.py">numpy-example.py</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/ctypes/simple/cfunc.c">cfunc.c</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/ctypes/simple/Makefile">Makefile</a></li>
<li>f2py: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/f2py/test_f2py.py">test_f2py.py</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/f2py/numpy_in_f.f90">numpy_in_f.f90</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/f2py/Makefile">Makefile</a></li>
<li>Cython: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/Cython/square/test_cy.py">test_cy.py</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/Cython/square/square.pyx">square.pyx</a>
<a href="https://github.com/sbu-python-class/python-science/blob/master/examples/extensions/Cython/square/setup.py">setup.py</a></li>
<li>Timing comparison for Laplace smoothing (this extends the comparison from the blog entry by T. Oliphant listed above):
<a href="https://github.com/sbu-python-class/python-science/tree/master/examples/extensions/timing">code directory</a>
<li>Calling an external command and capturing both stdout and stderr: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/external/Popen/githash.py">githash.py</a></li>
</ul>
</li>
</ul>
<p><h3>Building python applications / Packaging</h3> (lecture 13)
<ul>
<li>Readings:
<ul>
<li><a href="https://docs.python.org/3/tutorial/modules.html"><em>Python modules</em></a></li>
<li><a href="https://packaging.python.org/current/"><em>Python packaging recommendations</em></a></li>
<li><a href="https://packaging.python.org/glossary/">A glossary that explains the evolving terminology</a>—
this is part of the <a href="https://python-packaging.readthedocs.io/en/latest/"><em>Installation & Packaging Tutorial</em></a></li>
<li><a href="http://mrtopf.de/blog/en/a-small-introduction-to-python-eggs/"><em>A Small Introduction to Python Eggs</em></a></li>
<li><a href="http://stackoverflow.com/questions/6344076/differences-between-distribute-distutils-setuptools-and-distutils2"><em>Differences between distribute, distutils, setuptools and distutils2?</em></a> on stackoverflow</li>
</ul>
<li>Lecture slides: <a href="lectures/packaging.pdf">packaging.pdf</a></li>
<li>Examples:
<ul>
<li>argparse example: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/commandline/argparse_example.py">argparse_example.py</a></li>
</ul>
</li>
</ul>
<p><h3>Testing</h3> (lecture 14)
<ul>
<li>Readings:
</li>
<li>Lecture slides: <a href="lectures/testing.pdf">testing.pdf</a></li>
<li>Examples:
<ul>
<li>simple example: <a href="https://github.com/sbu-python-class/python-science/tree/master/examples/testing/pytest/simple/test_simple.py">test_simple.py</a></li>
<li>function setup example: <a href="https://github.com/sbu-python-class/python-science/tree/master/examples/testing/pytest/function_setup/test_function_setup.py">test_function_setup.py</a></li>
<li>class-based example: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/testing/pytest/class/test_class.py">test_class.py</a></li>
</ul>
</li>
</ul>
<p><h2>Other topics (if time)</h2>
<p><h3>GUIs</h3>
<ul>
<li>Readings:
</li>
<li>Lecture slides: <a href="lectures/gui.pdf">gui.pdf</a></li>
<li>Lecture IPython notebooks: <a href="https://raw.githubusercontent.com/sbu-python-class/python-science/master/lectures/10-GUI/gui-notebook.ipynb">gui-notebook.ipynb</a>
<a href="http://nbviewer.ipython.org/github/sbu-python-class/python-science/blob/master/lectures/10-GUI/gui-notebook.ipynb">[render online]</a></li>
<li>Examples:
<ul>
<li>A function plotter: <a href="https://github.com/sbu-python-class/python-science/blob/master/examples/GUI/plotter.py">plotter.py</a></li>
</ul>
</li>
</ul>
<p><h3>MayaVi</h3>
<ul>
<li>Readings:
<ul>
<li><a href="http://wiki.scipy.org/Cookbook/MayaVi"><em>MayaVi Cookbook</em></a></li>
<li><a href="http://docs.enthought.com/mayavi/mayavi/mlab_case_studies.html"><em>MayaVi case studies</em></a></li>
<li><a href="http://docs.enthought.com/mayavi/mayavi/example_using_with_scipy.html"><em>Using MayaVi with SciPy</em></a></li>
</ul>
</li>
<li>Lecture slides: <a href="lectures/mayavi.pdf">mayavi.pdf</a></li>
<li>Examples:
<ul>
<li>Scalar data: <a href="examples/mayavi-basic.py">mayavi-basic.py</a></li>
<li>Vector data: <a href="examples/mayavi-vector.py">mayavi-vector.py</a></li>
</ul>
</li>
</ul>
<p><h3>NetworkX</h3>
<p><h3>Interfacing with Arduino Microcontrollers</h3>
<p><h3>h5py and HDF5</h3>
<p>
<p>Last Modified: <!--#echo var="LAST_MODIFIED" -->
</div>
</body>
</html>