Show More
@@ -810,16 +810,16 b' Please look at the docstrings in the :mod:`~IPython.frontend.terminal.embed`' | |||||
810 | module for more details on the use of this system. |
|
810 | module for more details on the use of this system. | |
811 |
|
811 | |||
812 | The following sample file illustrating how to use the embedding |
|
812 | The following sample file illustrating how to use the embedding | |
813 |
functionality is provided in the examples directory as e |
|
813 | functionality is provided in the examples directory as embed_class_long.py. | |
814 | It should be fairly self-explanatory: |
|
814 | It should be fairly self-explanatory: | |
815 |
|
815 | |||
816 |
.. literalinclude:: ../../../examples/ |
|
816 | .. literalinclude:: ../../../examples/Embedding/embed_class_long.py | |
817 | :language: python |
|
817 | :language: python | |
818 |
|
818 | |||
819 | Once you understand how the system functions, you can use the following |
|
819 | Once you understand how the system functions, you can use the following | |
820 | code fragments in your programs which are ready for cut and paste: |
|
820 | code fragments in your programs which are ready for cut and paste: | |
821 |
|
821 | |||
822 |
.. literalinclude:: ../../../examples/ |
|
822 | .. literalinclude:: ../../../examples/Embedding/embed_class_short.py | |
823 | :language: python |
|
823 | :language: python | |
824 |
|
824 | |||
825 | Using the Python debugger (pdb) |
|
825 | Using the Python debugger (pdb) | |
@@ -1059,7 +1059,7 b' want to continue, you simply execute the next block of the demo. The' | |||||
1059 | following listing shows the markup necessary for dividing a script into |
|
1059 | following listing shows the markup necessary for dividing a script into | |
1060 | sections for execution as a demo: |
|
1060 | sections for execution as a demo: | |
1061 |
|
1061 | |||
1062 |
.. literalinclude:: ../../../examples/l |
|
1062 | .. literalinclude:: ../../../examples/IPython Kernel/example-demo.py | |
1063 | :language: python |
|
1063 | :language: python | |
1064 |
|
1064 | |||
1065 | In order to run a file as a demo, you must first make a Demo object out |
|
1065 | In order to run a file as a demo, you must first make a Demo object out |
@@ -103,7 +103,7 b' Map results are iterable!' | |||||
103 | When an AsyncResult object has multiple results (e.g. the :class:`~AsyncMapResult` |
|
103 | When an AsyncResult object has multiple results (e.g. the :class:`~AsyncMapResult` | |
104 | object), you can actually iterate through results themselves, and act on them as they arrive: |
|
104 | object), you can actually iterate through results themselves, and act on them as they arrive: | |
105 |
|
105 | |||
106 |
.. literalinclude:: ../../../examples/ |
|
106 | .. literalinclude:: ../../../examples/Parallel Computing/itermapresult.py | |
107 | :language: python |
|
107 | :language: python | |
108 | :lines: 20-67 |
|
108 | :lines: 20-67 | |
109 |
|
109 |
@@ -81,7 +81,7 b' The code to generate the simple DAG:' | |||||
81 | For demonstration purposes, we have a function that generates a random DAG with a given |
|
81 | For demonstration purposes, we have a function that generates a random DAG with a given | |
82 | number of nodes and edges. |
|
82 | number of nodes and edges. | |
83 |
|
83 | |||
84 |
.. literalinclude:: ../../../examples/ |
|
84 | .. literalinclude:: ../../../examples/Parallel Computing/dagdeps.py | |
85 | :language: python |
|
85 | :language: python | |
86 | :lines: 20-36 |
|
86 | :lines: 20-36 | |
87 |
|
87 | |||
@@ -140,7 +140,7 b' These objects store a variety of metadata about each task, including various tim' | |||||
140 | We can validate that the dependencies were respected by checking that each task was |
|
140 | We can validate that the dependencies were respected by checking that each task was | |
141 | started after all of its predecessors were completed: |
|
141 | started after all of its predecessors were completed: | |
142 |
|
142 | |||
143 |
.. literalinclude:: ../../../examples/ |
|
143 | .. literalinclude:: ../../../examples/Parallel Computing/dagdeps.py | |
144 | :language: python |
|
144 | :language: python | |
145 | :lines: 64-70 |
|
145 | :lines: 64-70 | |
146 |
|
146 |
@@ -102,7 +102,7 b' compute the two digit counts for the digits in a single file. Then in a final' | |||||
102 | step the counts from each engine will be added up. To perform this |
|
102 | step the counts from each engine will be added up. To perform this | |
103 | calculation, we will need two top-level functions from :file:`pidigits.py`: |
|
103 | calculation, we will need two top-level functions from :file:`pidigits.py`: | |
104 |
|
104 | |||
105 |
.. literalinclude:: ../../../examples/ |
|
105 | .. literalinclude:: ../../../examples/Parallel Computing/pi/pidigits.py | |
106 | :language: python |
|
106 | :language: python | |
107 | :lines: 47-62 |
|
107 | :lines: 47-62 | |
108 |
|
108 |
General Comments 0
You need to be logged in to leave comments.
Login now