From 4a567c413adc1d57eab41cf5ff2c9351aa00a7df Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Sun, 7 Jun 2026 23:26:31 +0200 Subject: [PATCH] Wrote blog --- cyperpunk.de/src/components/Sidebar.astro | 2 +- .../src/content/posts/python_tut_1.md | 48 +++++++++++++++++++ cyperpunk.de/src/content/posts/template.md | 6 +++ cyperpunk.de/src/content/posts/test.md | 2 +- 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 cyperpunk.de/src/content/posts/python_tut_1.md create mode 100644 cyperpunk.de/src/content/posts/template.md diff --git a/cyperpunk.de/src/components/Sidebar.astro b/cyperpunk.de/src/components/Sidebar.astro index e4ec845..23802ca 100644 --- a/cyperpunk.de/src/components/Sidebar.astro +++ b/cyperpunk.de/src/components/Sidebar.astro @@ -41,7 +41,7 @@ const links = [ topics
{tags.map((tag) => ( - + {tag} ))} diff --git a/cyperpunk.de/src/content/posts/python_tut_1.md b/cyperpunk.de/src/content/posts/python_tut_1.md new file mode 100644 index 0000000..92b4bfc --- /dev/null +++ b/cyperpunk.de/src/content/posts/python_tut_1.md @@ -0,0 +1,48 @@ +--- +title: Learning Python - Tutorial 1 +date: 2026-06-07 +published: true +tags: [python, programming, teaching] +--- + +# Learning Python - Tutorial 1 + +## Getting Jupyter Running +First of all, this Tutorial assumes that you already have access to a python environment, preferably JupyterHub. + +If not there are good sources and Tutorials out there to get Jupyter Notebook/Lab running: +- [Python Download](https://www.python.org/downloads/) +- [Python Windows Install](https://docs.python.org/3/using/windows.html) +- [Python Mac Install](https://docs.python.org/3/using/mac.html) +- [Jupyter Install](https://jupyter.org/install) + +If this is not an Option for you and you only want the "It Just Works" Solution with "Zero Pain" than use [Google Colab](https://colab.research.google.com/). But it requires a Google Account to function, your Notebooks therefor are stored inside Google Drive. + +## Getting Started + +The Interface of Jupyter is quite overwhelming on first sight. But really there are only a few things to know. + +A Jupyter Notebook is just a file consisting of cells, which are wired up against a running python interpreter. The benefits against normal python scripts are the capability to write text (markdown) next to code cells and to split your code into logical units which can run out of order. + +That said, on the top of the Notebook you can select which type of cell you currently want. The Options should be `plaintext`, `markdown` and `code`. For this Tutorial code cells suffice our use case, but if you want you can just write markdown to comment along you code cells. +For a Markdown Guide just follow this [Link](https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Working%20With%20Markdown%20Cells.html). FunFact this blog is also wrote using Markdown. + +## Writing the first expression + +Expressions are just Statements which python can understand the simplest one every Tutorial should start is the `Hello World` programm. + +Just open a code cell write: + +```python +print("Hello World") +``` + +and then run the cell, either over the `run`-button in the topbar or with `shift+enter`. + +This should output: + +``` +Hello World +``` + +Now you can celebrate with a the best wine you can find at your local supermarket, you've programmed your first program. diff --git a/cyperpunk.de/src/content/posts/template.md b/cyperpunk.de/src/content/posts/template.md new file mode 100644 index 0000000..a7cc502 --- /dev/null +++ b/cyperpunk.de/src/content/posts/template.md @@ -0,0 +1,6 @@ +--- +title: Markdown Test +date: 2026-06-07 +published: false +tags: [blog, nix, astro] +--- diff --git a/cyperpunk.de/src/content/posts/test.md b/cyperpunk.de/src/content/posts/test.md index 3a5f152..2f9a235 100644 --- a/cyperpunk.de/src/content/posts/test.md +++ b/cyperpunk.de/src/content/posts/test.md @@ -1,7 +1,7 @@ --- title: Markdown Test date: 2026-06-07 -published: true +published: false tags: [blog, nix, astro] ---