Skip to content

Commit 024bcf6

Browse files
committed
Fix bugs in native code notebook
1 parent bc81299 commit 024bcf6

File tree

7 files changed

+427
-350
lines changed

7 files changed

+427
-350
lines changed

Package installation.ipynb

Lines changed: 42 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:b4a14e5a79a217a0d6dcad516179224edfddda6577958a54e8117a5e9abd2c3c"
4+
"signature": "sha256:2c1a62222a5c8a939d4cc921a1d3494208360eeb9d477853850d16b382adf627"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -12,221 +12,201 @@
1212
"cell_type": "code",
1313
"collapsed": false,
1414
"input": [
15-
"! conda install basemap &> /dev/null"
15+
"! conda install basemap "
1616
],
1717
"language": "python",
1818
"metadata": {},
19-
"outputs": [],
20-
"prompt_number": 29
19+
"outputs": []
2120
},
2221
{
2322
"cell_type": "code",
2423
"collapsed": false,
2524
"input": [
26-
"! pip install git+https://github.com/dabeaz/bitey.git &> /dev/null"
25+
"! pip install git+https://github.com/dabeaz/bitey.git"
2726
],
2827
"language": "python",
2928
"metadata": {},
30-
"outputs": [],
31-
"prompt_number": 13
29+
"outputs": []
3230
},
3331
{
3432
"cell_type": "code",
3533
"collapsed": false,
3634
"input": [
37-
"! pip install psutil &> /dev/null"
35+
"! pip install psutil"
3836
],
3937
"language": "python",
4038
"metadata": {},
41-
"outputs": [],
42-
"prompt_number": 9
39+
"outputs": []
4340
},
4441
{
4542
"cell_type": "code",
4643
"collapsed": false,
4744
"input": [
48-
"! pip install memory_profiler &> /dev/null"
45+
"! pip install memory_profiler"
4946
],
5047
"language": "python",
5148
"metadata": {},
52-
"outputs": [],
53-
"prompt_number": 11
49+
"outputs": []
5450
},
5551
{
5652
"cell_type": "code",
5753
"collapsed": false,
5854
"input": [
59-
"! pip install --pre line-profiler &> /dev/null"
55+
"! pip install --pre line-profiler "
6056
],
6157
"language": "python",
6258
"metadata": {},
63-
"outputs": [],
64-
"prompt_number": 7
59+
"outputs": []
6560
},
6661
{
6762
"cell_type": "code",
6863
"collapsed": false,
6964
"input": [
70-
"! pip install -I openpyxl==1.8.6 &> /dev/null"
65+
"! pip install -I openpyxl==1.8.6 "
7166
],
7267
"language": "python",
7368
"metadata": {},
74-
"outputs": [],
75-
"prompt_number": 5
69+
"outputs": []
7670
},
7771
{
7872
"cell_type": "code",
7973
"collapsed": false,
8074
"input": [
81-
"! pip install git+https://github.com/jakevdp/JSAnimation.git &> /dev/null"
75+
"! pip install git+https://github.com/jakevdp/JSAnimation.git"
8276
],
8377
"language": "python",
8478
"metadata": {},
85-
"outputs": [],
86-
"prompt_number": 3
79+
"outputs": []
8780
},
8881
{
8982
"cell_type": "code",
9083
"collapsed": false,
9184
"input": [
92-
"! pip install oct2py &> /dev/null"
85+
"! pip install oct2py "
9386
],
9487
"language": "python",
9588
"metadata": {},
96-
"outputs": [],
97-
"prompt_number": 40
89+
"outputs": []
9890
},
9991
{
10092
"cell_type": "code",
10193
"collapsed": false,
10294
"input": [
103-
"! pip install rpy2 &> /dev/null"
95+
"! pip install rpy2 "
10496
],
10597
"language": "python",
10698
"metadata": {},
107-
"outputs": [],
108-
"prompt_number": 38
99+
"outputs": []
109100
},
110101
{
111102
"cell_type": "code",
112103
"collapsed": false,
113104
"input": [
114-
"! pip install functional &> /dev/null"
105+
"! pip install functional "
115106
],
116107
"language": "python",
117108
"metadata": {},
118-
"outputs": [],
119-
"prompt_number": 21
109+
"outputs": []
120110
},
121111
{
122112
"cell_type": "code",
123113
"collapsed": false,
124114
"input": [
125-
"! pip install mpld3 &> /dev/null"
115+
"! pip install mpld3 "
126116
],
127117
"language": "python",
128118
"metadata": {},
129-
"outputs": [],
130-
"prompt_number": 24
119+
"outputs": []
131120
},
132121
{
133122
"cell_type": "code",
134123
"collapsed": false,
135124
"input": [
136-
"! pip install statsmodels &> /dev/null"
125+
"! pip install statsmodels"
137126
],
138127
"language": "python",
139128
"metadata": {},
140-
"outputs": [],
141-
"prompt_number": 23
129+
"outputs": []
142130
},
143131
{
144132
"cell_type": "code",
145133
"collapsed": false,
146134
"input": [
147-
"! pip install seaborn &> /dev/null"
135+
"! pip install seaborn "
148136
],
149137
"language": "python",
150138
"metadata": {},
151-
"outputs": [],
152-
"prompt_number": 22
139+
"outputs": []
153140
},
154141
{
155142
"cell_type": "code",
156143
"collapsed": false,
157144
"input": [
158-
"! pip install git+https://github.com/epmoyer/ipy_table &> /dev/null"
145+
"! pip install git+https://github.com/epmoyer/ipy_table "
159146
],
160147
"language": "python",
161148
"metadata": {},
162-
"outputs": [],
163-
"prompt_number": 33
149+
"outputs": []
164150
},
165151
{
166152
"cell_type": "code",
167153
"collapsed": false,
168154
"input": [
169-
" ! pip install git+https://github.com/arokem/python-matlab-bridge.git &> /dev/null"
155+
" ! pip install git+https://github.com/arokem/python-matlab-bridge.git "
170156
],
171157
"language": "python",
172158
"metadata": {},
173-
"outputs": [],
174-
"prompt_number": 25
159+
"outputs": []
175160
},
176161
{
177162
"cell_type": "code",
178163
"collapsed": false,
179164
"input": [
180-
"! pip install git+https://github.com/pymc-devs/pymc &> /dev/null"
165+
"! pip install git+https://github.com/pymc-devs/pymc"
181166
],
182167
"language": "python",
183168
"metadata": {},
184-
"outputs": [],
185-
"prompt_number": 26
169+
"outputs": []
186170
},
187171
{
188172
"cell_type": "code",
189173
"collapsed": false,
190174
"input": [
191-
"! pip install pyzmq &> /dev/null"
175+
"! pip install pyzmq "
192176
],
193177
"language": "python",
194178
"metadata": {},
195-
"outputs": [],
196-
"prompt_number": 30
179+
"outputs": []
197180
},
198181
{
199182
"cell_type": "code",
200183
"collapsed": false,
201184
"input": [
202-
"! pip install emcee &> /dev/null"
185+
"! pip install emcee "
203186
],
204187
"language": "python",
205188
"metadata": {},
206-
"outputs": [],
207-
"prompt_number": 31
189+
"outputs": []
208190
},
209191
{
210192
"cell_type": "code",
211193
"collapsed": false,
212194
"input": [
213-
"! pip install pystan &> /dev/null"
195+
"! pip install pystan "
214196
],
215197
"language": "python",
216198
"metadata": {},
217-
"outputs": [],
218-
"prompt_number": 19
199+
"outputs": []
219200
},
220201
{
221202
"cell_type": "code",
222203
"collapsed": false,
223204
"input": [
224-
"! pip install runipy &> /dev/null"
205+
"! pip install runipy"
225206
],
226207
"language": "python",
227208
"metadata": {},
228-
"outputs": [],
229-
"prompt_number": 36
209+
"outputs": []
230210
},
231211
{
232212
"cell_type": "code",
@@ -239,44 +219,7 @@
239219
],
240220
"language": "python",
241221
"metadata": {},
242-
"outputs": [
243-
{
244-
"output_type": "stream",
245-
"stream": "stdout",
246-
"text": [
247-
"Installed fortranmagic.py. To use it, type:\n",
248-
" %load_ext fortranmagic\n",
249-
"Installed biteymagic.py. To use it, type:"
250-
]
251-
},
252-
{
253-
"output_type": "stream",
254-
"stream": "stdout",
255-
"text": [
256-
"\n",
257-
" %load_ext biteymagic\n",
258-
"Installed sqlitemagic.py. To use it, type:"
259-
]
260-
},
261-
{
262-
"output_type": "stream",
263-
"stream": "stdout",
264-
"text": [
265-
"\n",
266-
" %load_ext sqlitemagic\n",
267-
"Installed version_information.py. To use it, type:"
268-
]
269-
},
270-
{
271-
"output_type": "stream",
272-
"stream": "stdout",
273-
"text": [
274-
"\n",
275-
" %load_ext version_information\n"
276-
]
277-
}
278-
],
279-
"prompt_number": 15
222+
"outputs": []
280223
},
281224
{
282225
"cell_type": "code",

lessons/Bayesian models.ipynb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"cell_type": "code",
3737
"collapsed": false,
3838
"input": [
39-
"%matplotlib inline"
39+
"%matplotlib inline\n",
40+
"import matplotlib.pyplot as plt\n",
41+
"import numpy as np"
4042
],
4143
"language": "python",
4244
"metadata": {},
@@ -47,9 +49,6 @@
4749
"cell_type": "code",
4850
"collapsed": false,
4951
"input": [
50-
"import numpy as np\n",
51-
"from numba import jit\n",
52-
"import matplotlib.pyplot as plt\n",
5352
"from matplotlib import animation\n",
5453
"import pandas as pd\n",
5554
"import statsmodels.api as sm\n",
@@ -59,7 +58,6 @@
5958
"warnings.filterwarnings(\"ignore\")\n",
6059
"\n",
6160
"# define invlogit function\n",
62-
"@jit\n",
6361
"def invlogit(x):\n",
6462
" return pm.exp(x) / (1 + pm.exp(x))"
6563
],

0 commit comments

Comments
 (0)