Skip to content

Commit e1536a5

Browse files
committed
run in Linux
1 parent 1ea79a3 commit e1536a5

File tree

2 files changed

+53
-87
lines changed

2 files changed

+53
-87
lines changed

nbs/03a_parallel.ipynb

Lines changed: 52 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 2,
14+
"execution_count": null,
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
@@ -35,7 +35,7 @@
3535
},
3636
{
3737
"cell_type": "code",
38-
"execution_count": 3,
38+
"execution_count": null,
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -55,7 +55,7 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 4,
58+
"execution_count": null,
5959
"metadata": {},
6060
"outputs": [],
6161
"source": [
@@ -72,7 +72,7 @@
7272
},
7373
{
7474
"cell_type": "code",
75-
"execution_count": 5,
75+
"execution_count": null,
7676
"metadata": {},
7777
"outputs": [
7878
{
@@ -102,7 +102,7 @@
102102
},
103103
{
104104
"cell_type": "code",
105-
"execution_count": 6,
105+
"execution_count": null,
106106
"metadata": {},
107107
"outputs": [],
108108
"source": [
@@ -114,7 +114,7 @@
114114
},
115115
{
116116
"cell_type": "code",
117-
"execution_count": 7,
117+
"execution_count": null,
118118
"metadata": {},
119119
"outputs": [
120120
{
@@ -142,7 +142,7 @@
142142
},
143143
{
144144
"cell_type": "code",
145-
"execution_count": 8,
145+
"execution_count": null,
146146
"metadata": {},
147147
"outputs": [],
148148
"source": [
@@ -170,7 +170,7 @@
170170
},
171171
{
172172
"cell_type": "code",
173-
"execution_count": 9,
173+
"execution_count": null,
174174
"metadata": {},
175175
"outputs": [],
176176
"source": [
@@ -188,7 +188,7 @@
188188
},
189189
{
190190
"cell_type": "code",
191-
"execution_count": 10,
191+
"execution_count": null,
192192
"metadata": {},
193193
"outputs": [],
194194
"source": [
@@ -204,7 +204,7 @@
204204
},
205205
{
206206
"cell_type": "code",
207-
"execution_count": 11,
207+
"execution_count": null,
208208
"metadata": {},
209209
"outputs": [],
210210
"source": [
@@ -229,15 +229,15 @@
229229
},
230230
{
231231
"cell_type": "code",
232-
"execution_count": 12,
232+
"execution_count": null,
233233
"metadata": {},
234234
"outputs": [
235235
{
236236
"data": {
237237
"text/markdown": [
238238
"<h4 id=\"ThreadPoolExecutor\" class=\"doc_header\"><code>class</code> <code>ThreadPoolExecutor</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n",
239239
"\n",
240-
"> <code>ThreadPoolExecutor</code>(**`max_workers`**=*`8`*, **`on_exc`**=*`print`*, **`pause`**=*`0`*, **\\*\\*`kwargs`**) :: [`ThreadPoolExecutor`](/parallel.html#ThreadPoolExecutor)\n",
240+
"> <code>ThreadPoolExecutor</code>(**`max_workers`**=*`20`*, **`on_exc`**=*`print`*, **`pause`**=*`0`*, **\\*\\*`kwargs`**) :: [`ThreadPoolExecutor`](/parallel.html#ThreadPoolExecutor)\n",
241241
"\n",
242242
"Same as Python's ThreadPoolExecutor, except can pass `max_workers==0` for serial execution"
243243
],
@@ -255,7 +255,7 @@
255255
},
256256
{
257257
"cell_type": "code",
258-
"execution_count": 13,
258+
"execution_count": null,
259259
"metadata": {},
260260
"outputs": [],
261261
"source": [
@@ -284,15 +284,15 @@
284284
},
285285
{
286286
"cell_type": "code",
287-
"execution_count": 14,
287+
"execution_count": null,
288288
"metadata": {},
289289
"outputs": [
290290
{
291291
"data": {
292292
"text/markdown": [
293293
"<h4 id=\"ProcessPoolExecutor\" class=\"doc_header\"><code>class</code> <code>ProcessPoolExecutor</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n",
294294
"\n",
295-
"> <code>ProcessPoolExecutor</code>(**`max_workers`**=*`8`*, **`on_exc`**=*`print`*, **`pause`**=*`0`*, **\\*\\*`kwargs`**) :: [`ProcessPoolExecutor`](/parallel.html#ProcessPoolExecutor)\n",
295+
"> <code>ProcessPoolExecutor</code>(**`max_workers`**=*`20`*, **`on_exc`**=*`print`*, **`pause`**=*`0`*, **\\*\\*`kwargs`**) :: [`ProcessPoolExecutor`](/parallel.html#ProcessPoolExecutor)\n",
296296
"\n",
297297
"Same as Python's ProcessPoolExecutor, except can pass `max_workers==0` for serial execution"
298298
],
@@ -310,7 +310,7 @@
310310
},
311311
{
312312
"cell_type": "code",
313-
"execution_count": 15,
313+
"execution_count": null,
314314
"metadata": {},
315315
"outputs": [],
316316
"source": [
@@ -321,7 +321,7 @@
321321
},
322322
{
323323
"cell_type": "code",
324-
"execution_count": 16,
324+
"execution_count": null,
325325
"metadata": {},
326326
"outputs": [],
327327
"source": [
@@ -340,7 +340,7 @@
340340
},
341341
{
342342
"cell_type": "code",
343-
"execution_count": 17,
343+
"execution_count": null,
344344
"metadata": {},
345345
"outputs": [],
346346
"source": [
@@ -354,20 +354,9 @@
354354
},
355355
{
356356
"cell_type": "code",
357-
"execution_count": 18,
357+
"execution_count": null,
358358
"metadata": {},
359-
"outputs": [
360-
{
361-
"name": "stdout",
362-
"output_type": "stream",
363-
"text": [
364-
"Due to IPython and Windows limitation, python multiprocessing isn't available now.\n",
365-
"So `max_workers` has to be changed to 0 to avoid getting stuck\n",
366-
"Due to IPython and Windows limitation, python multiprocessing isn't available now.\n",
367-
"So `max_workers` has to be changed to 0 to avoid getting stuck\n"
368-
]
369-
}
370-
],
359+
"outputs": [],
371360
"source": [
372361
"inp,exp = range(50),range(1,51)\n",
373362
"\n",
@@ -387,7 +376,7 @@
387376
},
388377
{
389378
"cell_type": "code",
390-
"execution_count": 19,
379+
"execution_count": null,
391380
"metadata": {},
392381
"outputs": [],
393382
"source": [
@@ -396,20 +385,18 @@
396385
},
397386
{
398387
"cell_type": "code",
399-
"execution_count": 20,
388+
"execution_count": null,
400389
"metadata": {},
401390
"outputs": [
402391
{
403392
"name": "stdout",
404393
"output_type": "stream",
405394
"text": [
406-
"Due to IPython and Windows limitation, python multiprocessing isn't available now.\n",
407-
"So `max_workers` has to be changed to 0 to avoid getting stuck\n",
408-
"0 2021-02-22 21:31:13.122859\n",
409-
"1 2021-02-22 21:31:13.138863\n",
410-
"2 2021-02-22 21:31:13.154861\n",
411-
"3 2021-02-22 21:31:13.170863\n",
412-
"4 2021-02-22 21:31:13.186864\n"
395+
"0 2021-02-23 06:38:58.778425\n",
396+
"1 2021-02-23 06:38:59.028804\n",
397+
"2 2021-02-23 06:38:59.280227\n",
398+
"3 2021-02-23 06:38:59.530889\n",
399+
"4 2021-02-23 06:38:59.781011\n"
413400
]
414401
}
415402
],
@@ -430,7 +417,7 @@
430417
},
431418
{
432419
"cell_type": "code",
433-
"execution_count": 21,
420+
"execution_count": null,
434421
"metadata": {},
435422
"outputs": [],
436423
"source": [
@@ -445,7 +432,7 @@
445432
},
446433
{
447434
"cell_type": "code",
448-
"execution_count": 22,
435+
"execution_count": null,
449436
"metadata": {},
450437
"outputs": [],
451438
"source": [
@@ -458,7 +445,7 @@
458445
},
459446
{
460447
"cell_type": "code",
461-
"execution_count": 23,
448+
"execution_count": null,
462449
"metadata": {},
463450
"outputs": [],
464451
"source": [
@@ -480,16 +467,18 @@
480467
},
481468
{
482469
"cell_type": "code",
483-
"execution_count": 24,
470+
"execution_count": null,
484471
"metadata": {},
485472
"outputs": [
486473
{
487-
"name": "stdout",
488-
"output_type": "stream",
489-
"text": [
490-
"Due to IPython and Windows limitation, python multiprocessing isn't available now.\n",
491-
"So `n_workers` has to be changed to 0 to avoid getting stuck\n"
492-
]
474+
"data": {
475+
"text/html": [],
476+
"text/plain": [
477+
"<IPython.core.display.HTML object>"
478+
]
479+
},
480+
"metadata": {},
481+
"output_type": "display_data"
493482
}
494483
],
495484
"source": [
@@ -516,16 +505,18 @@
516505
},
517506
{
518507
"cell_type": "code",
519-
"execution_count": 25,
508+
"execution_count": null,
520509
"metadata": {},
521510
"outputs": [
522511
{
523-
"name": "stdout",
524-
"output_type": "stream",
525-
"text": [
526-
"Due to IPython and Windows limitation, python multiprocessing isn't available now.\n",
527-
"So `n_workers` has to be changed to 0 to avoid getting stuck\n"
528-
]
512+
"data": {
513+
"text/html": [],
514+
"text/plain": [
515+
"<IPython.core.display.HTML object>"
516+
]
517+
},
518+
"metadata": {},
519+
"output_type": "display_data"
529520
}
530521
],
531522
"source": [
@@ -552,7 +543,7 @@
552543
},
553544
{
554545
"cell_type": "code",
555-
"execution_count": 26,
546+
"execution_count": null,
556547
"metadata": {},
557548
"outputs": [
558549
{
@@ -570,8 +561,7 @@
570561
"Converted 07_meta.ipynb.\n",
571562
"Converted 08_script.ipynb.\n",
572563
"Converted index.ipynb.\n",
573-
"Converted parallel_win.ipynb.\n",
574-
"Converted Untitled.ipynb.\n"
564+
"Converted parallel_win.ipynb.\n"
575565
]
576566
}
577567
],
@@ -583,7 +573,7 @@
583573
},
584574
{
585575
"cell_type": "code",
586-
"execution_count": 27,
576+
"execution_count": null,
587577
"metadata": {},
588578
"outputs": [],
589579
"source": [
@@ -611,18 +601,6 @@
611601
"display_name": "Python 3",
612602
"language": "python",
613603
"name": "python3"
614-
},
615-
"language_info": {
616-
"codemirror_mode": {
617-
"name": "ipython",
618-
"version": 3
619-
},
620-
"file_extension": ".py",
621-
"mimetype": "text/x-python",
622-
"name": "python",
623-
"nbconvert_exporter": "python",
624-
"pygments_lexer": "ipython3",
625-
"version": "3.8.0"
626604
}
627605
},
628606
"nbformat": 4,

nbs/parallel_win.ipynb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 5,
5+
"execution_count": null,
66
"id": "informational-central",
77
"metadata": {},
88
"outputs": [],
@@ -31,18 +31,6 @@
3131
"display_name": "Python 3",
3232
"language": "python",
3333
"name": "python3"
34-
},
35-
"language_info": {
36-
"codemirror_mode": {
37-
"name": "ipython",
38-
"version": 3
39-
},
40-
"file_extension": ".py",
41-
"mimetype": "text/x-python",
42-
"name": "python",
43-
"nbconvert_exporter": "python",
44-
"pygments_lexer": "ipython3",
45-
"version": "3.8.0"
4634
}
4735
},
4836
"nbformat": 4,

0 commit comments

Comments
 (0)