From 498d5d814522b84c043bc3b9e6d6d1809fdcb785 Mon Sep 17 00:00:00 2001 From: Steven Clontz Date: Wed, 7 Aug 2024 20:24:03 +0000 Subject: [PATCH] usable chapter --- source/ch-first-repo.ptx | 22 +++++--- source/ch-jupyter.ptx | 110 +++++++++++++++++++++++++-------------- 2 files changed, 85 insertions(+), 47 deletions(-) diff --git a/source/ch-first-repo.ptx b/source/ch-first-repo.ptx index f03cb95..fa14ac8 100644 --- a/source/ch-first-repo.ptx +++ b/source/ch-first-repo.ptx @@ -73,18 +73,26 @@ see .)

An easy way to edit an individual file is just to click the pencil icon such as the one that appears on your README. -This file is written in Markdown, a markup language -that takes plain text like *this* and renders it -like this. +This file is written in Markdown.

+ + +

+Markdown is a markup language +that takes plain text like *this* and renders it +like this. Sites like + and + offer more +complete tutorials. +

+
+

Try to edit your file to say something like I'm learning how to use GitHub!, perhaps adding a link back to this document using [this markup](https://g4m.clontz.org). You -can click the Preview tab to see what your README will look like, -and visit sites like or - to learn -more. GitHub also provides a panel of several formatting options +can click the Preview tab to see what your README will look like. +GitHub also provides a panel of several formatting options you can click on.

diff --git a/source/ch-jupyter.ptx b/source/ch-jupyter.ptx index f85b060..97ae807 100644 --- a/source/ch-jupyter.ptx +++ b/source/ch-jupyter.ptx @@ -60,47 +60,77 @@ README file (). As of writing, it recommends to just use the Code button to open a Codespace, without needing to fork () the repository. This allows you to try out the Codespace -without saving your work long-term. +without saving your work long-term, but you can still create a fork +with your changes later if you decide to.

- +At the core of any Jupyter notebook is its kernel. +

+ + +

+The kernel of a Jupyter notebook is a process that wires up +a notebook to a particular programming language. +

+
+
+

+Kernels for several different programming languages exist. We will use +a Python kernel in this book, not least of which because it's one of the +most commonly used kernels, and the kernel that's already set up for use +with the GitHub Jupyter Codespace repo. +

+

+In your Codespace, use the Select kernel button, to choose +a Python environment. You should be able to select the default +global environment without needing to create a new one. Your notebook +is ready once you see Python 3.x.y (for some values of x,y) +in the upper-right corner of the notebook. +

+ +
+ Cells +

+A notebook is composed of many consecutive parts, known as cells. +

+ + +

+A cell of a notebook encapsulates either +commentary/documentation (as a Markdown cell) or +code (as a Code cell). Cells can be rearranged, +inserted, cut, pasted, and so on. +

+
+
+

+Each Markdown cell uses, well, Markdown () +to describe content that should be displayed to the reader, similar +to a README file in your repository. +

+

+But it's the Code cells that set a notebook apart. Each Code cell +in a notebook is run consecutively, with the result of the final +line of code being displayed for the reader. Importantly, these +outputs are saved to the notebook itself, meaning that by sharing +the notebook with a colleague, they can see the output of your +code without running it themselves! This is not only convenient, +but it's essential when communicating the result of code that +uses software your reader does not have installed themselves. +Likewise, it allows for showing the results of code via a web +browser, such as at +this link. +

+
+
+ A sample notebook +

+I've provided a +sample notebook +that you can upload to your Codespace to experiment with. +

+
\ No newline at end of file