##// END OF EJS Templates
Merge pull request #1779 from takluyver/i1778...
Merge pull request #1779 from takluyver/i1778 Tidy up error raising in magic decorators, change a few exceptions for more appropriate kinds in new magics code. Closes gh-1778.

File last commit:

r6035:3077781f
r7048:5e21b9ee merge
Show More
helloworld.ipynb
91 lines | 1.8 KiB | text/plain | TextLexer
Brian E. Granger
Converting notebooks to JSON format.
r4634 {
MinRK
regenerate example notebooks to remove transformed output
r5981 "metadata": {
"name": "helloworld"
Brian Granger
Updating example notebooks to v3 format.
r6035 },
"nbformat": 3,
MinRK
regenerate example notebooks to remove transformed output
r5981 "worksheets": [
{
"cells": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "markdown",
MinRK
regenerate example notebooks to remove transformed output
r5981 "source": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "# Distributed hello world",
"",
MinRK
regenerate example notebooks to remove transformed output
r5981 "Originally by Ken Kinder (ken at kenkinder dom com)"
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": true,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
"from IPython.parallel import Client"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
"outputs": [],
MinRK
regenerate example notebooks to remove transformed output
r5981 "prompt_number": 1
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": true,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "rc = Client()",
MinRK
regenerate example notebooks to remove transformed output
r5981 "view = rc.load_balanced_view()"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
"outputs": [],
MinRK
regenerate example notebooks to remove transformed output
r5981 "prompt_number": 2
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": true,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "def sleep_and_echo(t, msg):",
" import time",
" time.sleep(t)",
MinRK
regenerate example notebooks to remove transformed output
r5981 " return msg"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
"outputs": [],
MinRK
regenerate example notebooks to remove transformed output
r5981 "prompt_number": 3
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": true,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "world = view.apply_async(sleep_and_echo, 3, 'World!')",
MinRK
regenerate example notebooks to remove transformed output
r5981 "hello = view.apply_async(sleep_and_echo, 2, 'Hello')"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
"outputs": [],
MinRK
regenerate example notebooks to remove transformed output
r5981 "prompt_number": 4
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "cell_type": "code",
"collapsed": false,
MinRK
regenerate example notebooks to remove transformed output
r5981 "input": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "print \"Submitted tasks:\", hello.msg_ids, world.msg_ids",
MinRK
regenerate example notebooks to remove transformed output
r5981 "print hello.get(), world.get()"
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
"language": "python",
MinRK
regenerate example notebooks to remove transformed output
r5981 "outputs": [
{
Brian Granger
Updating example notebooks to v3 format.
r6035 "output_type": "stream",
"stream": "stdout",
MinRK
regenerate example notebooks to remove transformed output
r5981 "text": [
Brian Granger
Updating example notebooks to v3 format.
r6035 "Submitted tasks: ['dd1052e0-aa75-4b25-9d35-ecbdaf6e3ed7'] ['1b46aa21-20d1-459c-bc36-2d8d03336f74']",
MinRK
regenerate example notebooks to remove transformed output
r5981 "Hello"
]
Brian Granger
Updating example notebooks to v3 format.
r6035 },
MinRK
regenerate example notebooks to remove transformed output
r5981 {
Brian Granger
Updating example notebooks to v3 format.
r6035 "output_type": "stream",
"stream": "stdout",
MinRK
regenerate example notebooks to remove transformed output
r5981 "text": [
" World!"
]
}
Brian Granger
Updating example notebooks to v3 format.
r6035 ],
MinRK
regenerate example notebooks to remove transformed output
r5981 "prompt_number": 5
}
]
}
]
Brian E. Granger
Converting notebooks to JSON format.
r4634 }