Skip to content

Commit 05801da

Browse files
committed
update sources using tomyst(26890f1)
1 parent eb40322 commit 05801da

16 files changed

+147
-294
lines changed

source/rst/about_py.md

Lines changed: 29 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ kernelspec:
1818
</div>
1919
```
2020

21-
```{index}
22-
single: python
21+
```{index} single: python
2322
```
2423

2524
# About Python
@@ -122,8 +121,7 @@ Other features of Python:
122121

123122
### Syntax and Design
124123

125-
```{index}
126-
single: Python; syntax and design
124+
```{index} single: Python; syntax and design
127125
```
128126

129127
One nice feature of Python is its elegant syntax --- we'll see many examples later on.
@@ -140,8 +138,7 @@ Features like iterators, generators, decorators and list comprehensions make Pyt
140138

141139
## Scientific Programming
142140

143-
```{index}
144-
single: scientific programming
141+
```{index} single: scientific programming
145142
```
146143

147144
Python has become one of the core languages of scientific computing.
@@ -163,8 +160,7 @@ This section briefly showcases some examples of Python for scientific programmin
163160

164161
### Numerical Programming
165162

166-
```{index}
167-
single: scientific programming; numeric
163+
```{index} single: scientific programming; numeric
168164
```
169165

170166
Fundamental matrix and array processing capabilities are provided by the excellent [NumPy](http://www.numpy.org/) library.
@@ -218,8 +214,7 @@ See them all [here](http://docs.scipy.org/doc/scipy/reference/index.html).
218214

219215
### Graphics
220216

221-
```{index}
222-
single: Matplotlib
217+
```{index} single: Matplotlib
223218
```
224219

225220
The most popular and comprehensive Python library for creating figures and graphs is [Matplotlib](http://matplotlib.org/), with functionality including
@@ -258,8 +253,7 @@ Other graphics libraries include
258253

259254
It's useful to be able to manipulate symbolic expressions, as in Mathematica or Maple.
260255

261-
```{index}
262-
single: SymPy
256+
```{index} single: SymPy
263257
```
264258

265259
The [SymPy](http://www.sympy.org/) library provides this functionality from within the Python shell.
@@ -315,8 +309,7 @@ the last few years.
315309

316310
#### Pandas
317311

318-
```{index}
319-
single: Pandas
312+
```{index} single: Pandas
320313
```
321314

322315
One of the most popular libraries for working with data is [pandas](http://pandas.pydata.org/).
@@ -343,26 +336,22 @@ df.mean()
343336

344337
#### Other Useful Statistics Libraries
345338

346-
```{index}
347-
single: statsmodels
339+
```{index} single: statsmodels
348340
```
349341

350342
* [statsmodels](http://statsmodels.sourceforge.net/) --- various statistical routines
351343

352-
```{index}
353-
single: scikit-learn
344+
```{index} single: scikit-learn
354345
```
355346

356347
* [scikit-learn](http://scikit-learn.org/) --- machine learning in Python (sponsored by Google, among others)
357348

358-
```{index}
359-
single: pyMC
349+
```{index} single: pyMC
360350
```
361351

362352
* [pyMC](http://pymc-devs.github.io/pymc/) --- for Bayesian data analysis
363353

364-
```{index}
365-
single: pystan
354+
```{index} single: pystan
366355
```
367356

368357
* [pystan](https://pystan.readthedocs.org/en/latest/) Bayesian analysis based on [stan](http://mc-stan.org/)
@@ -371,8 +360,7 @@ single: pystan
371360

372361
Python has many libraries for studying graphs.
373362

374-
```{index}
375-
single: NetworkX
363+
```{index} single: NetworkX
376364
```
377365

378366
One well-known example is [NetworkX](http://networkx.github.io/).
@@ -414,70 +402,59 @@ plt.show()
414402

415403
### Cloud Computing
416404

417-
```{index}
418-
single: cloud computing
405+
```{index} single: cloud computing
419406
```
420407

421408
Running your Python code on massive servers in the cloud is becoming easier and easier.
422409

423-
```{index}
424-
single: cloud computing; anaconda enterprise
410+
```{index} single: cloud computing; anaconda enterprise
425411
```
426412

427413
A nice example is [Anaconda Enterprise](https://www.anaconda.com/enterprise/).
428414

429415
See also
430416

431-
```{index}
432-
single: cloud computing; amazon ec2
417+
```{index} single: cloud computing; amazon ec2
433418
```
434419

435420
* [Amazon Elastic Compute Cloud](http://aws.amazon.com/ec2/)
436421

437-
```{index}
438-
single: cloud computing; google app engine
422+
```{index} single: cloud computing; google app engine
439423
```
440424

441425
* The [Google App Engine](https://cloud.google.com/appengine/) (Python, Java, PHP or Go)
442426

443-
```{index}
444-
single: cloud computing; pythonanywhere
427+
```{index} single: cloud computing; pythonanywhere
445428
```
446429

447430
* [Pythonanywhere](https://www.pythonanywhere.com/)
448431

449-
```{index}
450-
single: cloud computing; sagemath cloud
432+
```{index} single: cloud computing; sagemath cloud
451433
```
452434

453435
* [Sagemath Cloud](https://cloud.sagemath.com/)
454436

455437
### Parallel Processing
456438

457-
```{index}
458-
single: parallel computing
439+
```{index} single: parallel computing
459440
```
460441

461442
Apart from the cloud computing options listed above, you might like to consider
462443

463-
```{index}
464-
single: parallel computing; ipython
444+
```{index} single: parallel computing; ipython
465445
```
466446

467447
* [Parallel computing through IPython clusters](http://ipython.org/ipython-doc/stable/parallel/parallel_demos.html).
468448

469-
```{index}
470-
single: parallel computing; starcluster
449+
```{index} single: parallel computing; starcluster
471450
```
472451

473452
* The [Starcluster](http://star.mit.edu/cluster/) interface to Amazon's EC2.
474453

475-
```{index}
476-
single: parallel computing; copperhead
454+
```{index} single: parallel computing; copperhead
477455
```
478456

479-
```{index}
480-
single: parallel computing; pycuda
457+
```{index} single: parallel computing; pycuda
481458
```
482459

483460
* GPU programming through [PyCuda](https://wiki.tiker.net/PyCuda), [PyOpenCL](https://mathema.tician.de/software/pyopencl/), [Theano](http://deeplearning.net/software/theano/) or similar.
@@ -489,32 +466,27 @@ There are many other interesting developments with scientific programming in Pyt
489466

490467
Some representative examples include
491468

492-
```{index}
493-
single: scientific programming; Jupyter
469+
```{index} single: scientific programming; Jupyter
494470
```
495471

496472
* [Jupyter](http://jupyter.org/) --- Python in your browser with interactive code cells, embedded images and other useful features.
497473

498-
```{index}
499-
single: scientific programming; Numba
474+
```{index} single: scientific programming; Numba
500475
```
501476

502477
* [Numba](http://numba.pydata.org/) --- Make Python run at the same speed as native machine code!
503478

504-
```{index}
505-
single: scientific programming; Blaze
479+
```{index} single: scientific programming; Blaze
506480
```
507481

508482
* [Blaze](http://blaze.pydata.org/) --- a generalization of NumPy.
509483

510-
```{index}
511-
single: scientific programming; PyTables
484+
```{index} single: scientific programming; PyTables
512485
```
513486

514487
* [PyTables](http://www.pytables.org) --- manage large data sets.
515488

516-
```{index}
517-
single: scientific programming; CVXPY
489+
```{index} single: scientific programming; CVXPY
518490
```
519491

520492
* [CVXPY](https://github.com/cvxgrp/cvxpy) --- convex optimization in Python.
@@ -525,8 +497,7 @@ single: scientific programming; CVXPY
525497
* Read more about [Python's history and rise in popularity](https://www.welcometothejungle.com/en/articles/btc-python-popular) .
526498
* Have a look at [some of the Jupyter notebooks](http://nbviewer.jupyter.org/) people have shared on various scientific topics.
527499

528-
```{index}
529-
single: Python; PyPI
500+
```{index} single: Python; PyPI
530501
```
531502

532503
* Visit the [Python Package Index](https://pypi.org/).

source/rst/debugging.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ kernelspec:
2020

2121
# Debugging
2222

23-
```{index}
24-
single: Debugging
23+
```{index} single: Debugging
2524
```
2625

2726
```{contents} Contents
@@ -58,8 +57,7 @@ import matplotlib.pyplot as plt
5857

5958
## Debugging
6059

61-
```{index}
62-
single: Debugging
60+
```{index} single: Debugging
6361
```
6462

6563
### The `debug` Magic

source/rst/functions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ kernelspec:
2020

2121
# Functions
2222

23-
```{index}
24-
single: Python; User-defined functions
23+
```{index} single: Python; User-defined functions
2524
```
2625

2726
```{contents} Contents
@@ -229,8 +228,7 @@ The net result is that the name `data` is *bound* to the list `ϵ_values` return
229228

230229
### Adding Conditions
231230

232-
```{index}
233-
single: Python; Conditions
231+
```{index} single: Python; Conditions
234232
```
235233

236234
Our function `generate_data()` is rather limited.

source/rst/getting_started.md

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ kernelspec:
2020

2121
# Setting up Your Python Environment
2222

23-
```{index}
24-
single: Python
23+
```{index} single: Python
2524
```
2625

2726
```{contents} Contents
@@ -67,8 +66,7 @@ Anaconda also comes with a great package management system to organize your code
6766
(install_anaconda)=
6867
### Installing Anaconda
6968

70-
```{index}
71-
single: Python; Anaconda
69+
```{index} single: Python; Anaconda
7270
```
7371

7472
To install Anaconda, [download](https://www.anaconda.com/download/) the binary and follow the instructions.
@@ -94,16 +92,13 @@ For more information on conda, type conda help in a terminal.
9492
(ipython_notebook)=
9593
## Jupyter Notebooks
9694

97-
```{index}
98-
single: Python; IPython
95+
```{index} single: Python; IPython
9996
```
10097

101-
```{index}
102-
single: IPython
98+
```{index} single: IPython
10399
```
104100

105-
```{index}
106-
single: Jupyter
101+
```{index} single: Jupyter
107102
```
108103

109104
[Jupyter](http://jupyter.org/) notebooks are one of the many possible ways to interact with Python and the scientific libraries.
@@ -132,8 +127,7 @@ These lectures are designed for executing in Jupyter notebooks.
132127

133128
### Starting the Jupyter Notebook
134129

135-
```{index}
136-
single: Jupyter Notebook; Setup
130+
```{index} single: Jupyter Notebook; Setup
137131
```
138132

139133
Once you have installed Anaconda, you can start the Jupyter notebook.
@@ -179,8 +173,7 @@ The notebook displays an *active cell*, into which you can type Python commands.
179173

180174
### Notebook Basics
181175

182-
```{index}
183-
single: Jupyter Notebook; Basics
176+
```{index} single: Jupyter Notebook; Basics
184177
```
185178

186179
Let's start with how to edit code and run simple programs.
@@ -294,8 +287,7 @@ In this way, the Tab key helps remind you of what's available and also saves you
294287
(gs_help)=
295288
#### On-Line Help
296289

297-
```{index}
298-
single: Jupyter Notebook; Help
290+
```{index} single: Jupyter Notebook; Help
299291
```
300292

301293
To get help on `np.rank`, say, we can execute `np.rank?`.
@@ -331,12 +323,10 @@ Now we `Shift+Enter` to produce this
331323

332324
### Sharing Notebooks
333325

334-
```{index}
335-
single: Jupyter Notebook; Sharing
326+
```{index} single: Jupyter Notebook; Sharing
336327
```
337328

338-
```{index}
339-
single: Jupyter Notebook; nbviewer
329+
```{index} single: Jupyter Notebook; nbviewer
340330
```
341331

342332
Notebook files are just text files structured in [JSON](https://en.wikipedia.org/wiki/JSON) and typically ending with `.ipynb`.
@@ -360,8 +350,7 @@ to comments and votes by the community.
360350
## Installing Libraries
361351

362352
(gs_qe)=
363-
```{index}
364-
single: QuantEcon
353+
```{index} single: QuantEcon
365354
```
366355

367356
Most of the libraries we need come in Anaconda.
@@ -435,8 +424,7 @@ following questions:
435424

436425
#### Option 1: JupyterLab
437426

438-
```{index}
439-
single: JupyterLab
427+
```{index} single: JupyterLab
440428
```
441429

442430
[JupyterLab](https://github.com/jupyterlab/jupyterlab) is an integrated development environment built on top of Jupyter notebooks.
@@ -494,8 +482,7 @@ This is an alternative way to start the notebook that can also be handy.
494482
(gs_ex2)=
495483
### Exercise 2
496484

497-
```{index}
498-
single: Git
485+
```{index} single: Git
499486
```
500487

501488
This exercise will familiarize you with git and GitHub.

0 commit comments

Comments
 (0)