Skip to content

Commit b000b98

Browse files
authored
Refactor Jupyter notebook content and structure (#124)
Updated markdown headers and links, removed execution counts and outputs from code cells.
1 parent 18ea0c8 commit b000b98

File tree

1 file changed

+18
-102
lines changed

1 file changed

+18
-102
lines changed

eg/hello-world.ipynb

Lines changed: 18 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -4,168 +4,84 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"### Welcome to this sample Raku Jupyter notebook!\n",
7+
"# Welcome to this sample Raku Jupyter notebook!\n",
88
"\n",
99
"To run a cell: select it, and press ctrl-return.\n",
1010
"\n",
1111
"To add a new empty cell, press the `+` button on the menu bar.\n",
1212
"\n",
1313
"To run a cell and add a new one after it: press alt-return.\n",
1414
"\n",
15-
"For documentation about Raku, go to http://docs.raku.org.\n",
15+
"For documentation about [Raku](https://raku.org/), go to http://docs.raku.org.\n",
1616
"\n",
17-
"For documentation about this Jupyter Kernel, go to http://github.com/bduggan/p6-jupyter-kernel.\n",
17+
"For documentation about this Jupyter Kernel, go to https://github.com/bduggan/raku-jupyter-kernel.\n",
1818
"\n",
1919
"Have fun!"
2020
]
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": 1,
24+
"execution_count": null,
2525
"metadata": {
2626
"scrolled": true
2727
},
28-
"outputs": [
29-
{
30-
"data": {
31-
"text/plain": [
32-
"hello, world"
33-
]
34-
},
35-
"execution_count": 1,
36-
"metadata": {},
37-
"output_type": "execute_result"
38-
}
39-
],
28+
"outputs": [],
4029
"source": [
4130
"\"hello, world\""
4231
]
4332
},
4433
{
4534
"cell_type": "code",
46-
"execution_count": 2,
35+
"execution_count": null,
4736
"metadata": {},
48-
"outputs": [
49-
{
50-
"data": {
51-
"text/plain": [
52-
"170141183460469231731687303715884105727"
53-
]
54-
},
55-
"execution_count": 2,
56-
"metadata": {},
57-
"output_type": "execute_result"
58-
}
59-
],
37+
"outputs": [],
6038
"source": [
6139
"# To type this, you can type '2 **' and then press tab to help type exponents.\n",
6240
"my $n = 2¹²⁷ - 1;"
6341
]
6442
},
6543
{
6644
"cell_type": "code",
67-
"execution_count": 3,
45+
"execution_count": null,
6846
"metadata": {},
69-
"outputs": [
70-
{
71-
"data": {
72-
"text/plain": [
73-
"True"
74-
]
75-
},
76-
"execution_count": 3,
77-
"metadata": {},
78-
"output_type": "execute_result"
79-
}
80-
],
47+
"outputs": [],
8148
"source": [
8249
"# _ refers to the last output\n",
8350
"is-prime( _ )"
8451
]
8552
},
8653
{
8754
"cell_type": "code",
88-
"execution_count": 4,
55+
"execution_count": null,
8956
"metadata": {},
90-
"outputs": [
91-
{
92-
"data": {
93-
"text/plain": [
94-
"127"
95-
]
96-
},
97-
"execution_count": 4,
98-
"metadata": {},
99-
"output_type": "execute_result"
100-
}
101-
],
57+
"outputs": [],
10258
"source": [
10359
"( Out[2] + 1).log(2); # you can also refer to Out[...]"
10460
]
10561
},
10662
{
10763
"cell_type": "code",
108-
"execution_count": 5,
64+
"execution_count": null,
10965
"metadata": {},
110-
"outputs": [
111-
{
112-
"data": {
113-
"text/plain": [
114-
"[...]"
115-
]
116-
},
117-
"execution_count": 5,
118-
"metadata": {},
119-
"output_type": "execute_result"
120-
}
121-
],
66+
"outputs": [],
12267
"source": [
12368
"my @fib = 1, 1, * + * ... ∞"
12469
]
12570
},
12671
{
12772
"cell_type": "code",
128-
"execution_count": 6,
73+
"execution_count": null,
12974
"metadata": {},
130-
"outputs": [
131-
{
132-
"data": {
133-
"text/plain": [
134-
"(1 1 2 3 5 8 13 21 34 55 89)"
135-
]
136-
},
137-
"execution_count": 6,
138-
"metadata": {},
139-
"output_type": "execute_result"
140-
}
141-
],
75+
"outputs": [],
14276
"source": [
14377
"@fib[0..10]"
14478
]
14579
},
14680
{
14781
"cell_type": "code",
148-
"execution_count": 7,
82+
"execution_count": null,
14983
"metadata": {},
150-
"outputs": [
151-
{
152-
"name": "stdout",
153-
"output_type": "stream",
154-
"text": [
155-
"this goes to stdout\n"
156-
]
157-
},
158-
{
159-
"data": {
160-
"text/plain": [
161-
"42"
162-
]
163-
},
164-
"execution_count": 7,
165-
"metadata": {},
166-
"output_type": "execute_result"
167-
}
168-
],
84+
"outputs": [],
16985
"source": [
17086
"say \"this goes to stdout\";\n",
17187
"42 # this is an output expression"
@@ -186,5 +102,5 @@
186102
}
187103
},
188104
"nbformat": 4,
189-
"nbformat_minor": 2
105+
"nbformat_minor": 4
190106
}

0 commit comments

Comments
 (0)