Skip to content

Commit b7bcfad

Browse files
committed
updated matplotlib notebooks and tweaks to all the numpy ones.
1 parent 7d12201 commit b7bcfad

10 files changed

Lines changed: 1470 additions & 361 deletions

File tree

‎Examples/matplotlib/matplotlib-instructor.ipynb‎

Lines changed: 514 additions & 26 deletions
Large diffs are not rendered by default.

‎Examples/matplotlib/matplotlib-learner.ipynb‎

Lines changed: 32 additions & 132 deletions
Large diffs are not rendered by default.

‎Examples/nosql/test_address_book_model.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
$ mongod --dbpath=mongo_data/
77
"""
88

9-
#import address_book_model as model
10-
#import address_book_zodb as model
9+
# import address_book_model as model
10+
# import address_book_zodb as model
1111
import address_book_mongo as model
1212

1313

1414
a_book = model.create_sample()
1515

16+
1617
def test_name_search():
1718
"""find a single person by first name"""
1819

@@ -22,6 +23,7 @@ def test_name_search():
2223
assert people[0].first_name == 'Chris'
2324
assert people[0].last_name == 'Barker'
2425

26+
2527
def test_name_search2():
2628
people = a_book.find_people('barKer')
2729
first_names = [p.first_name for p in people]
@@ -30,17 +32,17 @@ def test_name_search2():
3032
assert 'Emma' in first_names
3133
assert 'Donna' in first_names
3234

35+
3336
def test_zip_search():
3437
locations = a_book.find_zip_codes(98105)
3538

3639
assert len(locations) == 1
3740
assert locations[0].name == 'Python Certification Program'
3841

42+
3943
def test_state_search():
4044
locations = a_book.find_state('WA')
4145
names = [l.name for l in locations]
4246

4347
assert "The Barkers" in names
4448
assert "Python Certification Program" in names
45-
46-

‎Examples/numpy/broadcasting.ipynb‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"cell_type": "code",
35-
"execution_count": 4,
35+
"execution_count": 3,
3636
"metadata": {
3737
"collapsed": false
3838
},
@@ -104,7 +104,7 @@
104104
"name": "stdout",
105105
"output_type": "stream",
106106
"text": [
107-
"1000 loops, best of 3: 872 µs per loop\n"
107+
"1000 loops, best of 3: 871 µs per loop\n"
108108
]
109109
}
110110
],
@@ -142,8 +142,8 @@
142142
"name": "stdout",
143143
"output_type": "stream",
144144
"text": [
145-
"The slowest run took 35.82 times longer than the fastest. This could mean that an intermediate result is being cached.\n",
146-
"100000 loops, best of 3: 7.24 µs per loop\n"
145+
"The slowest run took 24.07 times longer than the fastest. This could mean that an intermediate result is being cached.\n",
146+
"100000 loops, best of 3: 6.85 µs per loop\n"
147147
]
148148
}
149149
],
@@ -164,7 +164,7 @@
164164
},
165165
{
166166
"cell_type": "code",
167-
"execution_count": 10,
167+
"execution_count": 11,
168168
"metadata": {
169169
"collapsed": false
170170
},
@@ -175,7 +175,7 @@
175175
"array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])"
176176
]
177177
},
178-
"execution_count": 10,
178+
"execution_count": 11,
179179
"metadata": {},
180180
"output_type": "execute_result"
181181
}
@@ -218,7 +218,7 @@
218218
},
219219
{
220220
"cell_type": "code",
221-
"execution_count": 13,
221+
"execution_count": 14,
222222
"metadata": {
223223
"collapsed": false
224224
},
@@ -243,7 +243,7 @@
243243
},
244244
{
245245
"cell_type": "code",
246-
"execution_count": 14,
246+
"execution_count": 15,
247247
"metadata": {
248248
"collapsed": false
249249
},
@@ -264,7 +264,7 @@
264264
},
265265
{
266266
"cell_type": "code",
267-
"execution_count": 15,
267+
"execution_count": 16,
268268
"metadata": {
269269
"collapsed": false
270270
},
@@ -288,7 +288,7 @@
288288
},
289289
{
290290
"cell_type": "code",
291-
"execution_count": 16,
291+
"execution_count": 17,
292292
"metadata": {
293293
"collapsed": false
294294
},
@@ -313,7 +313,7 @@
313313
},
314314
{
315315
"cell_type": "code",
316-
"execution_count": 17,
316+
"execution_count": 18,
317317
"metadata": {
318318
"collapsed": false
319319
},
@@ -334,7 +334,7 @@
334334
},
335335
{
336336
"cell_type": "code",
337-
"execution_count": 21,
337+
"execution_count": 19,
338338
"metadata": {
339339
"collapsed": false
340340
},
@@ -385,7 +385,7 @@
385385
},
386386
{
387387
"cell_type": "code",
388-
"execution_count": 23,
388+
"execution_count": 20,
389389
"metadata": {
390390
"collapsed": true
391391
},
@@ -396,7 +396,7 @@
396396
},
397397
{
398398
"cell_type": "code",
399-
"execution_count": 24,
399+
"execution_count": 21,
400400
"metadata": {
401401
"collapsed": false
402402
},
@@ -415,7 +415,7 @@
415415
},
416416
{
417417
"cell_type": "code",
418-
"execution_count": 25,
418+
"execution_count": 22,
419419
"metadata": {
420420
"collapsed": false
421421
},
@@ -426,7 +426,7 @@
426426
"(3, 4)"
427427
]
428428
},
429-
"execution_count": 25,
429+
"execution_count": 22,
430430
"metadata": {},
431431
"output_type": "execute_result"
432432
}
@@ -437,7 +437,7 @@
437437
},
438438
{
439439
"cell_type": "code",
440-
"execution_count": 26,
440+
"execution_count": 23,
441441
"metadata": {
442442
"collapsed": false
443443
},
@@ -448,7 +448,7 @@
448448
"(4,)"
449449
]
450450
},
451-
"execution_count": 26,
451+
"execution_count": 23,
452452
"metadata": {},
453453
"output_type": "execute_result"
454454
}
@@ -459,7 +459,7 @@
459459
},
460460
{
461461
"cell_type": "code",
462-
"execution_count": 28,
462+
"execution_count": 24,
463463
"metadata": {
464464
"collapsed": false
465465
},
@@ -472,7 +472,7 @@
472472
" [ 800, 1800, 3000, 4400]])"
473473
]
474474
},
475-
"execution_count": 28,
475+
"execution_count": 24,
476476
"metadata": {},
477477
"output_type": "execute_result"
478478
}

0 commit comments

Comments
 (0)