Skip to content

Commit 3f14b7a

Browse files
committed
Updated recipe 1.1.
1 parent c0c4550 commit 3f14b7a

File tree

2 files changed

+53
-15
lines changed

2 files changed

+53
-15
lines changed

installation.md

+39-3
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,36 @@ You need to know/learn, several things before you start:
2222

2323
### The terminal
2424

25-
#### Windows
25+
#### OS-specific instructions
26+
27+
##### Windows
2628

2729
Use Powershell.
2830

2931

30-
#### Linux
32+
##### Linux
3133

3234
TODO
3335

34-
#### Mac OS X
36+
##### Mac OS X
3537

3638
TODO
3739

3840

41+
#### Home directory
42+
43+
* On Windows: `c:\users\yourname\`
44+
* On Linux: `/home/yourname/`
45+
46+
47+
#### Current directory
48+
49+
* `cd subfolder`: go into a subfolder
50+
* `cd ~`: go in your home directory
51+
* `ls` (if on Windows and not in Powershell, replace by `dir`)
52+
53+
54+
3955
### Git
4056

4157
Not strictly required, but highly recommended if you want to use obscure packages, or if you start to write significant amount of code.
@@ -56,6 +72,7 @@ TODO
5672

5773
Once you're relatively confortable with the terminal and git, you can install Anaconda, a Python distribution.
5874

75+
**Don't execute `conda` or any other Python-related commands in the Anaconda directory: go somewhere else.**
5976

6077
### Windows
6178

@@ -81,6 +98,10 @@ TODO
8198

8299
### The basics
83100

101+
### Updating the packages
102+
103+
`conda update conda`
104+
84105

85106
## Environments
86107

@@ -112,6 +133,21 @@ Anaconda lets you maintain various isolated environements. You can switch to any
112133

113134
## Running Python, IPython, and the IPython notebook
114135

136+
### IPython profile
137+
138+
* A profile is a set of parameters and configuration files specific to a project of yours.
139+
* You can use different profiles for different use-cases: one profile when running code from the Cookbook, another one for your work, etc.
140+
* Using IPython profiles is not strictly necessary, and you can do everything in the same default profile. But it is good practice to use different profiles.
141+
142+
143+
#### Creating a profile for the cookbook
144+
145+
`ipython profile create cookbook`
146+
147+
#### Running IPython with this profile
148+
149+
* Command-line interface: `ipython --profile=cookbook`
150+
* Notebook: `ipython notebook --profile=cookbook`
115151

116152

117153
## Using a code editor

notebooks/chapter01_basic/01_notebook.ipynb

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:b83bd984415ffd506c5913d9119e63a2f2baaf17f1f3b6abea2afb1e1ecd0931"
4+
"signature": "sha256:e84e4ad9f3531057c88784f5341dd9edb6503d1b0ffb78233f0f10d8d7b74b11"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -169,6 +169,10 @@
169169
"cell_type": "code",
170170
"collapsed": false,
171171
"input": [
172+
"# You can omit this, it is just to force help output\n",
173+
"# to print in the standard output, rather than \n",
174+
"# in the pager. This might change in future versions\n",
175+
"# of IPython.\n",
172176
"from __future__ import print_function\n",
173177
"from IPython.core import page\n",
174178
"page.page = print"
@@ -202,9 +206,9 @@
202206
]
203207
},
204208
{
205-
"cell_type": "code",
206-
"collapsed": false,
207-
"input": [
209+
"cell_type": "raw",
210+
"metadata": {},
211+
"source": [
208212
"### New paragraph\n",
209213
"\n",
210214
"This is *rich* **text** with [links](http://ipython.org), equations:\n",
@@ -220,10 +224,7 @@
220224
"and images:\n",
221225
"\n",
222226
"![This is an image](http://ipython.org/_static/IPy_header.png)"
223-
],
224-
"language": "python",
225-
"metadata": {},
226-
"outputs": []
227+
]
227228
},
228229
{
229230
"cell_type": "markdown",
@@ -244,7 +245,8 @@
244245
"```\n",
245246
"\n",
246247
"and images:\n",
247-
"\n"
248+
"\n",
249+
"![This is an image](http://ipython.org/_static/IPy_header.png)"
248250
]
249251
},
250252
{
@@ -372,9 +374,9 @@
372374
"# the keys (video name) and the values (Youtube identifier) \n",
373375
"# of every menu item.\n",
374376
"dw = DropdownWidget(values=OrderedDict([\n",
375-
" ('SciPy 2012', 'iwVvqwLDsJo'), \n",
376-
" ('PyCon 2012', '2G5YTlheCbw'),\n",
377-
" ('SciPy 2013', 'j9YpkSX7NNM')]))\n",
377+
" ('SciPy 2012', 'iwVvqwLDsJo'), \n",
378+
" ('PyCon 2012', '2G5YTlheCbw'),\n",
379+
" ('SciPy 2013', 'j9YpkSX7NNM')]))\n",
378380
"# We create a callback function that displays the requested\n",
379381
"# Youtube video.\n",
380382
"def on_value_change(name, val):\n",

0 commit comments

Comments
 (0)