From 96b11fd35c268bb3a43b698e0ffc458931d94931 Mon Sep 17 00:00:00 2001 From: Jeremy Howard Date: Sun, 20 Oct 2024 08:26:50 +1000 Subject: [PATCH] update --- nbs/tutorials/tutorial.ipynb | 41 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/nbs/tutorials/tutorial.ipynb b/nbs/tutorials/tutorial.ipynb index 562014899..6f7501f39 100644 --- a/nbs/tutorials/tutorial.ipynb +++ b/nbs/tutorials/tutorial.ipynb @@ -864,7 +864,7 @@ "\n", "> say_hello (to)\n", "\n", - "Say hello to somebody\n", + "*Say hello to somebody*\n", "\n", ":::\n", "\n", @@ -1130,6 +1130,21 @@ "This will automatically appear in the docs like this:" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "class HelloSayer:\n", + " \"Say hello to `to` using `say_hello`\"\n", + " def __init__(self, to): self.to = to\n", + "\n", + " def say(self):\n", + " \"Do the saying\"\n", + " return say_hello(self.to)" + ] + }, { "cell_type": "code", "execution_count": null, @@ -1140,24 +1155,20 @@ "text/markdown": [ "---\n", "\n", - "[source](https://github.com/fastai/nbdevblob/master/nbdev/tutorial.py#L12){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", - "\n", "### HelloSayer\n", "\n", "> HelloSayer (to)\n", "\n", - "Say hello to `to` using `say_hello`" + "*Say hello to `to` using `say_hello`*" ], "text/plain": [ "---\n", "\n", - "[source](https://github.com/fastai/nbdevblob/master/nbdev/tutorial.py#L12){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", - "\n", "### HelloSayer\n", "\n", "> HelloSayer (to)\n", "\n", - "Say hello to `to` using `say_hello`" + "*Say hello to `to` using `say_hello`*" ] }, "execution_count": null, @@ -1166,14 +1177,6 @@ } ], "source": [ - "class HelloSayer:\n", - " \"Say hello to `to` using `say_hello`\"\n", - " def __init__(self, to): self.to = to\n", - "\n", - " def say(self):\n", - " \"Do the saying\"\n", - " return say_hello(self.to)\n", - "\n", "show_doc(HelloSayer)" ] }, @@ -1205,24 +1208,20 @@ "text/markdown": [ "---\n", "\n", - "[source](https://github.com/fastai/nbdevblob/master/nbdev/tutorial.py#LNone){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", - "\n", "### HelloSayer.say\n", "\n", "> HelloSayer.say ()\n", "\n", - "Do the saying" + "*Do the saying*" ], "text/plain": [ "---\n", "\n", - "[source](https://github.com/fastai/nbdevblob/master/nbdev/tutorial.py#LNone){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", - "\n", "### HelloSayer.say\n", "\n", "> HelloSayer.say ()\n", "\n", - "Do the saying" + "*Do the saying*" ] }, "execution_count": null,