Show More
@@ -0,0 +1,6 b'' | |||||
|
1 | # A simple IPython script that provides Notebook links to .py files in the cwd | |||
|
2 | ||||
|
3 | from IPython.display import FileLink, display | |||
|
4 | files =!ls *.py | |||
|
5 | for f in files: | |||
|
6 | display(FileLink(f)) No newline at end of file |
@@ -0,0 +1,6 b'' | |||||
|
1 | # A simple IPython script that lists files in all subdirs | |||
|
2 | ||||
|
3 | from IPython.display import FileLinks, display | |||
|
4 | dirs =!ls -d */ | |||
|
5 | for d in dirs: | |||
|
6 | display(FileLinks(d)) No newline at end of file |
@@ -1,124 +1,111 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "", |
|
3 | "name": "", | |
4 | "signature": "sha256:2fc11a62b83396569f64bfde2516a0219a62108a64f920dedb7217a63d67a9bc" |
|
4 | "signature": "sha256:a805b2c46cc61ed300cc06162f057e5c2f934cf3df10daa27ca885a1ab74674a" | |
5 | }, |
|
5 | }, | |
6 | "nbformat": 3, |
|
6 | "nbformat": 3, | |
7 | "nbformat_minor": 0, |
|
7 | "nbformat_minor": 0, | |
8 | "worksheets": [ |
|
8 | "worksheets": [ | |
9 | { |
|
9 | { | |
10 | "cells": [ |
|
10 | "cells": [ | |
11 | { |
|
11 | { | |
12 | "cell_type": "markdown", |
|
12 | "cell_type": "markdown", | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "<img src=\"../images/ipython_logo.png\">" |
|
15 | "<img src=\"../images/ipython_logo.png\">" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "markdown", |
|
19 | "cell_type": "markdown", | |
20 | "metadata": {}, |
|
20 | "metadata": {}, | |
21 | "source": [ |
|
21 | "source": [ | |
22 | "Back to the main [Index](../Index.ipynb)" |
|
22 | "Back to the main [Index](../Index.ipynb)" | |
23 | ] |
|
23 | ] | |
24 | }, |
|
24 | }, | |
25 | { |
|
25 | { | |
26 | "cell_type": "heading", |
|
26 | "cell_type": "heading", | |
27 | "level": 1, |
|
27 | "level": 1, | |
28 | "metadata": {}, |
|
28 | "metadata": {}, | |
29 | "source": [ |
|
29 | "source": [ | |
30 | "Customization" |
|
30 | "Customization" | |
31 | ] |
|
31 | ] | |
32 | }, |
|
32 | }, | |
33 | { |
|
33 | { | |
34 | "cell_type": "markdown", |
|
34 | "cell_type": "markdown", | |
35 | "metadata": {}, |
|
35 | "metadata": {}, | |
36 | "source": [ |
|
36 | "source": [ | |
37 | "IPython has rich APIs for customization. Many behaviors of the different IPython applications can be configured using command line arguments or configuration files. IPython's core syntax and command line features can also be customized through input filters, custom magic commands, etc." |
|
37 | "IPython has rich APIs for customization. Many behaviors of the different IPython applications can be configured using command line arguments or configuration files. IPython's core syntax and command line features can also be customized through input filters, custom magic commands, etc." | |
38 | ] |
|
38 | ] | |
39 | }, |
|
39 | }, | |
40 | { |
|
40 | { | |
41 | "cell_type": "heading", |
|
41 | "cell_type": "heading", | |
42 | "level": 2, |
|
42 | "level": 2, | |
43 | "metadata": {}, |
|
43 | "metadata": {}, | |
44 | "source": [ |
|
44 | "source": [ | |
45 | "Tutorials" |
|
45 | "Tutorials" | |
46 | ] |
|
46 | ] | |
47 | }, |
|
47 | }, | |
48 | { |
|
48 | { | |
49 | "cell_type": "markdown", |
|
49 | "cell_type": "markdown", | |
50 | "metadata": {}, |
|
50 | "metadata": {}, | |
51 | "source": [ |
|
51 | "source": [ | |
52 | "Coming soon." |
|
52 | "Coming soon." | |
53 | ] |
|
53 | ] | |
54 | }, |
|
54 | }, | |
55 | { |
|
55 | { | |
56 | "cell_type": "heading", |
|
56 | "cell_type": "heading", | |
57 | "level": 2, |
|
57 | "level": 2, | |
58 | "metadata": {}, |
|
58 | "metadata": {}, | |
59 | "source": [ |
|
59 | "source": [ | |
60 | "Examples" |
|
60 | "Examples" | |
61 | ] |
|
61 | ] | |
62 | }, |
|
62 | }, | |
63 | { |
|
63 | { | |
64 | "cell_type": "markdown", |
|
64 | "cell_type": "markdown", | |
65 | "metadata": {}, |
|
65 | "metadata": {}, | |
66 | "source": [ |
|
66 | "source": [ | |
67 | "Coming soon." |
|
67 | "Coming soon." | |
68 | ] |
|
68 | ] | |
69 | }, |
|
69 | }, | |
70 | { |
|
70 | { | |
71 | "cell_type": "heading", |
|
71 | "cell_type": "heading", | |
72 | "level": 2, |
|
72 | "level": 2, | |
73 | "metadata": {}, |
|
73 | "metadata": {}, | |
74 | "source": [ |
|
74 | "source": [ | |
75 | "Non-notebook examples" |
|
75 | "Non-notebook examples" | |
76 | ] |
|
76 | ] | |
77 | }, |
|
77 | }, | |
78 | { |
|
78 | { | |
79 | "cell_type": "markdown", |
|
79 | "cell_type": "markdown", | |
80 | "metadata": {}, |
|
80 | "metadata": {}, | |
81 | "source": [ |
|
81 | "source": [ | |
82 | "This directory also contains examples that are regular Python (`.py`) files." |
|
82 | "This directory also contains examples that are regular Python (`.py`) files." | |
83 | ] |
|
83 | ] | |
84 | }, |
|
84 | }, | |
85 | { |
|
85 | { | |
86 | "cell_type": "code", |
|
86 | "cell_type": "code", | |
87 | "collapsed": false, |
|
87 | "collapsed": false, | |
88 | "input": [ |
|
88 | "input": [ | |
89 | "from IPython.display import FileLink, display" |
|
89 | "%run ../list_pyfiles.ipy" | |
90 | ], |
|
|||
91 | "language": "python", |
|
|||
92 | "metadata": {}, |
|
|||
93 | "outputs": [], |
|
|||
94 | "prompt_number": 1 |
|
|||
95 | }, |
|
|||
96 | { |
|
|||
97 | "cell_type": "code", |
|
|||
98 | "collapsed": false, |
|
|||
99 | "input": [ |
|
|||
100 | "files =!ls *.py\n", |
|
|||
101 | "for f in files:\n", |
|
|||
102 | " display(FileLink(f))" |
|
|||
103 | ], |
|
90 | ], | |
104 | "language": "python", |
|
91 | "language": "python", | |
105 | "metadata": {}, |
|
92 | "metadata": {}, | |
106 | "outputs": [ |
|
93 | "outputs": [ | |
107 | { |
|
94 | { | |
108 | "html": [ |
|
95 | "html": [ | |
109 | "<a href='appconfig.py' target='_blank'>appconfig.py</a><br>" |
|
96 | "<a href='appconfig.py' target='_blank'>appconfig.py</a><br>" | |
110 | ], |
|
97 | ], | |
111 | "metadata": {}, |
|
98 | "metadata": {}, | |
112 | "output_type": "display_data", |
|
99 | "output_type": "display_data", | |
113 | "text": [ |
|
100 | "text": [ | |
114 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Customization/appconfig.py" |
|
101 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Customization/appconfig.py" | |
115 | ] |
|
102 | ] | |
116 | } |
|
103 | } | |
117 | ], |
|
104 | ], | |
118 | "prompt_number": 2 |
|
105 | "prompt_number": 2 | |
119 | } |
|
106 | } | |
120 | ], |
|
107 | ], | |
121 | "metadata": {} |
|
108 | "metadata": {} | |
122 | } |
|
109 | } | |
123 | ] |
|
110 | ] | |
124 | } No newline at end of file |
|
111 | } |
@@ -1,201 +1,188 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "", |
|
3 | "name": "", | |
4 | "signature": "sha256:78b90d18791f32ff5abbbf5b4a9846ad8fad0a46af65125faac15f86f68da57f" |
|
4 | "signature": "sha256:29db13dc7016ac387a7b8f535ee31c19456004997ba93c328fa0abae41704e5f" | |
5 | }, |
|
5 | }, | |
6 | "nbformat": 3, |
|
6 | "nbformat": 3, | |
7 | "nbformat_minor": 0, |
|
7 | "nbformat_minor": 0, | |
8 | "worksheets": [ |
|
8 | "worksheets": [ | |
9 | { |
|
9 | { | |
10 | "cells": [ |
|
10 | "cells": [ | |
11 | { |
|
11 | { | |
12 | "cell_type": "markdown", |
|
12 | "cell_type": "markdown", | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "<img src=\"../images/ipython_logo.png\">" |
|
15 | "<img src=\"../images/ipython_logo.png\">" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "markdown", |
|
19 | "cell_type": "markdown", | |
20 | "metadata": {}, |
|
20 | "metadata": {}, | |
21 | "source": [ |
|
21 | "source": [ | |
22 | "Back to the main [Index](../Index.ipynb)" |
|
22 | "Back to the main [Index](../Index.ipynb)" | |
23 | ] |
|
23 | ] | |
24 | }, |
|
24 | }, | |
25 | { |
|
25 | { | |
26 | "cell_type": "heading", |
|
26 | "cell_type": "heading", | |
27 | "level": 1, |
|
27 | "level": 1, | |
28 | "metadata": {}, |
|
28 | "metadata": {}, | |
29 | "source": [ |
|
29 | "source": [ | |
30 | "Embedding IPython Into Other Applications" |
|
30 | "Embedding IPython Into Other Applications" | |
31 | ] |
|
31 | ] | |
32 | }, |
|
32 | }, | |
33 | { |
|
33 | { | |
34 | "cell_type": "markdown", |
|
34 | "cell_type": "markdown", | |
35 | "metadata": {}, |
|
35 | "metadata": {}, | |
36 | "source": [ |
|
36 | "source": [ | |
37 | "The architecture of IPython is built with reusable components. These components include:\n", |
|
37 | "The architecture of IPython is built with reusable components. These components include:\n", | |
38 | "\n", |
|
38 | "\n", | |
39 | "* The configuration system for processing command line arguments and configuration files\n", |
|
39 | "* The configuration system for processing command line arguments and configuration files\n", | |
40 | "* The IPython `InteractiveShell` object that provides the core interactive features across the entire code base\n", |
|
40 | "* The IPython `InteractiveShell` object that provides the core interactive features across the entire code base\n", | |
41 | "* The IPython kernel, which provides the capabilities of the `InteractiveShell` object over a ZeroMQ/JSON based message protocol to various frontends\n", |
|
41 | "* The IPython kernel, which provides the capabilities of the `InteractiveShell` object over a ZeroMQ/JSON based message protocol to various frontends\n", | |
42 | "* The IPython frontends (Notebook, Qt Console, Console, Terminal)\n", |
|
42 | "* The IPython frontends (Notebook, Qt Console, Console, Terminal)\n", | |
43 | "\n", |
|
43 | "\n", | |
44 | "These components can be embedded into other applications." |
|
44 | "These components can be embedded into other applications." | |
45 | ] |
|
45 | ] | |
46 | }, |
|
46 | }, | |
47 | { |
|
47 | { | |
48 | "cell_type": "heading", |
|
48 | "cell_type": "heading", | |
49 | "level": 2, |
|
49 | "level": 2, | |
50 | "metadata": {}, |
|
50 | "metadata": {}, | |
51 | "source": [ |
|
51 | "source": [ | |
52 | "Tutorials" |
|
52 | "Tutorials" | |
53 | ] |
|
53 | ] | |
54 | }, |
|
54 | }, | |
55 | { |
|
55 | { | |
56 | "cell_type": "markdown", |
|
56 | "cell_type": "markdown", | |
57 | "metadata": {}, |
|
57 | "metadata": {}, | |
58 | "source": [ |
|
58 | "source": [ | |
59 | "Coming soon." |
|
59 | "Coming soon." | |
60 | ] |
|
60 | ] | |
61 | }, |
|
61 | }, | |
62 | { |
|
62 | { | |
63 | "cell_type": "heading", |
|
63 | "cell_type": "heading", | |
64 | "level": 2, |
|
64 | "level": 2, | |
65 | "metadata": {}, |
|
65 | "metadata": {}, | |
66 | "source": [ |
|
66 | "source": [ | |
67 | "Examples" |
|
67 | "Examples" | |
68 | ] |
|
68 | ] | |
69 | }, |
|
69 | }, | |
70 | { |
|
70 | { | |
71 | "cell_type": "markdown", |
|
71 | "cell_type": "markdown", | |
72 | "metadata": {}, |
|
72 | "metadata": {}, | |
73 | "source": [ |
|
73 | "source": [ | |
74 | "Coming soon." |
|
74 | "Coming soon." | |
75 | ] |
|
75 | ] | |
76 | }, |
|
76 | }, | |
77 | { |
|
77 | { | |
78 | "cell_type": "heading", |
|
78 | "cell_type": "heading", | |
79 | "level": 2, |
|
79 | "level": 2, | |
80 | "metadata": {}, |
|
80 | "metadata": {}, | |
81 | "source": [ |
|
81 | "source": [ | |
82 | "Non-notebook examples" |
|
82 | "Non-notebook examples" | |
83 | ] |
|
83 | ] | |
84 | }, |
|
84 | }, | |
85 | { |
|
85 | { | |
86 | "cell_type": "markdown", |
|
86 | "cell_type": "markdown", | |
87 | "metadata": {}, |
|
87 | "metadata": {}, | |
88 | "source": [ |
|
88 | "source": [ | |
89 | "This directory also contains examples that are regular Python (`.py`) files." |
|
89 | "This directory also contains examples that are regular Python (`.py`) files." | |
90 | ] |
|
90 | ] | |
91 | }, |
|
91 | }, | |
92 | { |
|
92 | { | |
93 | "cell_type": "code", |
|
93 | "cell_type": "code", | |
94 | "collapsed": false, |
|
94 | "collapsed": false, | |
95 | "input": [ |
|
95 | "input": [ | |
96 | "from IPython.display import FileLink, display" |
|
96 | "%run ../list_pyfiles.ipy" | |
97 | ], |
|
|||
98 | "language": "python", |
|
|||
99 | "metadata": {}, |
|
|||
100 | "outputs": [], |
|
|||
101 | "prompt_number": 2 |
|
|||
102 | }, |
|
|||
103 | { |
|
|||
104 | "cell_type": "code", |
|
|||
105 | "collapsed": false, |
|
|||
106 | "input": [ |
|
|||
107 | "files =!ls *.py\n", |
|
|||
108 | "for f in files:\n", |
|
|||
109 | " display(FileLink(f))" |
|
|||
110 | ], |
|
97 | ], | |
111 | "language": "python", |
|
98 | "language": "python", | |
112 | "metadata": {}, |
|
99 | "metadata": {}, | |
113 | "outputs": [ |
|
100 | "outputs": [ | |
114 | { |
|
101 | { | |
115 | "html": [ |
|
102 | "html": [ | |
116 | "<a href='embed_class_long.py' target='_blank'>embed_class_long.py</a><br>" |
|
103 | "<a href='embed_class_long.py' target='_blank'>embed_class_long.py</a><br>" | |
117 | ], |
|
104 | ], | |
118 | "metadata": {}, |
|
105 | "metadata": {}, | |
119 | "output_type": "display_data", |
|
106 | "output_type": "display_data", | |
120 | "text": [ |
|
107 | "text": [ | |
121 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/embed_class_long.py" |
|
108 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/embed_class_long.py" | |
122 | ] |
|
109 | ] | |
123 | }, |
|
110 | }, | |
124 | { |
|
111 | { | |
125 | "html": [ |
|
112 | "html": [ | |
126 | "<a href='embed_class_short.py' target='_blank'>embed_class_short.py</a><br>" |
|
113 | "<a href='embed_class_short.py' target='_blank'>embed_class_short.py</a><br>" | |
127 | ], |
|
114 | ], | |
128 | "metadata": {}, |
|
115 | "metadata": {}, | |
129 | "output_type": "display_data", |
|
116 | "output_type": "display_data", | |
130 | "text": [ |
|
117 | "text": [ | |
131 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/embed_class_short.py" |
|
118 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/embed_class_short.py" | |
132 | ] |
|
119 | ] | |
133 | }, |
|
120 | }, | |
134 | { |
|
121 | { | |
135 | "html": [ |
|
122 | "html": [ | |
136 | "<a href='embed_function.py' target='_blank'>embed_function.py</a><br>" |
|
123 | "<a href='embed_function.py' target='_blank'>embed_function.py</a><br>" | |
137 | ], |
|
124 | ], | |
138 | "metadata": {}, |
|
125 | "metadata": {}, | |
139 | "output_type": "display_data", |
|
126 | "output_type": "display_data", | |
140 | "text": [ |
|
127 | "text": [ | |
141 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/embed_function.py" |
|
128 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/embed_function.py" | |
142 | ] |
|
129 | ] | |
143 | }, |
|
130 | }, | |
144 | { |
|
131 | { | |
145 | "html": [ |
|
132 | "html": [ | |
146 | "<a href='inprocess_qtconsole.py' target='_blank'>inprocess_qtconsole.py</a><br>" |
|
133 | "<a href='inprocess_qtconsole.py' target='_blank'>inprocess_qtconsole.py</a><br>" | |
147 | ], |
|
134 | ], | |
148 | "metadata": {}, |
|
135 | "metadata": {}, | |
149 | "output_type": "display_data", |
|
136 | "output_type": "display_data", | |
150 | "text": [ |
|
137 | "text": [ | |
151 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/inprocess_qtconsole.py" |
|
138 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/inprocess_qtconsole.py" | |
152 | ] |
|
139 | ] | |
153 | }, |
|
140 | }, | |
154 | { |
|
141 | { | |
155 | "html": [ |
|
142 | "html": [ | |
156 | "<a href='inprocess_terminal.py' target='_blank'>inprocess_terminal.py</a><br>" |
|
143 | "<a href='inprocess_terminal.py' target='_blank'>inprocess_terminal.py</a><br>" | |
157 | ], |
|
144 | ], | |
158 | "metadata": {}, |
|
145 | "metadata": {}, | |
159 | "output_type": "display_data", |
|
146 | "output_type": "display_data", | |
160 | "text": [ |
|
147 | "text": [ | |
161 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/inprocess_terminal.py" |
|
148 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/inprocess_terminal.py" | |
162 | ] |
|
149 | ] | |
163 | }, |
|
150 | }, | |
164 | { |
|
151 | { | |
165 | "html": [ |
|
152 | "html": [ | |
166 | "<a href='internal_ipkernel.py' target='_blank'>internal_ipkernel.py</a><br>" |
|
153 | "<a href='internal_ipkernel.py' target='_blank'>internal_ipkernel.py</a><br>" | |
167 | ], |
|
154 | ], | |
168 | "metadata": {}, |
|
155 | "metadata": {}, | |
169 | "output_type": "display_data", |
|
156 | "output_type": "display_data", | |
170 | "text": [ |
|
157 | "text": [ | |
171 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/internal_ipkernel.py" |
|
158 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/internal_ipkernel.py" | |
172 | ] |
|
159 | ] | |
173 | }, |
|
160 | }, | |
174 | { |
|
161 | { | |
175 | "html": [ |
|
162 | "html": [ | |
176 | "<a href='ipkernel_qtapp.py' target='_blank'>ipkernel_qtapp.py</a><br>" |
|
163 | "<a href='ipkernel_qtapp.py' target='_blank'>ipkernel_qtapp.py</a><br>" | |
177 | ], |
|
164 | ], | |
178 | "metadata": {}, |
|
165 | "metadata": {}, | |
179 | "output_type": "display_data", |
|
166 | "output_type": "display_data", | |
180 | "text": [ |
|
167 | "text": [ | |
181 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/ipkernel_qtapp.py" |
|
168 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/ipkernel_qtapp.py" | |
182 | ] |
|
169 | ] | |
183 | }, |
|
170 | }, | |
184 | { |
|
171 | { | |
185 | "html": [ |
|
172 | "html": [ | |
186 | "<a href='ipkernel_wxapp.py' target='_blank'>ipkernel_wxapp.py</a><br>" |
|
173 | "<a href='ipkernel_wxapp.py' target='_blank'>ipkernel_wxapp.py</a><br>" | |
187 | ], |
|
174 | ], | |
188 | "metadata": {}, |
|
175 | "metadata": {}, | |
189 | "output_type": "display_data", |
|
176 | "output_type": "display_data", | |
190 | "text": [ |
|
177 | "text": [ | |
191 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/ipkernel_wxapp.py" |
|
178 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Embedding/ipkernel_wxapp.py" | |
192 | ] |
|
179 | ] | |
193 | } |
|
180 | } | |
194 | ], |
|
181 | ], | |
195 |
"prompt_number": |
|
182 | "prompt_number": 1 | |
196 | } |
|
183 | } | |
197 | ], |
|
184 | ], | |
198 | "metadata": {} |
|
185 | "metadata": {} | |
199 | } |
|
186 | } | |
200 | ] |
|
187 | ] | |
201 | } No newline at end of file |
|
188 | } |
@@ -1,352 +1,358 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "", |
|
3 | "name": "", | |
4 | "signature": "sha256:178b84c6ec2464bc76d655fb49d06913fcdcac5aad9e3442b6039c219f583e49" |
|
4 | "signature": "sha256:481e128e553ec13e039f3e3f5e567cc3caffe391b78b9821ee883fb8770ebc82" | |
5 | }, |
|
5 | }, | |
6 | "nbformat": 3, |
|
6 | "nbformat": 3, | |
7 | "nbformat_minor": 0, |
|
7 | "nbformat_minor": 0, | |
8 | "worksheets": [ |
|
8 | "worksheets": [ | |
9 | { |
|
9 | { | |
10 | "cells": [ |
|
10 | "cells": [ | |
11 | { |
|
11 | { | |
|
12 | "cell_type": "heading", | |||
|
13 | "level": 1, | |||
|
14 | "metadata": {}, | |||
|
15 | "source": [ | |||
|
16 | "Background Jobs" | |||
|
17 | ] | |||
|
18 | }, | |||
|
19 | { | |||
12 | "cell_type": "markdown", |
|
20 | "cell_type": "markdown", | |
13 | "metadata": {}, |
|
21 | "metadata": {}, | |
14 | "source": [ |
|
22 | "source": [ | |
15 | "# Simple interactive bacgkround jobs with IPython\n", |
|
|||
16 | "\n", |
|
|||
17 | "We start by loading the `backgroundjobs` library and defining a few trivial functions to illustrate things with." |
|
23 | "We start by loading the `backgroundjobs` library and defining a few trivial functions to illustrate things with." | |
18 | ] |
|
24 | ] | |
19 | }, |
|
25 | }, | |
20 | { |
|
26 | { | |
21 | "cell_type": "code", |
|
27 | "cell_type": "code", | |
22 | "collapsed": false, |
|
28 | "collapsed": false, | |
23 | "input": [ |
|
29 | "input": [ | |
24 | "from __future__ import print_function\n", |
|
30 | "from __future__ import print_function\n", | |
25 | "from IPython.lib import backgroundjobs as bg\n", |
|
31 | "from IPython.lib import backgroundjobs as bg\n", | |
26 | "\n", |
|
32 | "\n", | |
27 | "import sys\n", |
|
33 | "import sys\n", | |
28 | "import time\n", |
|
34 | "import time\n", | |
29 | "\n", |
|
35 | "\n", | |
30 | "def sleepfunc(interval=2, *a, **kw):\n", |
|
36 | "def sleepfunc(interval=2, *a, **kw):\n", | |
31 | " args = dict(interval=interval,\n", |
|
37 | " args = dict(interval=interval,\n", | |
32 | " args=a,\n", |
|
38 | " args=a,\n", | |
33 | " kwargs=kw)\n", |
|
39 | " kwargs=kw)\n", | |
34 | " time.sleep(interval)\n", |
|
40 | " time.sleep(interval)\n", | |
35 | " return args\n", |
|
41 | " return args\n", | |
36 | "\n", |
|
42 | "\n", | |
37 | "def diefunc(interval=2, *a, **kw):\n", |
|
43 | "def diefunc(interval=2, *a, **kw):\n", | |
38 | " time.sleep(interval)\n", |
|
44 | " time.sleep(interval)\n", | |
39 | " raise Exception(\"Dead job with interval %s\" % interval)\n", |
|
45 | " raise Exception(\"Dead job with interval %s\" % interval)\n", | |
40 | "\n", |
|
46 | "\n", | |
41 | "def printfunc(interval=1, reps=5):\n", |
|
47 | "def printfunc(interval=1, reps=5):\n", | |
42 | " for n in range(reps):\n", |
|
48 | " for n in range(reps):\n", | |
43 | " time.sleep(interval)\n", |
|
49 | " time.sleep(interval)\n", | |
44 | " print('In the background...', n)\n", |
|
50 | " print('In the background...', n)\n", | |
45 | " sys.stdout.flush()\n", |
|
51 | " sys.stdout.flush()\n", | |
46 | " print('All done!')\n", |
|
52 | " print('All done!')\n", | |
47 | " sys.stdout.flush()" |
|
53 | " sys.stdout.flush()" | |
48 | ], |
|
54 | ], | |
49 | "language": "python", |
|
55 | "language": "python", | |
50 | "metadata": {}, |
|
56 | "metadata": {}, | |
51 | "outputs": [], |
|
57 | "outputs": [], | |
52 | "prompt_number": 1 |
|
58 | "prompt_number": 1 | |
53 | }, |
|
59 | }, | |
54 | { |
|
60 | { | |
55 | "cell_type": "markdown", |
|
61 | "cell_type": "markdown", | |
56 | "metadata": {}, |
|
62 | "metadata": {}, | |
57 | "source": [ |
|
63 | "source": [ | |
58 | "Now, we can create a job manager (called simply `jobs`) and use it to submit new jobs.\n", |
|
64 | "Now, we can create a job manager (called simply `jobs`) and use it to submit new jobs.\n", | |
59 | "<br>\n", |
|
65 | "<br>\n", | |
60 | "Run the cell below and wait a few seconds for the whole thing to finish, until you see the \"All done!\" printout." |
|
66 | "Run the cell below and wait a few seconds for the whole thing to finish, until you see the \"All done!\" printout." | |
61 | ] |
|
67 | ] | |
62 | }, |
|
68 | }, | |
63 | { |
|
69 | { | |
64 | "cell_type": "code", |
|
70 | "cell_type": "code", | |
65 | "collapsed": false, |
|
71 | "collapsed": false, | |
66 | "input": [ |
|
72 | "input": [ | |
67 | "jobs = bg.BackgroundJobManager()\n", |
|
73 | "jobs = bg.BackgroundJobManager()\n", | |
68 | "\n", |
|
74 | "\n", | |
69 | "# Start a few jobs, the first one will have ID # 0\n", |
|
75 | "# Start a few jobs, the first one will have ID # 0\n", | |
70 | "jobs.new(sleepfunc, 4)\n", |
|
76 | "jobs.new(sleepfunc, 4)\n", | |
71 | "jobs.new(sleepfunc, kw={'reps':2})\n", |
|
77 | "jobs.new(sleepfunc, kw={'reps':2})\n", | |
72 | "jobs.new('printfunc(1,3)')\n", |
|
78 | "jobs.new('printfunc(1,3)')\n", | |
73 | "\n", |
|
79 | "\n", | |
74 | "# This makes a couple of jobs which will die. Let's keep a reference to\n", |
|
80 | "# This makes a couple of jobs which will die. Let's keep a reference to\n", | |
75 | "# them for easier traceback reporting later\n", |
|
81 | "# them for easier traceback reporting later\n", | |
76 | "diejob1 = jobs.new(diefunc, 1)\n", |
|
82 | "diejob1 = jobs.new(diefunc, 1)\n", | |
77 | "diejob2 = jobs.new(diefunc, 2)" |
|
83 | "diejob2 = jobs.new(diefunc, 2)" | |
78 | ], |
|
84 | ], | |
79 | "language": "python", |
|
85 | "language": "python", | |
80 | "metadata": {}, |
|
86 | "metadata": {}, | |
81 | "outputs": [ |
|
87 | "outputs": [ | |
82 | { |
|
88 | { | |
83 | "output_type": "stream", |
|
89 | "output_type": "stream", | |
84 | "stream": "stdout", |
|
90 | "stream": "stdout", | |
85 | "text": [ |
|
91 | "text": [ | |
86 | "Starting job # 0 in a separate thread.\n", |
|
92 | "Starting job # 0 in a separate thread.\n", | |
87 | "Starting job # 2 in a separate thread.\n", |
|
93 | "Starting job # 2 in a separate thread.\n", | |
88 | "Starting job # 3 in a separate thread.\n", |
|
94 | "Starting job # 3 in a separate thread.\n", | |
89 | "Starting job # 4 in a separate thread.\n", |
|
95 | "Starting job # 4 in a separate thread.\n", | |
90 | "Starting job # 5 in a separate thread.\n" |
|
96 | "Starting job # 5 in a separate thread.\n" | |
91 | ] |
|
97 | ] | |
92 | } |
|
98 | } | |
93 | ], |
|
99 | ], | |
94 | "prompt_number": 2 |
|
100 | "prompt_number": 2 | |
95 | }, |
|
101 | }, | |
96 | { |
|
102 | { | |
97 | "cell_type": "markdown", |
|
103 | "cell_type": "markdown", | |
98 | "metadata": {}, |
|
104 | "metadata": {}, | |
99 | "source": [ |
|
105 | "source": [ | |
100 | "You can check the status of your jobs at any time:" |
|
106 | "You can check the status of your jobs at any time:" | |
101 | ] |
|
107 | ] | |
102 | }, |
|
108 | }, | |
103 | { |
|
109 | { | |
104 | "cell_type": "code", |
|
110 | "cell_type": "code", | |
105 | "collapsed": false, |
|
111 | "collapsed": false, | |
106 | "input": [ |
|
112 | "input": [ | |
107 | "jobs.status()" |
|
113 | "jobs.status()" | |
108 | ], |
|
114 | ], | |
109 | "language": "python", |
|
115 | "language": "python", | |
110 | "metadata": {}, |
|
116 | "metadata": {}, | |
111 | "outputs": [ |
|
117 | "outputs": [ | |
112 | { |
|
118 | { | |
113 | "output_type": "stream", |
|
119 | "output_type": "stream", | |
114 | "stream": "stdout", |
|
120 | "stream": "stdout", | |
115 | "text": [ |
|
121 | "text": [ | |
116 | "In the background... 0\n", |
|
122 | "In the background... 0\n", | |
117 | "Running jobs:" |
|
123 | "Running jobs:" | |
118 | ] |
|
124 | ] | |
119 | }, |
|
125 | }, | |
120 | { |
|
126 | { | |
121 | "output_type": "stream", |
|
127 | "output_type": "stream", | |
122 | "stream": "stdout", |
|
128 | "stream": "stdout", | |
123 | "text": [ |
|
129 | "text": [ | |
124 | "\n", |
|
130 | "\n", | |
125 | "0 : <function sleepfunc at 0x102cc6848>\n", |
|
131 | "0 : <function sleepfunc at 0x102cc6848>\n", | |
126 | "2 : <function sleepfunc at 0x102cc6848>\n", |
|
132 | "2 : <function sleepfunc at 0x102cc6848>\n", | |
127 | "3 : printfunc(1,3)\n", |
|
133 | "3 : printfunc(1,3)\n", | |
128 | "5 : <function diefunc at 0x102cc68c0>\n", |
|
134 | "5 : <function diefunc at 0x102cc68c0>\n", | |
129 | "\n", |
|
135 | "\n", | |
130 | "Dead jobs:\n", |
|
136 | "Dead jobs:\n", | |
131 | "4 : <function diefunc at 0x102cc68c0>\n", |
|
137 | "4 : <function diefunc at 0x102cc68c0>\n", | |
132 | "\n" |
|
138 | "\n" | |
133 | ] |
|
139 | ] | |
134 | } |
|
140 | } | |
135 | ], |
|
141 | ], | |
136 | "prompt_number": 3 |
|
142 | "prompt_number": 3 | |
137 | }, |
|
143 | }, | |
138 | { |
|
144 | { | |
139 | "cell_type": "markdown", |
|
145 | "cell_type": "markdown", | |
140 | "metadata": {}, |
|
146 | "metadata": {}, | |
141 | "source": [ |
|
147 | "source": [ | |
142 | "For any completed job, you can get its result easily:" |
|
148 | "For any completed job, you can get its result easily:" | |
143 | ] |
|
149 | ] | |
144 | }, |
|
150 | }, | |
145 | { |
|
151 | { | |
146 | "cell_type": "code", |
|
152 | "cell_type": "code", | |
147 | "collapsed": false, |
|
153 | "collapsed": false, | |
148 | "input": [ |
|
154 | "input": [ | |
149 | "jobs[0].result\n", |
|
155 | "jobs[0].result\n", | |
150 | "j0 = jobs[0]\n", |
|
156 | "j0 = jobs[0]\n", | |
151 | "j0.join?" |
|
157 | "j0.join?" | |
152 | ], |
|
158 | ], | |
153 | "language": "python", |
|
159 | "language": "python", | |
154 | "metadata": {}, |
|
160 | "metadata": {}, | |
155 | "outputs": [], |
|
161 | "outputs": [], | |
156 | "prompt_number": 4 |
|
162 | "prompt_number": 4 | |
157 | }, |
|
163 | }, | |
158 | { |
|
164 | { | |
159 | "cell_type": "markdown", |
|
165 | "cell_type": "markdown", | |
160 | "metadata": {}, |
|
166 | "metadata": {}, | |
161 | "source": [ |
|
167 | "source": [ | |
162 | "You can get the traceback of any dead job. Run the line\n", |
|
168 | "You can get the traceback of any dead job. Run the line\n", | |
163 | "below again interactively until it prints a traceback (check the status\n", |
|
169 | "below again interactively until it prints a traceback (check the status\n", | |
164 | "of the job):\n" |
|
170 | "of the job):\n" | |
165 | ] |
|
171 | ] | |
166 | }, |
|
172 | }, | |
167 | { |
|
173 | { | |
168 | "cell_type": "code", |
|
174 | "cell_type": "code", | |
169 | "collapsed": false, |
|
175 | "collapsed": false, | |
170 | "input": [ |
|
176 | "input": [ | |
171 | "print \"Status of diejob1:\", diejob1.status\n", |
|
177 | "print \"Status of diejob1:\", diejob1.status\n", | |
172 | "diejob1.traceback() # jobs.traceback(4) would also work here, with the job number" |
|
178 | "diejob1.traceback() # jobs.traceback(4) would also work here, with the job number" | |
173 | ], |
|
179 | ], | |
174 | "language": "python", |
|
180 | "language": "python", | |
175 | "metadata": {}, |
|
181 | "metadata": {}, | |
176 | "outputs": [ |
|
182 | "outputs": [ | |
177 | { |
|
183 | { | |
178 | "output_type": "stream", |
|
184 | "output_type": "stream", | |
179 | "stream": "stdout", |
|
185 | "stream": "stdout", | |
180 | "text": [ |
|
186 | "text": [ | |
181 | "In the background... 1\n", |
|
187 | "In the background... 1\n", | |
182 | "In the background... 2\n", |
|
188 | "In the background... 2\n", | |
183 | "All done!\n" |
|
189 | "All done!\n" | |
184 | ] |
|
190 | ] | |
185 | }, |
|
191 | }, | |
186 | { |
|
192 | { | |
187 | "ename": "SyntaxError", |
|
193 | "ename": "SyntaxError", | |
188 | "evalue": "invalid syntax (<ipython-input-5-a90bd59af669>, line 1)", |
|
194 | "evalue": "invalid syntax (<ipython-input-5-a90bd59af669>, line 1)", | |
189 | "output_type": "pyerr", |
|
195 | "output_type": "pyerr", | |
190 | "traceback": [ |
|
196 | "traceback": [ | |
191 | "\u001b[0;36m File \u001b[0;32m\"<ipython-input-5-a90bd59af669>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m print \"Status of diejob1:\", diejob1.status\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" |
|
197 | "\u001b[0;36m File \u001b[0;32m\"<ipython-input-5-a90bd59af669>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m print \"Status of diejob1:\", diejob1.status\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" | |
192 | ] |
|
198 | ] | |
193 | } |
|
199 | } | |
194 | ], |
|
200 | ], | |
195 | "prompt_number": 5 |
|
201 | "prompt_number": 5 | |
196 | }, |
|
202 | }, | |
197 | { |
|
203 | { | |
198 | "cell_type": "markdown", |
|
204 | "cell_type": "markdown", | |
199 | "metadata": {}, |
|
205 | "metadata": {}, | |
200 | "source": [ |
|
206 | "source": [ | |
201 | "This will print all tracebacks for all dead jobs:" |
|
207 | "This will print all tracebacks for all dead jobs:" | |
202 | ] |
|
208 | ] | |
203 | }, |
|
209 | }, | |
204 | { |
|
210 | { | |
205 | "cell_type": "code", |
|
211 | "cell_type": "code", | |
206 | "collapsed": false, |
|
212 | "collapsed": false, | |
207 | "input": [ |
|
213 | "input": [ | |
208 | "jobs.traceback()" |
|
214 | "jobs.traceback()" | |
209 | ], |
|
215 | ], | |
210 | "language": "python", |
|
216 | "language": "python", | |
211 | "metadata": {}, |
|
217 | "metadata": {}, | |
212 | "outputs": [ |
|
218 | "outputs": [ | |
213 | { |
|
219 | { | |
214 | "output_type": "stream", |
|
220 | "output_type": "stream", | |
215 | "stream": "stdout", |
|
221 | "stream": "stdout", | |
216 | "text": [ |
|
222 | "text": [ | |
217 | "Traceback for: <BackgroundJob #4: <function diefunc at 0x102cc68c0>>\n", |
|
223 | "Traceback for: <BackgroundJob #4: <function diefunc at 0x102cc68c0>>\n", | |
218 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n", |
|
224 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n", | |
219 | "\u001b[0;31mException\u001b[0m Traceback (most recent call last)\n", |
|
225 | "\u001b[0;31mException\u001b[0m Traceback (most recent call last)\n", | |
220 | "\u001b[0;32m/Users/bgranger/Documents/Computing/IPython/code/ipython/IPython/lib/backgroundjobs.pyc\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self)\u001b[0m\n", |
|
226 | "\u001b[0;32m/Users/bgranger/Documents/Computing/IPython/code/ipython/IPython/lib/backgroundjobs.pyc\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self)\u001b[0m\n", | |
221 | "\u001b[1;32m 489\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", |
|
227 | "\u001b[1;32m 489\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", | |
222 | "\u001b[1;32m 490\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mcall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
228 | "\u001b[1;32m 490\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mcall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
223 | "\u001b[0;32m--> 491\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
229 | "\u001b[0;32m--> 491\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
224 | "\u001b[0m\n", |
|
230 | "\u001b[0m\n", | |
225 | "\u001b[0;32m<ipython-input-1-7391f8ae281b>\u001b[0m in \u001b[0;36mdiefunc\u001b[0;34m(interval, *a, **kw)\u001b[0m\n", |
|
231 | "\u001b[0;32m<ipython-input-1-7391f8ae281b>\u001b[0m in \u001b[0;36mdiefunc\u001b[0;34m(interval, *a, **kw)\u001b[0m\n", | |
226 | "\u001b[1;32m 14\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdiefunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
232 | "\u001b[1;32m 14\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdiefunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
227 | "\u001b[1;32m 15\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
233 | "\u001b[1;32m 15\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
228 | "\u001b[0;32m---> 16\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Dead job with interval %s\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
234 | "\u001b[0;32m---> 16\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Dead job with interval %s\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
229 | "\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", |
|
235 | "\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", | |
230 | "\u001b[1;32m 18\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mprintfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreps\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
236 | "\u001b[1;32m 18\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mprintfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreps\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
231 | "\n", |
|
237 | "\n", | |
232 | "\u001b[0;31mException\u001b[0m: Dead job with interval 1\n", |
|
238 | "\u001b[0;31mException\u001b[0m: Dead job with interval 1\n", | |
233 | "\n", |
|
239 | "\n", | |
234 | "Traceback for: <BackgroundJob #5: <function diefunc at 0x102cc68c0>>\n", |
|
240 | "Traceback for: <BackgroundJob #5: <function diefunc at 0x102cc68c0>>\n", | |
235 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n", |
|
241 | "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n", | |
236 | "\u001b[0;31mException\u001b[0m Traceback (most recent call last)\n", |
|
242 | "\u001b[0;31mException\u001b[0m Traceback (most recent call last)\n", | |
237 | "\u001b[0;32m/Users/bgranger/Documents/Computing/IPython/code/ipython/IPython/lib/backgroundjobs.pyc\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self)\u001b[0m\n", |
|
243 | "\u001b[0;32m/Users/bgranger/Documents/Computing/IPython/code/ipython/IPython/lib/backgroundjobs.pyc\u001b[0m in \u001b[0;36mcall\u001b[0;34m(self)\u001b[0m\n", | |
238 | "\u001b[1;32m 489\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", |
|
244 | "\u001b[1;32m 489\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", | |
239 | "\u001b[1;32m 490\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mcall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
245 | "\u001b[1;32m 490\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mcall\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
240 | "\u001b[0;32m--> 491\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
246 | "\u001b[0;32m--> 491\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
241 | "\u001b[0m\n", |
|
247 | "\u001b[0m\n", | |
242 | "\u001b[0;32m<ipython-input-1-7391f8ae281b>\u001b[0m in \u001b[0;36mdiefunc\u001b[0;34m(interval, *a, **kw)\u001b[0m\n", |
|
248 | "\u001b[0;32m<ipython-input-1-7391f8ae281b>\u001b[0m in \u001b[0;36mdiefunc\u001b[0;34m(interval, *a, **kw)\u001b[0m\n", | |
243 | "\u001b[1;32m 14\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdiefunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
249 | "\u001b[1;32m 14\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdiefunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkw\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
244 | "\u001b[1;32m 15\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
250 | "\u001b[1;32m 15\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
245 | "\u001b[0;32m---> 16\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Dead job with interval %s\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
251 | "\u001b[0;32m---> 16\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Dead job with interval %s\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0minterval\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
246 | "\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", |
|
252 | "\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", | |
247 | "\u001b[1;32m 18\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mprintfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreps\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", |
|
253 | "\u001b[1;32m 18\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mprintfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minterval\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreps\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
248 | "\n", |
|
254 | "\n", | |
249 | "\u001b[0;31mException\u001b[0m: Dead job with interval 2\n", |
|
255 | "\u001b[0;31mException\u001b[0m: Dead job with interval 2\n", | |
250 | "\n" |
|
256 | "\n" | |
251 | ] |
|
257 | ] | |
252 | } |
|
258 | } | |
253 | ], |
|
259 | ], | |
254 | "prompt_number": 6 |
|
260 | "prompt_number": 6 | |
255 | }, |
|
261 | }, | |
256 | { |
|
262 | { | |
257 | "cell_type": "markdown", |
|
263 | "cell_type": "markdown", | |
258 | "metadata": {}, |
|
264 | "metadata": {}, | |
259 | "source": [ |
|
265 | "source": [ | |
260 | "The job manager can be flushed of all completed jobs at any time:" |
|
266 | "The job manager can be flushed of all completed jobs at any time:" | |
261 | ] |
|
267 | ] | |
262 | }, |
|
268 | }, | |
263 | { |
|
269 | { | |
264 | "cell_type": "code", |
|
270 | "cell_type": "code", | |
265 | "collapsed": false, |
|
271 | "collapsed": false, | |
266 | "input": [ |
|
272 | "input": [ | |
267 | "jobs.flush()" |
|
273 | "jobs.flush()" | |
268 | ], |
|
274 | ], | |
269 | "language": "python", |
|
275 | "language": "python", | |
270 | "metadata": {}, |
|
276 | "metadata": {}, | |
271 | "outputs": [ |
|
277 | "outputs": [ | |
272 | { |
|
278 | { | |
273 | "output_type": "stream", |
|
279 | "output_type": "stream", | |
274 | "stream": "stdout", |
|
280 | "stream": "stdout", | |
275 | "text": [ |
|
281 | "text": [ | |
276 | "Flushing 3 Completed jobs.\n", |
|
282 | "Flushing 3 Completed jobs.\n", | |
277 | "Flushing 2 Dead jobs.\n" |
|
283 | "Flushing 2 Dead jobs.\n" | |
278 | ] |
|
284 | ] | |
279 | } |
|
285 | } | |
280 | ], |
|
286 | ], | |
281 | "prompt_number": 7 |
|
287 | "prompt_number": 7 | |
282 | }, |
|
288 | }, | |
283 | { |
|
289 | { | |
284 | "cell_type": "markdown", |
|
290 | "cell_type": "markdown", | |
285 | "metadata": {}, |
|
291 | "metadata": {}, | |
286 | "source": [ |
|
292 | "source": [ | |
287 | "After that, the status is simply empty:" |
|
293 | "After that, the status is simply empty:" | |
288 | ] |
|
294 | ] | |
289 | }, |
|
295 | }, | |
290 | { |
|
296 | { | |
291 | "cell_type": "code", |
|
297 | "cell_type": "code", | |
292 | "collapsed": true, |
|
298 | "collapsed": true, | |
293 | "input": [ |
|
299 | "input": [ | |
294 | "jobs.status()" |
|
300 | "jobs.status()" | |
295 | ], |
|
301 | ], | |
296 | "language": "python", |
|
302 | "language": "python", | |
297 | "metadata": {}, |
|
303 | "metadata": {}, | |
298 | "outputs": [], |
|
304 | "outputs": [], | |
299 | "prompt_number": 8 |
|
305 | "prompt_number": 8 | |
300 | }, |
|
306 | }, | |
301 | { |
|
307 | { | |
302 | "cell_type": "markdown", |
|
308 | "cell_type": "markdown", | |
303 | "metadata": {}, |
|
309 | "metadata": {}, | |
304 | "source": [ |
|
310 | "source": [ | |
305 | "It's easy to wait on a job:" |
|
311 | "It's easy to wait on a job:" | |
306 | ] |
|
312 | ] | |
307 | }, |
|
313 | }, | |
308 | { |
|
314 | { | |
309 | "cell_type": "code", |
|
315 | "cell_type": "code", | |
310 | "collapsed": false, |
|
316 | "collapsed": false, | |
311 | "input": [ |
|
317 | "input": [ | |
312 | "j = jobs.new(sleepfunc, 2)\n", |
|
318 | "j = jobs.new(sleepfunc, 2)\n", | |
313 | "print(\"Will wait for j now...\")\n", |
|
319 | "print(\"Will wait for j now...\")\n", | |
314 | "sys.stdout.flush()\n", |
|
320 | "sys.stdout.flush()\n", | |
315 | "j.join()\n", |
|
321 | "j.join()\n", | |
316 | "print(\"Result from j:\")\n", |
|
322 | "print(\"Result from j:\")\n", | |
317 | "j.result" |
|
323 | "j.result" | |
318 | ], |
|
324 | ], | |
319 | "language": "python", |
|
325 | "language": "python", | |
320 | "metadata": {}, |
|
326 | "metadata": {}, | |
321 | "outputs": [ |
|
327 | "outputs": [ | |
322 | { |
|
328 | { | |
323 | "output_type": "stream", |
|
329 | "output_type": "stream", | |
324 | "stream": "stdout", |
|
330 | "stream": "stdout", | |
325 | "text": [ |
|
331 | "text": [ | |
326 | "Starting job # 0 in a separate thread.\n", |
|
332 | "Starting job # 0 in a separate thread.\n", | |
327 | "Will wait for j now...\n" |
|
333 | "Will wait for j now...\n" | |
328 | ] |
|
334 | ] | |
329 | }, |
|
335 | }, | |
330 | { |
|
336 | { | |
331 | "output_type": "stream", |
|
337 | "output_type": "stream", | |
332 | "stream": "stdout", |
|
338 | "stream": "stdout", | |
333 | "text": [ |
|
339 | "text": [ | |
334 | "Result from j:\n" |
|
340 | "Result from j:\n" | |
335 | ] |
|
341 | ] | |
336 | }, |
|
342 | }, | |
337 | { |
|
343 | { | |
338 | "metadata": {}, |
|
344 | "metadata": {}, | |
339 | "output_type": "pyout", |
|
345 | "output_type": "pyout", | |
340 | "prompt_number": 9, |
|
346 | "prompt_number": 9, | |
341 | "text": [ |
|
347 | "text": [ | |
342 | "{'args': (), 'interval': 2, 'kwargs': {}}" |
|
348 | "{'args': (), 'interval': 2, 'kwargs': {}}" | |
343 | ] |
|
349 | ] | |
344 | } |
|
350 | } | |
345 | ], |
|
351 | ], | |
346 | "prompt_number": 9 |
|
352 | "prompt_number": 9 | |
347 | } |
|
353 | } | |
348 | ], |
|
354 | ], | |
349 | "metadata": {} |
|
355 | "metadata": {} | |
350 | } |
|
356 | } | |
351 | ] |
|
357 | ] | |
352 | } No newline at end of file |
|
358 | } |
@@ -1,125 +1,165 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "", |
|
3 | "name": "", | |
4 | "signature": "sha256:1f73cbd161515fd1a2c4b327925f1f17e45ed057ffb039a22cf833f61154e000" |
|
4 | "signature": "sha256:dd3f8171dfb5c8cb7aa9b1c0f5dee915f4ac8f73d9dc19a20a95c8f1583578ae" | |
5 | }, |
|
5 | }, | |
6 | "nbformat": 3, |
|
6 | "nbformat": 3, | |
7 | "nbformat_minor": 0, |
|
7 | "nbformat_minor": 0, | |
8 | "worksheets": [ |
|
8 | "worksheets": [ | |
9 | { |
|
9 | { | |
10 | "cells": [ |
|
10 | "cells": [ | |
11 | { |
|
11 | { | |
12 | "cell_type": "markdown", |
|
12 | "cell_type": "markdown", | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "<img src=\"../images/ipython_logo.png\">" |
|
15 | "<img src=\"../images/ipython_logo.png\">" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "markdown", |
|
19 | "cell_type": "markdown", | |
20 | "metadata": {}, |
|
20 | "metadata": {}, | |
21 | "source": [ |
|
21 | "source": [ | |
22 | "Back to the main [Index](../Index.ipynb)" |
|
22 | "Back to the main [Index](../Index.ipynb)" | |
23 | ] |
|
23 | ] | |
24 | }, |
|
24 | }, | |
25 | { |
|
25 | { | |
26 | "cell_type": "heading", |
|
26 | "cell_type": "heading", | |
27 | "level": 1, |
|
27 | "level": 1, | |
28 | "metadata": {}, |
|
28 | "metadata": {}, | |
29 | "source": [ |
|
29 | "source": [ | |
30 | "IPython Kernel" |
|
30 | "IPython Kernel" | |
31 | ] |
|
31 | ] | |
32 | }, |
|
32 | }, | |
33 | { |
|
33 | { | |
34 | "cell_type": "markdown", |
|
34 | "cell_type": "markdown", | |
35 | "metadata": {}, |
|
35 | "metadata": {}, | |
36 | "source": [ |
|
36 | "source": [ | |
37 | "IPython provides extensions to the Python programming language that make working interactively convenient and efficient. These extensions are implemented in the IPython Kernel and are available in all of the IPython Frontends (Notebook, Terminal, Console and Qt Console) when running this kernel." |
|
37 | "IPython provides extensions to the Python programming language that make working interactively convenient and efficient. These extensions are implemented in the IPython Kernel and are available in all of the IPython Frontends (Notebook, Terminal, Console and Qt Console) when running this kernel." | |
38 | ] |
|
38 | ] | |
39 | }, |
|
39 | }, | |
40 | { |
|
40 | { | |
41 | "cell_type": "heading", |
|
41 | "cell_type": "heading", | |
42 | "level": 2, |
|
42 | "level": 2, | |
43 | "metadata": {}, |
|
43 | "metadata": {}, | |
44 | "source": [ |
|
44 | "source": [ | |
45 | "Tutorials" |
|
45 | "Tutorials" | |
46 | ] |
|
46 | ] | |
47 | }, |
|
47 | }, | |
48 | { |
|
48 | { | |
49 | "cell_type": "markdown", |
|
49 | "cell_type": "markdown", | |
50 | "metadata": {}, |
|
50 | "metadata": {}, | |
51 | "source": [ |
|
51 | "source": [ | |
52 | "* [Cell Magics](Cell Magics.ipynb)\n", |
|
52 | "* [Cell Magics](Cell Magics.ipynb)\n", | |
53 | "* [Script Magics](Script Magics.ipynb)" |
|
53 | "* [Script Magics](Script Magics.ipynb)" | |
54 | ] |
|
54 | ] | |
55 | }, |
|
55 | }, | |
56 | { |
|
56 | { | |
57 | "cell_type": "heading", |
|
57 | "cell_type": "heading", | |
58 | "level": 2, |
|
58 | "level": 2, | |
59 | "metadata": {}, |
|
59 | "metadata": {}, | |
60 | "source": [ |
|
60 | "source": [ | |
61 | "Examples" |
|
61 | "Examples" | |
62 | ] |
|
62 | ] | |
63 | }, |
|
63 | }, | |
64 | { |
|
64 | { | |
65 | "cell_type": "markdown", |
|
65 | "cell_type": "markdown", | |
66 | "metadata": {}, |
|
66 | "metadata": {}, | |
67 | "source": [ |
|
67 | "source": [ | |
68 | "Coming soon." |
|
68 | "* [Background Jobs](Background Jobs.ipynb)" | |
69 | ] |
|
69 | ] | |
70 | }, |
|
70 | }, | |
71 | { |
|
71 | { | |
72 | "cell_type": "heading", |
|
72 | "cell_type": "heading", | |
73 | "level": 2, |
|
73 | "level": 2, | |
74 | "metadata": {}, |
|
74 | "metadata": {}, | |
75 | "source": [ |
|
75 | "source": [ | |
76 | "Non-notebook examples" |
|
76 | "Non-notebook examples" | |
77 | ] |
|
77 | ] | |
78 | }, |
|
78 | }, | |
79 | { |
|
79 | { | |
80 | "cell_type": "markdown", |
|
80 | "cell_type": "markdown", | |
81 | "metadata": {}, |
|
81 | "metadata": {}, | |
82 | "source": [ |
|
82 | "source": [ | |
83 | "This directory also contains examples that are regular Python (`.py`) files." |
|
83 | "This directory also contains examples that are regular Python (`.py`) files." | |
84 | ] |
|
84 | ] | |
85 | }, |
|
85 | }, | |
86 | { |
|
86 | { | |
87 | "cell_type": "code", |
|
87 | "cell_type": "code", | |
88 | "collapsed": false, |
|
88 | "collapsed": false, | |
89 | "input": [ |
|
89 | "input": [ | |
90 | "from IPython.display import FileLink, display" |
|
90 | "%run ../list_pyfiles.ipy" | |
91 | ], |
|
91 | ], | |
92 | "language": "python", |
|
92 | "language": "python", | |
93 | "metadata": {}, |
|
93 | "metadata": {}, | |
94 |
"outputs": [ |
|
94 | "outputs": [ | |
|
95 | { | |||
|
96 | "html": [ | |||
|
97 | "<a href='example-demo.py' target='_blank'>example-demo.py</a><br>" | |||
|
98 | ], | |||
|
99 | "metadata": {}, | |||
|
100 | "output_type": "display_data", | |||
|
101 | "text": [ | |||
|
102 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/IPython Kernel/example-demo.py" | |||
|
103 | ] | |||
|
104 | }, | |||
|
105 | { | |||
|
106 | "html": [ | |||
|
107 | "<a href='ipython-get-history.py' target='_blank'>ipython-get-history.py</a><br>" | |||
|
108 | ], | |||
|
109 | "metadata": {}, | |||
|
110 | "output_type": "display_data", | |||
|
111 | "text": [ | |||
|
112 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/IPython Kernel/ipython-get-history.py" | |||
|
113 | ] | |||
|
114 | } | |||
|
115 | ], | |||
95 | "prompt_number": 1 |
|
116 | "prompt_number": 1 | |
96 | }, |
|
117 | }, | |
97 | { |
|
118 | { | |
|
119 | "cell_type": "markdown", | |||
|
120 | "metadata": {}, | |||
|
121 | "source": [ | |||
|
122 | "There are also a set of examples that show how to integrate IPython with different GUI event loops:" | |||
|
123 | ] | |||
|
124 | }, | |||
|
125 | { | |||
98 | "cell_type": "code", |
|
126 | "cell_type": "code", | |
99 | "collapsed": false, |
|
127 | "collapsed": false, | |
100 | "input": [ |
|
128 | "input": [ | |
101 | "files =!ls *.py\n", |
|
129 | "%run ../list_subdirs.ipy" | |
102 | "for f in files:\n", |
|
|||
103 | " display(FileLink(f))" |
|
|||
104 | ], |
|
130 | ], | |
105 | "language": "python", |
|
131 | "language": "python", | |
106 | "metadata": {}, |
|
132 | "metadata": {}, | |
107 | "outputs": [ |
|
133 | "outputs": [ | |
108 | { |
|
134 | { | |
109 | "html": [ |
|
135 | "html": [ | |
110 | "<a href='ipython-get-history.py' target='_blank'>ipython-get-history.py</a><br>" |
|
136 | "gui/<br>\n", | |
|
137 | " <a href='gui/gui-glut.py' target='_blank'>gui-glut.py</a><br>\n", | |||
|
138 | " <a href='gui/gui-gtk.py' target='_blank'>gui-gtk.py</a><br>\n", | |||
|
139 | " <a href='gui/gui-gtk3.py' target='_blank'>gui-gtk3.py</a><br>\n", | |||
|
140 | " <a href='gui/gui-pyglet.py' target='_blank'>gui-pyglet.py</a><br>\n", | |||
|
141 | " <a href='gui/gui-qt.py' target='_blank'>gui-qt.py</a><br>\n", | |||
|
142 | " <a href='gui/gui-tk.py' target='_blank'>gui-tk.py</a><br>\n", | |||
|
143 | " <a href='gui/gui-wx.py' target='_blank'>gui-wx.py</a><br>" | |||
111 | ], |
|
144 | ], | |
112 | "metadata": {}, |
|
145 | "metadata": {}, | |
113 | "output_type": "display_data", |
|
146 | "output_type": "display_data", | |
114 | "text": [ |
|
147 | "text": [ | |
115 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/IPython Kernel/ipython-get-history.py" |
|
148 | "gui/\n", | |
|
149 | " gui-glut.py\n", | |||
|
150 | " gui-gtk.py\n", | |||
|
151 | " gui-gtk3.py\n", | |||
|
152 | " gui-pyglet.py\n", | |||
|
153 | " gui-qt.py\n", | |||
|
154 | " gui-tk.py\n", | |||
|
155 | " gui-wx.py" | |||
116 | ] |
|
156 | ] | |
117 | } |
|
157 | } | |
118 | ], |
|
158 | ], | |
119 | "prompt_number": 2 |
|
159 | "prompt_number": 2 | |
120 | } |
|
160 | } | |
121 | ], |
|
161 | ], | |
122 | "metadata": {} |
|
162 | "metadata": {} | |
123 | } |
|
163 | } | |
124 | ] |
|
164 | ] | |
125 | } No newline at end of file |
|
165 | } |
1 | NO CONTENT: file renamed from examples/Miscellaneous/example-demo.py to examples/IPython Kernel/example-demo.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/example-demo.py to examples/IPython Kernel/example-demo.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-glut.py to examples/IPython Kernel/gui/gui-glut.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-glut.py to examples/IPython Kernel/gui/gui-glut.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-gtk.py to examples/IPython Kernel/gui/gui-gtk.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-gtk.py to examples/IPython Kernel/gui/gui-gtk.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-gtk3.py to examples/IPython Kernel/gui/gui-gtk3.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-gtk3.py to examples/IPython Kernel/gui/gui-gtk3.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-pyglet.py to examples/IPython Kernel/gui/gui-pyglet.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-pyglet.py to examples/IPython Kernel/gui/gui-pyglet.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-qt.py to examples/IPython Kernel/gui/gui-qt.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-qt.py to examples/IPython Kernel/gui/gui-qt.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-tk.py to examples/IPython Kernel/gui/gui-tk.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-tk.py to examples/IPython Kernel/gui/gui-tk.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/gui-wx.py to examples/IPython Kernel/gui/gui-wx.py |
|
NO CONTENT: file renamed from examples/Miscellaneous/gui-wx.py to examples/IPython Kernel/gui/gui-wx.py |
1 | NO CONTENT: file renamed from examples/Miscellaneous/ipython-completion.bash to examples/IPython Kernel/ipython-completion.bash |
|
NO CONTENT: file renamed from examples/Miscellaneous/ipython-completion.bash to examples/IPython Kernel/ipython-completion.bash |
1 | NO CONTENT: file renamed from examples/Miscellaneous/ipython-qtconsole.desktop to examples/IPython Kernel/ipython-qtconsole.desktop |
|
NO CONTENT: file renamed from examples/Miscellaneous/ipython-qtconsole.desktop to examples/IPython Kernel/ipython-qtconsole.desktop |
1 | NO CONTENT: file renamed from examples/Miscellaneous/ipython.desktop to examples/IPython Kernel/ipython.desktop |
|
NO CONTENT: file renamed from examples/Miscellaneous/ipython.desktop to examples/IPython Kernel/ipython.desktop |
@@ -1,59 +1,58 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "", |
|
3 | "name": "", | |
4 | "signature": "sha256:f047f5edb4201c0c7aa38bdf31058bf6ab2785d53e7a03cdbd4e4ff4217c0007" |
|
4 | "signature": "sha256:0b4b631419772e40e0f4893f5a0f0fe089a39e46c8862af0256164628394302d" | |
5 | }, |
|
5 | }, | |
6 | "nbformat": 3, |
|
6 | "nbformat": 3, | |
7 | "nbformat_minor": 0, |
|
7 | "nbformat_minor": 0, | |
8 | "worksheets": [ |
|
8 | "worksheets": [ | |
9 | { |
|
9 | { | |
10 | "cells": [ |
|
10 | "cells": [ | |
11 | { |
|
11 | { | |
12 | "cell_type": "markdown", |
|
12 | "cell_type": "markdown", | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "<img src=\"images/ipython_logo.png\">" |
|
15 | "<img src=\"images/ipython_logo.png\">" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "heading", |
|
19 | "cell_type": "heading", | |
20 | "level": 1, |
|
20 | "level": 1, | |
21 | "metadata": {}, |
|
21 | "metadata": {}, | |
22 | "source": [ |
|
22 | "source": [ | |
23 | "IPython Documentation" |
|
23 | "IPython Documentation" | |
24 | ] |
|
24 | ] | |
25 | }, |
|
25 | }, | |
26 | { |
|
26 | { | |
27 | "cell_type": "markdown", |
|
27 | "cell_type": "markdown", | |
28 | "metadata": {}, |
|
28 | "metadata": {}, | |
29 | "source": [ |
|
29 | "source": [ | |
30 | "This directory contains IPython's notebook-based documentation. This augments our [Sphinx-based documentation](http://ipython.org/ipython-doc/stable/index.html) with notebooks that contain interactive tutorials and examples. Over time, more of our documentation will be pulled into this format." |
|
30 | "This directory contains IPython's notebook-based documentation. This augments our [Sphinx-based documentation](http://ipython.org/ipython-doc/stable/index.html) with notebooks that contain interactive tutorials and examples. Over time, more of our documentation will be pulled into this format." | |
31 | ] |
|
31 | ] | |
32 | }, |
|
32 | }, | |
33 | { |
|
33 | { | |
34 | "cell_type": "heading", |
|
34 | "cell_type": "heading", | |
35 | "level": 2, |
|
35 | "level": 2, | |
36 | "metadata": {}, |
|
36 | "metadata": {}, | |
37 | "source": [ |
|
37 | "source": [ | |
38 | "Topics" |
|
38 | "Topics" | |
39 | ] |
|
39 | ] | |
40 | }, |
|
40 | }, | |
41 | { |
|
41 | { | |
42 | "cell_type": "markdown", |
|
42 | "cell_type": "markdown", | |
43 | "metadata": {}, |
|
43 | "metadata": {}, | |
44 | "source": [ |
|
44 | "source": [ | |
45 | "* [IPython Kernel](IPython Kernel/Index.ipynb): IPython's core syntax and command line features available in all frontends\n", |
|
45 | "* [IPython Kernel](IPython Kernel/Index.ipynb): IPython's core syntax and command line features available in all frontends\n", | |
46 | "* [Notebook](Notebook/Index.ipynb): The IPython Notebook frontend\n", |
|
46 | "* [Notebook](Notebook/Index.ipynb): The IPython Notebook frontend\n", | |
47 | "* [Interactive Widgets](Interactive Widgets/Index.ipynb): Interactive JavaScript/HTML widgets and `interact`\n", |
|
47 | "* [Interactive Widgets](Interactive Widgets/Index.ipynb): Interactive JavaScript/HTML widgets and `interact`\n", | |
48 | "* [Parallel Computing](Parallel Computing/Index.ipynb): IPython's library for interactive parallel computing\n", |
|
48 | "* [Parallel Computing](Parallel Computing/Index.ipynb): IPython's library for interactive parallel computing\n", | |
49 | "* [Customization](Customization/Index.ipynb): How to configure IPython and customize it with magics, extensions, etc.\n", |
|
49 | "* [Customization](Customization/Index.ipynb): How to configure IPython and customize it with magics, extensions, etc.\n", | |
50 | "* [Embedding](Embedding/Index.ipynb): Embedding and reusing IPython's components into other applications\n", |
|
50 | "* [Embedding](Embedding/Index.ipynb): Embedding and reusing IPython's components into other applications\n", | |
51 |
"* [Builtin Extensions](Builtin Extensions/Index.ipynb): Extensions we ship with IPython |
|
51 | "* [Builtin Extensions](Builtin Extensions/Index.ipynb): Extensions we ship with IPython" | |
52 | "* [Miscellaneous](Miscellaneous/Index.ipynb): Documentation that doesn't fit anywhere else" |
|
|||
53 | ] |
|
52 | ] | |
54 | } |
|
53 | } | |
55 | ], |
|
54 | ], | |
56 | "metadata": {} |
|
55 | "metadata": {} | |
57 | } |
|
56 | } | |
58 | ] |
|
57 | ] | |
59 | } No newline at end of file |
|
58 | } |
@@ -1,352 +1,330 b'' | |||||
1 | { |
|
1 | { | |
2 | "metadata": { |
|
2 | "metadata": { | |
3 | "name": "", |
|
3 | "name": "", | |
4 | "signature": "sha256:24e7c8d3c3d2d4b6e7a5b9d01c7e413b736537327a485e257912943fc013a888" |
|
4 | "signature": "sha256:424566387e51dfd0dc559496301c86be9b1f610b6cfedb1cbd225ce9f0161b88" | |
5 | }, |
|
5 | }, | |
6 | "nbformat": 3, |
|
6 | "nbformat": 3, | |
7 | "nbformat_minor": 0, |
|
7 | "nbformat_minor": 0, | |
8 | "worksheets": [ |
|
8 | "worksheets": [ | |
9 | { |
|
9 | { | |
10 | "cells": [ |
|
10 | "cells": [ | |
11 | { |
|
11 | { | |
12 | "cell_type": "markdown", |
|
12 | "cell_type": "markdown", | |
13 | "metadata": {}, |
|
13 | "metadata": {}, | |
14 | "source": [ |
|
14 | "source": [ | |
15 | "<img src=\"../images/ipython_logo.png\">" |
|
15 | "<img src=\"../images/ipython_logo.png\">" | |
16 | ] |
|
16 | ] | |
17 | }, |
|
17 | }, | |
18 | { |
|
18 | { | |
19 | "cell_type": "markdown", |
|
19 | "cell_type": "markdown", | |
20 | "metadata": {}, |
|
20 | "metadata": {}, | |
21 | "source": [ |
|
21 | "source": [ | |
22 | "Back to the main [Index](../Index.ipynb)" |
|
22 | "Back to the main [Index](../Index.ipynb)" | |
23 | ] |
|
23 | ] | |
24 | }, |
|
24 | }, | |
25 | { |
|
25 | { | |
26 | "cell_type": "heading", |
|
26 | "cell_type": "heading", | |
27 | "level": 1, |
|
27 | "level": 1, | |
28 | "metadata": {}, |
|
28 | "metadata": {}, | |
29 | "source": [ |
|
29 | "source": [ | |
30 | "Parallel Computing" |
|
30 | "Parallel Computing" | |
31 | ] |
|
31 | ] | |
32 | }, |
|
32 | }, | |
33 | { |
|
33 | { | |
34 | "cell_type": "markdown", |
|
34 | "cell_type": "markdown", | |
35 | "metadata": {}, |
|
35 | "metadata": {}, | |
36 | "source": [ |
|
36 | "source": [ | |
37 | "IPython includes an architecture and library for interactive parallel computing. The enables Python functions, along with their arguments, to be run in parallel a multicore CPU, cluster or cloud using a simple Python API." |
|
37 | "IPython includes an architecture and library for interactive parallel computing. The enables Python functions, along with their arguments, to be run in parallel a multicore CPU, cluster or cloud using a simple Python API." | |
38 | ] |
|
38 | ] | |
39 | }, |
|
39 | }, | |
40 | { |
|
40 | { | |
41 | "cell_type": "heading", |
|
41 | "cell_type": "heading", | |
42 | "level": 2, |
|
42 | "level": 2, | |
43 | "metadata": {}, |
|
43 | "metadata": {}, | |
44 | "source": [ |
|
44 | "source": [ | |
45 | "Tutorials" |
|
45 | "Tutorials" | |
46 | ] |
|
46 | ] | |
47 | }, |
|
47 | }, | |
48 | { |
|
48 | { | |
49 | "cell_type": "markdown", |
|
49 | "cell_type": "markdown", | |
50 | "metadata": {}, |
|
50 | "metadata": {}, | |
51 | "source": [ |
|
51 | "source": [ | |
52 | "* [Data Publication API](Data Publication API.ipynb) " |
|
52 | "* [Data Publication API](Data Publication API.ipynb) " | |
53 | ] |
|
53 | ] | |
54 | }, |
|
54 | }, | |
55 | { |
|
55 | { | |
56 | "cell_type": "heading", |
|
56 | "cell_type": "heading", | |
57 | "level": 2, |
|
57 | "level": 2, | |
58 | "metadata": {}, |
|
58 | "metadata": {}, | |
59 | "source": [ |
|
59 | "source": [ | |
60 | "Examples" |
|
60 | "Examples" | |
61 | ] |
|
61 | ] | |
62 | }, |
|
62 | }, | |
63 | { |
|
63 | { | |
64 | "cell_type": "markdown", |
|
64 | "cell_type": "markdown", | |
65 | "metadata": {}, |
|
65 | "metadata": {}, | |
66 | "source": [ |
|
66 | "source": [ | |
67 | "* [Monitoring an MPI Simulation - 1](Monitoring an MPI Simulation - 1.ipynb)\n", |
|
67 | "* [Monitoring an MPI Simulation - 1](Monitoring an MPI Simulation - 1.ipynb)\n", | |
68 | "* [Monitoring an MPI Simulation - 2](Monitoring an MPI Simulation - 2.ipynb)\n", |
|
68 | "* [Monitoring an MPI Simulation - 2](Monitoring an MPI Simulation - 2.ipynb)\n", | |
69 | "* [Parallel Decorator and map](Parallel Decorator and map.ipynb)\n", |
|
69 | "* [Parallel Decorator and map](Parallel Decorator and map.ipynb)\n", | |
70 | "* [Parallel Magics](Parallel Magics.ipynb)\n", |
|
70 | "* [Parallel Magics](Parallel Magics.ipynb)\n", | |
71 | "* [Using Dill](Using Dill.ipynb)\n", |
|
71 | "* [Using Dill](Using Dill.ipynb)\n", | |
72 | "* [Using MPI with IPython Parallel](Using MPI with IPython Parallel.ipynb)\n", |
|
72 | "* [Using MPI with IPython Parallel](Using MPI with IPython Parallel.ipynb)\n", | |
73 | "* [Monte Carlo Options](Monte Carlo Options.ipynb)" |
|
73 | "* [Monte Carlo Options](Monte Carlo Options.ipynb)" | |
74 | ] |
|
74 | ] | |
75 | }, |
|
75 | }, | |
76 | { |
|
76 | { | |
77 | "cell_type": "heading", |
|
77 | "cell_type": "heading", | |
78 | "level": 2, |
|
78 | "level": 2, | |
79 | "metadata": {}, |
|
79 | "metadata": {}, | |
80 | "source": [ |
|
80 | "source": [ | |
81 | "Non-notebook examples" |
|
81 | "Non-notebook examples" | |
82 | ] |
|
82 | ] | |
83 | }, |
|
83 | }, | |
84 | { |
|
84 | { | |
85 | "cell_type": "markdown", |
|
85 | "cell_type": "markdown", | |
86 | "metadata": {}, |
|
86 | "metadata": {}, | |
87 | "source": [ |
|
87 | "source": [ | |
88 | "This directory also contains examples that are regular Python (`.py`) files." |
|
88 | "This directory also contains examples that are regular Python (`.py`) files." | |
89 | ] |
|
89 | ] | |
90 | }, |
|
90 | }, | |
91 | { |
|
91 | { | |
92 | "cell_type": "code", |
|
92 | "cell_type": "code", | |
93 | "collapsed": false, |
|
93 | "collapsed": false, | |
94 | "input": [ |
|
94 | "input": [ | |
95 | "from IPython.display import FileLink, display" |
|
95 | "%run ../list_pyfiles.ipy" | |
96 | ], |
|
|||
97 | "language": "python", |
|
|||
98 | "metadata": {}, |
|
|||
99 | "outputs": [], |
|
|||
100 | "prompt_number": 7 |
|
|||
101 | }, |
|
|||
102 | { |
|
|||
103 | "cell_type": "markdown", |
|
|||
104 | "metadata": {}, |
|
|||
105 | "source": [ |
|
|||
106 | "Here are single file Python examples:" |
|
|||
107 | ] |
|
|||
108 | }, |
|
|||
109 | { |
|
|||
110 | "cell_type": "code", |
|
|||
111 | "collapsed": false, |
|
|||
112 | "input": [ |
|
|||
113 | "files =!ls *.py\n", |
|
|||
114 | "for f in files:\n", |
|
|||
115 | " display(FileLink(f))" |
|
|||
116 | ], |
|
96 | ], | |
117 | "language": "python", |
|
97 | "language": "python", | |
118 | "metadata": {}, |
|
98 | "metadata": {}, | |
119 | "outputs": [ |
|
99 | "outputs": [ | |
120 | { |
|
100 | { | |
121 | "html": [ |
|
101 | "html": [ | |
122 | "<a href='customresults.py' target='_blank'>customresults.py</a><br>" |
|
102 | "<a href='customresults.py' target='_blank'>customresults.py</a><br>" | |
123 | ], |
|
103 | ], | |
124 | "metadata": {}, |
|
104 | "metadata": {}, | |
125 | "output_type": "display_data", |
|
105 | "output_type": "display_data", | |
126 | "text": [ |
|
106 | "text": [ | |
127 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/customresults.py" |
|
107 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/customresults.py" | |
128 | ] |
|
108 | ] | |
129 | }, |
|
109 | }, | |
130 | { |
|
110 | { | |
131 | "html": [ |
|
111 | "html": [ | |
132 | "<a href='dagdeps.py' target='_blank'>dagdeps.py</a><br>" |
|
112 | "<a href='dagdeps.py' target='_blank'>dagdeps.py</a><br>" | |
133 | ], |
|
113 | ], | |
134 | "metadata": {}, |
|
114 | "metadata": {}, | |
135 | "output_type": "display_data", |
|
115 | "output_type": "display_data", | |
136 | "text": [ |
|
116 | "text": [ | |
137 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/dagdeps.py" |
|
117 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/dagdeps.py" | |
138 | ] |
|
118 | ] | |
139 | }, |
|
119 | }, | |
140 | { |
|
120 | { | |
141 | "html": [ |
|
121 | "html": [ | |
142 | "<a href='dependencies.py' target='_blank'>dependencies.py</a><br>" |
|
122 | "<a href='dependencies.py' target='_blank'>dependencies.py</a><br>" | |
143 | ], |
|
123 | ], | |
144 | "metadata": {}, |
|
124 | "metadata": {}, | |
145 | "output_type": "display_data", |
|
125 | "output_type": "display_data", | |
146 | "text": [ |
|
126 | "text": [ | |
147 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/dependencies.py" |
|
127 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/dependencies.py" | |
148 | ] |
|
128 | ] | |
149 | }, |
|
129 | }, | |
150 | { |
|
130 | { | |
151 | "html": [ |
|
131 | "html": [ | |
152 | "<a href='fetchparse.py' target='_blank'>fetchparse.py</a><br>" |
|
132 | "<a href='fetchparse.py' target='_blank'>fetchparse.py</a><br>" | |
153 | ], |
|
133 | ], | |
154 | "metadata": {}, |
|
134 | "metadata": {}, | |
155 | "output_type": "display_data", |
|
135 | "output_type": "display_data", | |
156 | "text": [ |
|
136 | "text": [ | |
157 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/fetchparse.py" |
|
137 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/fetchparse.py" | |
158 | ] |
|
138 | ] | |
159 | }, |
|
139 | }, | |
160 | { |
|
140 | { | |
161 | "html": [ |
|
141 | "html": [ | |
162 | "<a href='iopubwatcher.py' target='_blank'>iopubwatcher.py</a><br>" |
|
142 | "<a href='iopubwatcher.py' target='_blank'>iopubwatcher.py</a><br>" | |
163 | ], |
|
143 | ], | |
164 | "metadata": {}, |
|
144 | "metadata": {}, | |
165 | "output_type": "display_data", |
|
145 | "output_type": "display_data", | |
166 | "text": [ |
|
146 | "text": [ | |
167 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/iopubwatcher.py" |
|
147 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/iopubwatcher.py" | |
168 | ] |
|
148 | ] | |
169 | }, |
|
149 | }, | |
170 | { |
|
150 | { | |
171 | "html": [ |
|
151 | "html": [ | |
172 | "<a href='itermapresult.py' target='_blank'>itermapresult.py</a><br>" |
|
152 | "<a href='itermapresult.py' target='_blank'>itermapresult.py</a><br>" | |
173 | ], |
|
153 | ], | |
174 | "metadata": {}, |
|
154 | "metadata": {}, | |
175 | "output_type": "display_data", |
|
155 | "output_type": "display_data", | |
176 | "text": [ |
|
156 | "text": [ | |
177 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/itermapresult.py" |
|
157 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/itermapresult.py" | |
178 | ] |
|
158 | ] | |
179 | }, |
|
159 | }, | |
180 | { |
|
160 | { | |
181 | "html": [ |
|
161 | "html": [ | |
182 | "<a href='nwmerge.py' target='_blank'>nwmerge.py</a><br>" |
|
162 | "<a href='nwmerge.py' target='_blank'>nwmerge.py</a><br>" | |
183 | ], |
|
163 | ], | |
184 | "metadata": {}, |
|
164 | "metadata": {}, | |
185 | "output_type": "display_data", |
|
165 | "output_type": "display_data", | |
186 | "text": [ |
|
166 | "text": [ | |
187 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/nwmerge.py" |
|
167 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/nwmerge.py" | |
188 | ] |
|
168 | ] | |
189 | }, |
|
169 | }, | |
190 | { |
|
170 | { | |
191 | "html": [ |
|
171 | "html": [ | |
192 | "<a href='phistogram.py' target='_blank'>phistogram.py</a><br>" |
|
172 | "<a href='phistogram.py' target='_blank'>phistogram.py</a><br>" | |
193 | ], |
|
173 | ], | |
194 | "metadata": {}, |
|
174 | "metadata": {}, | |
195 | "output_type": "display_data", |
|
175 | "output_type": "display_data", | |
196 | "text": [ |
|
176 | "text": [ | |
197 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/phistogram.py" |
|
177 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/phistogram.py" | |
198 | ] |
|
178 | ] | |
199 | }, |
|
179 | }, | |
200 | { |
|
180 | { | |
201 | "html": [ |
|
181 | "html": [ | |
202 | "<a href='task_profiler.py' target='_blank'>task_profiler.py</a><br>" |
|
182 | "<a href='task_profiler.py' target='_blank'>task_profiler.py</a><br>" | |
203 | ], |
|
183 | ], | |
204 | "metadata": {}, |
|
184 | "metadata": {}, | |
205 | "output_type": "display_data", |
|
185 | "output_type": "display_data", | |
206 | "text": [ |
|
186 | "text": [ | |
207 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/task_profiler.py" |
|
187 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/task_profiler.py" | |
208 | ] |
|
188 | ] | |
209 | }, |
|
189 | }, | |
210 | { |
|
190 | { | |
211 | "html": [ |
|
191 | "html": [ | |
212 | "<a href='throughput.py' target='_blank'>throughput.py</a><br>" |
|
192 | "<a href='throughput.py' target='_blank'>throughput.py</a><br>" | |
213 | ], |
|
193 | ], | |
214 | "metadata": {}, |
|
194 | "metadata": {}, | |
215 | "output_type": "display_data", |
|
195 | "output_type": "display_data", | |
216 | "text": [ |
|
196 | "text": [ | |
217 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/throughput.py" |
|
197 | "/Users/bgranger/Documents/Computing/IPython/code/ipython/examples/Parallel Computing/throughput.py" | |
218 | ] |
|
198 | ] | |
219 | } |
|
199 | } | |
220 | ], |
|
200 | ], | |
221 |
"prompt_number": |
|
201 | "prompt_number": 4 | |
222 | }, |
|
202 | }, | |
223 | { |
|
203 | { | |
224 | "cell_type": "markdown", |
|
204 | "cell_type": "markdown", | |
225 | "metadata": {}, |
|
205 | "metadata": {}, | |
226 | "source": [ |
|
206 | "source": [ | |
227 | "More substantial examples can be found in subdirectories:" |
|
207 | "More substantial examples can be found in subdirectories:" | |
228 | ] |
|
208 | ] | |
229 | }, |
|
209 | }, | |
230 | { |
|
210 | { | |
231 | "cell_type": "code", |
|
211 | "cell_type": "code", | |
232 | "collapsed": false, |
|
212 | "collapsed": false, | |
233 | "input": [ |
|
213 | "input": [ | |
234 | "files =!ls -d */\n", |
|
214 | "%run ../list_subdirs.ipy" | |
235 | "for f in files:\n", |
|
|||
236 | " display(FileLinks(f))" |
|
|||
237 | ], |
|
215 | ], | |
238 | "language": "python", |
|
216 | "language": "python", | |
239 | "metadata": {}, |
|
217 | "metadata": {}, | |
240 | "outputs": [ |
|
218 | "outputs": [ | |
241 | { |
|
219 | { | |
242 | "html": [ |
|
220 | "html": [ | |
243 | "daVinci Word Count/<br>\n", |
|
221 | "daVinci Word Count/<br>\n", | |
244 | " <a href='daVinci Word Count/pwordfreq.py' target='_blank'>pwordfreq.py</a><br>\n", |
|
222 | " <a href='daVinci Word Count/pwordfreq.py' target='_blank'>pwordfreq.py</a><br>\n", | |
245 | " <a href='daVinci Word Count/wordfreq.py' target='_blank'>wordfreq.py</a><br>" |
|
223 | " <a href='daVinci Word Count/wordfreq.py' target='_blank'>wordfreq.py</a><br>" | |
246 | ], |
|
224 | ], | |
247 | "metadata": {}, |
|
225 | "metadata": {}, | |
248 | "output_type": "display_data", |
|
226 | "output_type": "display_data", | |
249 | "text": [ |
|
227 | "text": [ | |
250 | "daVinci Word Count/\n", |
|
228 | "daVinci Word Count/\n", | |
251 | " pwordfreq.py\n", |
|
229 | " pwordfreq.py\n", | |
252 | " wordfreq.py" |
|
230 | " wordfreq.py" | |
253 | ] |
|
231 | ] | |
254 | }, |
|
232 | }, | |
255 | { |
|
233 | { | |
256 | "html": [ |
|
234 | "html": [ | |
257 | "interengine/<br>\n", |
|
235 | "interengine/<br>\n", | |
258 | " <a href='interengine/bintree.py' target='_blank'>bintree.py</a><br>\n", |
|
236 | " <a href='interengine/bintree.py' target='_blank'>bintree.py</a><br>\n", | |
259 | " <a href='interengine/bintree_script.py' target='_blank'>bintree_script.py</a><br>\n", |
|
237 | " <a href='interengine/bintree_script.py' target='_blank'>bintree_script.py</a><br>\n", | |
260 | " <a href='interengine/communicator.py' target='_blank'>communicator.py</a><br>\n", |
|
238 | " <a href='interengine/communicator.py' target='_blank'>communicator.py</a><br>\n", | |
261 | " <a href='interengine/interengine.py' target='_blank'>interengine.py</a><br>" |
|
239 | " <a href='interengine/interengine.py' target='_blank'>interengine.py</a><br>" | |
262 | ], |
|
240 | ], | |
263 | "metadata": {}, |
|
241 | "metadata": {}, | |
264 | "output_type": "display_data", |
|
242 | "output_type": "display_data", | |
265 | "text": [ |
|
243 | "text": [ | |
266 | "interengine/\n", |
|
244 | "interengine/\n", | |
267 | " bintree.py\n", |
|
245 | " bintree.py\n", | |
268 | " bintree_script.py\n", |
|
246 | " bintree_script.py\n", | |
269 | " communicator.py\n", |
|
247 | " communicator.py\n", | |
270 | " interengine.py" |
|
248 | " interengine.py" | |
271 | ] |
|
249 | ] | |
272 | }, |
|
250 | }, | |
273 | { |
|
251 | { | |
274 | "html": [], |
|
252 | "html": [], | |
275 | "metadata": {}, |
|
253 | "metadata": {}, | |
276 | "output_type": "display_data", |
|
254 | "output_type": "display_data", | |
277 | "text": [] |
|
255 | "text": [] | |
278 | }, |
|
256 | }, | |
279 | { |
|
257 | { | |
280 | "html": [ |
|
258 | "html": [ | |
281 | "pi/<br>\n", |
|
259 | "pi/<br>\n", | |
282 | " <a href='pi/parallelpi.py' target='_blank'>parallelpi.py</a><br>\n", |
|
260 | " <a href='pi/parallelpi.py' target='_blank'>parallelpi.py</a><br>\n", | |
283 | " <a href='pi/pidigits.py' target='_blank'>pidigits.py</a><br>" |
|
261 | " <a href='pi/pidigits.py' target='_blank'>pidigits.py</a><br>" | |
284 | ], |
|
262 | ], | |
285 | "metadata": {}, |
|
263 | "metadata": {}, | |
286 | "output_type": "display_data", |
|
264 | "output_type": "display_data", | |
287 | "text": [ |
|
265 | "text": [ | |
288 | "pi/\n", |
|
266 | "pi/\n", | |
289 | " parallelpi.py\n", |
|
267 | " parallelpi.py\n", | |
290 | " pidigits.py" |
|
268 | " pidigits.py" | |
291 | ] |
|
269 | ] | |
292 | }, |
|
270 | }, | |
293 | { |
|
271 | { | |
294 | "html": [ |
|
272 | "html": [ | |
295 | "rmt/<br>\n", |
|
273 | "rmt/<br>\n", | |
296 | " <a href='rmt/rmt.ipy' target='_blank'>rmt.ipy</a><br>\n", |
|
274 | " <a href='rmt/rmt.ipy' target='_blank'>rmt.ipy</a><br>\n", | |
297 | " <a href='rmt/rmt.ipynb' target='_blank'>rmt.ipynb</a><br>\n", |
|
275 | " <a href='rmt/rmt.ipynb' target='_blank'>rmt.ipynb</a><br>\n", | |
298 | " <a href='rmt/rmtkernel.py' target='_blank'>rmtkernel.py</a><br>" |
|
276 | " <a href='rmt/rmtkernel.py' target='_blank'>rmtkernel.py</a><br>" | |
299 | ], |
|
277 | ], | |
300 | "metadata": {}, |
|
278 | "metadata": {}, | |
301 | "output_type": "display_data", |
|
279 | "output_type": "display_data", | |
302 | "text": [ |
|
280 | "text": [ | |
303 | "rmt/\n", |
|
281 | "rmt/\n", | |
304 | " rmt.ipy\n", |
|
282 | " rmt.ipy\n", | |
305 | " rmt.ipynb\n", |
|
283 | " rmt.ipynb\n", | |
306 | " rmtkernel.py" |
|
284 | " rmtkernel.py" | |
307 | ] |
|
285 | ] | |
308 | }, |
|
286 | }, | |
309 | { |
|
287 | { | |
310 | "html": [ |
|
288 | "html": [ | |
311 | "wave2D/<br>\n", |
|
289 | "wave2D/<br>\n", | |
312 | " <a href='wave2D/communicator.py' target='_blank'>communicator.py</a><br>\n", |
|
290 | " <a href='wave2D/communicator.py' target='_blank'>communicator.py</a><br>\n", | |
313 | " <a href='wave2D/parallelwave-mpi.py' target='_blank'>parallelwave-mpi.py</a><br>\n", |
|
291 | " <a href='wave2D/parallelwave-mpi.py' target='_blank'>parallelwave-mpi.py</a><br>\n", | |
314 | " <a href='wave2D/parallelwave.py' target='_blank'>parallelwave.py</a><br>\n", |
|
292 | " <a href='wave2D/parallelwave.py' target='_blank'>parallelwave.py</a><br>\n", | |
315 | " <a href='wave2D/RectPartitioner.py' target='_blank'>RectPartitioner.py</a><br>\n", |
|
293 | " <a href='wave2D/RectPartitioner.py' target='_blank'>RectPartitioner.py</a><br>\n", | |
316 | " <a href='wave2D/wavesolver.py' target='_blank'>wavesolver.py</a><br>" |
|
294 | " <a href='wave2D/wavesolver.py' target='_blank'>wavesolver.py</a><br>" | |
317 | ], |
|
295 | ], | |
318 | "metadata": {}, |
|
296 | "metadata": {}, | |
319 | "output_type": "display_data", |
|
297 | "output_type": "display_data", | |
320 | "text": [ |
|
298 | "text": [ | |
321 | "wave2D/\n", |
|
299 | "wave2D/\n", | |
322 | " communicator.py\n", |
|
300 | " communicator.py\n", | |
323 | " parallelwave-mpi.py\n", |
|
301 | " parallelwave-mpi.py\n", | |
324 | " parallelwave.py\n", |
|
302 | " parallelwave.py\n", | |
325 | " RectPartitioner.py\n", |
|
303 | " RectPartitioner.py\n", | |
326 | " wavesolver.py" |
|
304 | " wavesolver.py" | |
327 | ] |
|
305 | ] | |
328 | }, |
|
306 | }, | |
329 | { |
|
307 | { | |
330 | "html": [ |
|
308 | "html": [ | |
331 | "workflow/<br>\n", |
|
309 | "workflow/<br>\n", | |
332 | " <a href='workflow/client.py' target='_blank'>client.py</a><br>\n", |
|
310 | " <a href='workflow/client.py' target='_blank'>client.py</a><br>\n", | |
333 | " <a href='workflow/job_wrapper.py' target='_blank'>job_wrapper.py</a><br>\n", |
|
311 | " <a href='workflow/job_wrapper.py' target='_blank'>job_wrapper.py</a><br>\n", | |
334 | " <a href='workflow/wmanager.py' target='_blank'>wmanager.py</a><br>" |
|
312 | " <a href='workflow/wmanager.py' target='_blank'>wmanager.py</a><br>" | |
335 | ], |
|
313 | ], | |
336 | "metadata": {}, |
|
314 | "metadata": {}, | |
337 | "output_type": "display_data", |
|
315 | "output_type": "display_data", | |
338 | "text": [ |
|
316 | "text": [ | |
339 | "workflow/\n", |
|
317 | "workflow/\n", | |
340 | " client.py\n", |
|
318 | " client.py\n", | |
341 | " job_wrapper.py\n", |
|
319 | " job_wrapper.py\n", | |
342 | " wmanager.py" |
|
320 | " wmanager.py" | |
343 | ] |
|
321 | ] | |
344 | } |
|
322 | } | |
345 | ], |
|
323 | ], | |
346 |
"prompt_number": |
|
324 | "prompt_number": 3 | |
347 | } |
|
325 | } | |
348 | ], |
|
326 | ], | |
349 | "metadata": {} |
|
327 | "metadata": {} | |
350 | } |
|
328 | } | |
351 | ] |
|
329 | ] | |
352 | } No newline at end of file |
|
330 | } |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now