Skip to content

Commit f45085f

Browse files
committed
Latest modifications
1 parent 5a4e8c8 commit f45085f

File tree

1 file changed

+74
-22
lines changed

1 file changed

+74
-22
lines changed

quickbook.ipynb

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,40 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": null,
24+
"execution_count": 1,
2525
"metadata": {
26-
"id": "buOgxm25ONit"
26+
"id": "buOgxm25ONit",
27+
"outputId": "f4e5a5c0-eb5d-4c8a-a22d-43df1c87c27b",
28+
"colab": {
29+
"base_uri": "https://localhost:8080/"
30+
}
2731
},
28-
"outputs": [],
32+
"outputs": [
33+
{
34+
"output_type": "stream",
35+
"name": "stdout",
36+
"text": [
37+
"Installing the latest version of Magic...\n",
38+
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
39+
" Dload Upload Total Spent Left Speed\n",
40+
" 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0\n",
41+
"100 49.9M 100 49.9M 0 0 16.3M 0 0:00:03 0:00:03 --:--:-- 52.1M\n",
42+
"Done. The 'magic' binary is in '/root/.modular/bin'\n",
43+
"\n",
44+
"Two more steps:\n",
45+
"1. To use 'magic', run this command so it's in your PATH:\n",
46+
"source /root/.bashrc\n",
47+
"2. To build with MAX and Mojo, go to http://modul.ar/get-started\n"
48+
]
49+
}
50+
],
2951
"source": [
3052
"!curl -ssL https://magic.modular.com/ | bash"
3153
]
3254
},
3355
{
3456
"cell_type": "code",
35-
"execution_count": null,
57+
"execution_count": 2,
3658
"metadata": {
3759
"id": "FVZvyhRiONiw"
3860
},
@@ -44,35 +66,59 @@
4466
},
4567
{
4668
"cell_type": "code",
47-
"execution_count": null,
69+
"execution_count": 3,
4870
"metadata": {
49-
"id": "TqFD0EK0ONiw"
71+
"id": "TqFD0EK0ONiw",
72+
"outputId": "2c764610-85dc-480c-8035-4d66f77bf393",
73+
"colab": {
74+
"base_uri": "https://localhost:8080/"
75+
}
5076
},
51-
"outputs": [],
77+
"outputs": [
78+
{
79+
"output_type": "stream",
80+
"name": "stdout",
81+
"text": [
82+
"\u001b[32m✔ \u001b[0mCreated /content/codes/mojoproject.toml\n"
83+
]
84+
}
85+
],
5286
"source": [
5387
"!magic init codes --format mojoproject"
5488
]
5589
},
5690
{
5791
"cell_type": "code",
58-
"execution_count": null,
92+
"execution_count": 4,
5993
"metadata": {
60-
"id": "k3Ddb6GcONiw"
94+
"id": "k3Ddb6GcONiw",
95+
"outputId": "7742dea4-6b54-45ad-c392-0a5a5ae1303e",
96+
"colab": {
97+
"base_uri": "https://localhost:8080/"
98+
}
6199
},
62-
"outputs": [],
100+
"outputs": [
101+
{
102+
"output_type": "stream",
103+
"name": "stdout",
104+
"text": [
105+
"/content/codes\n"
106+
]
107+
}
108+
],
63109
"source": [
64110
"%cd codes/"
65111
]
66112
},
67113
{
68114
"cell_type": "code",
69-
"execution_count": 59,
115+
"execution_count": 107,
70116
"metadata": {
71117
"id": "IaxB1auxONix",
72118
"colab": {
73119
"base_uri": "https://localhost:8080/"
74120
},
75-
"outputId": "810bf461-0f64-4580-f4eb-09f7cf2f846a"
121+
"outputId": "9fcaae95-97f2-4ee2-8f77-a90b36e98fc3"
76122
},
77123
"outputs": [
78124
{
@@ -124,27 +170,33 @@
124170
" result = merge_intervals(intervals)\n",
125171
" i = 0\n",
126172
" for each in result:\n",
127-
" assert_true(each[][0] == expected[i][0] and each[][1] == expected[i][1], \"Assertion failed\")\n",
173+
" assert_true(\n",
174+
" each[][0] == expected[i][0] and each[][1] == expected[i][1],\n",
175+
" \"Assertion failed\",\n",
176+
" )\n",
128177
" i += 1\n",
129178
"\n",
130-
" intervals = List[(Int, Int)]((1,4),(4,5))\n",
179+
" intervals = List[(Int, Int)]((1, 4), (4, 5))\n",
131180
" expected = List[(Int, Int)]((1, 5))\n",
132181
" result = merge_intervals(intervals)\n",
133182
" i = 0\n",
134183
" for each in result:\n",
135-
" assert_true(each[][0] == expected[i][0] and each[][1] == expected[i][1], \"Assertion failed\")\n",
136-
" i += 1"
184+
" assert_true(\n",
185+
" each[][0] == expected[i][0] and each[][1] == expected[i][1],\n",
186+
" \"Assertion failed\",\n",
187+
" )\n",
188+
" i += 1\n"
137189
]
138190
},
139191
{
140192
"cell_type": "code",
141-
"execution_count": 60,
193+
"execution_count": 108,
142194
"metadata": {
143195
"colab": {
144196
"base_uri": "https://localhost:8080/"
145197
},
146198
"id": "h2k9wkDaONiz",
147-
"outputId": "eb626910-8fa3-4efa-c748-11dd140951ab"
199+
"outputId": "5b2461ab-4ee4-4633-8572-6ee7dd647738"
148200
},
149201
"outputs": [
150202
{
@@ -161,13 +213,13 @@
161213
},
162214
{
163215
"cell_type": "code",
164-
"execution_count": 61,
216+
"execution_count": 105,
165217
"metadata": {
166218
"colab": {
167219
"base_uri": "https://localhost:8080/"
168220
},
169221
"id": "bSglX7bNONi0",
170-
"outputId": "8b032107-fc51-4c3e-c72e-73ed37c2585e"
222+
"outputId": "24e912a4-ecc5-463d-a848-21189408635e"
171223
},
172224
"outputs": [
173225
{
@@ -195,9 +247,9 @@
195247
"base_uri": "https://localhost:8080/"
196248
},
197249
"id": "z2OxrAfbJYKc",
198-
"outputId": "a908ca4c-119f-45ff-df1f-c70edd0b4750"
250+
"outputId": "d1d2aea5-9b68-46a8-fe4d-3afebb806331"
199251
},
200-
"execution_count": 62,
252+
"execution_count": 106,
201253
"outputs": [
202254
{
203255
"output_type": "stream",

0 commit comments

Comments
 (0)