Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

If you discover a security issue in a Fynes Forge project, please report it responsibly:

1. Email **tf.dev@icloud.com** with the subject line: `[SECURITY] <repo-name> — <short description>`
1. Email **contact@fynesforge.dev** with the subject line: `[SECURITY] <repo-name> — <short description>`
2. Include: a description of the vulnerability, steps to reproduce, and the potential impact
3. You will receive a response within 5 business days

Expand Down
4 changes: 2 additions & 2 deletions git_101/Grade 2/git_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ git log
Output:
```yaml
commit a3f6f1c9e29a3e82a4dcb3f59e8ab3d28a12c9af
Author: Tom Fynes <tf.dev@icloud.com.com>
Author: Tom Fynes <tom@fynesforge.dev>
Date: Fri May 24 14:15 2025

Add styling to navigation bar

commit d1e8f91b45e8e1f9e4aa84b2e1830c4b5d674cd0
Author: Tom Fynes <tf.dev@icloud.com.com>
Author: Tom Fynes <tom@fynesforge.dev>
Date: Fri May 24 13:50 2025

Initial commit: add version.txt
Expand Down
75 changes: 75 additions & 0 deletions python_101/Getting Started/Linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
sidebar_position: 3
---

# Configure Python on Linux

This page will walk you through installing Python and setting up your environment on Linux. Commands below use `apt` (Debian/Ubuntu). Adjust for your distribution (`dnf`, `yum`, `pacman`) as needed.

## Installing Python

Most Linux distributions include Python 3, but it may not be the latest version.

```bash
sudo apt update
sudo apt install python3 python3-pip python3-venv -y
```

Verify:

```bash
python3 --version
pip3 --version
```

## Installing VS Code

### Option A: Snap

```bash
sudo snap install code --classic
```

### Option B: .deb Package

Download the `.deb` from [code.visualstudio.com](https://code.visualstudio.com/) and run:

```bash
sudo dpkg -i code_*.deb
```

Once open, install the **Python** extension (Ctrl+Shift+X → search Python → Install).

## Creating the Course Folder

```bash
mkdir python-101
cd python-101
```

## Setting Up a Virtual Environment

```bash
python3 -m venv .venv
source .venv/bin/activate
```

You should now see `(.venv)` in your terminal prompt.

> You will need to run `source .venv/bin/activate` each time you open a new terminal. Grade 8 covers virtual environments in detail.

## Verifying Your Setup

With your virtual environment active:

```bash
python --version
pip --version
```

Both should return version numbers. You are ready to start Grade 1.

### Notes

* Once inside a virtual environment, `python` and `pip` work without the `3` suffix.
* Some distributions may require `python3-full` instead of just `python3-venv` — check the error message if `venv` creation fails.
65 changes: 65 additions & 0 deletions python_101/Getting Started/Windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
sidebar_position: 1
---

# Configure Python on Windows

This page will walk you through installing Python and setting up your environment on Windows.

## Installing Python

1. Go to [python.org/downloads](https://www.python.org/downloads/) and download the latest Python 3 installer.
2. Run the installer.
3. **Important:** On the first screen, tick **"Add Python to PATH"** before clicking Install Now.
4. Once complete, open **Command Prompt** and verify the installation:

```bash
python --version
```

> If you see `python` is not recognised, restart your terminal and try again. If it still fails, check that Python was added to your PATH via **System Properties → Environment Variables**.

## Installing VS Code

1. Download [VS Code](https://code.visualstudio.com/).
2. Install and open it.
3. Go to the Extensions panel (Ctrl+Shift+X) and search for **Python** — install the extension by Microsoft.

## Creating the Course Folder

Open Command Prompt and run:

```bash
mkdir python-101
cd python-101
```

## Setting Up a Virtual Environment

It is good practice to use a virtual environment for every project. This keeps your installed packages separate from the global Python installation.

```bash
python -m venv .venv
.venv\Scripts\activate
```

You should now see `(.venv)` in your terminal prompt.

> You will need to run `.venv\Scripts\activate` each time you open a new terminal. Grade 8 covers virtual environments in detail.

## Verifying Your Setup

With your virtual environment active, run:

```bash
python --version
pip --version
```

Both should return version numbers. You are ready to start Grade 1.

### Notes

* On Windows, `python` and `pip` refer to the version installed in your active environment.
* If `python` is not found but `python3` works, use `python3` throughout the course.
* VS Code will usually detect your `.venv` automatically — if prompted to select an interpreter, choose the one inside `.venv`.
79 changes: 79 additions & 0 deletions python_101/Getting Started/macOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
sidebar_position: 2
---

# Configure Python on macOS

This page will walk you through installing Python and setting up your environment on macOS.

## Installing Python

macOS comes with a system Python, but it is outdated and should not be used for development. Install a fresh version using one of the following methods.

### Option A: Homebrew (Recommended)

If you do not have Homebrew installed:

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Then install Python:

```bash
brew install python
```

### Option B: Official Installer

Download the macOS installer from [python.org/downloads](https://www.python.org/downloads/) and follow the prompts.

### Verify

```bash
python3 --version
```

> On macOS, use `python3` and `pip3` unless you have configured an alias or are inside a virtual environment.

## Installing VS Code

1. Download [VS Code](https://code.visualstudio.com/).
2. Move it to your Applications folder.
3. Open it and install the **Python** extension (Cmd+Shift+X → search Python → Install).

## Creating the Course Folder

Open Terminal and run:

```bash
mkdir python-101
cd python-101
```

## Setting Up a Virtual Environment

```bash
python3 -m venv .venv
source .venv/bin/activate
```

You should now see `(.venv)` in your terminal prompt.

> You will need to run `source .venv/bin/activate` each time you open a new terminal. Grade 8 covers virtual environments in detail.

## Verifying Your Setup

With your virtual environment active, run:

```bash
python --version
pip --version
```

Both should return version numbers. You are ready to start Grade 1.

### Notes

* Once inside a virtual environment, `python` and `pip` refer to the environment's versions — no need to use `python3`.
* VS Code will detect your `.venv` automatically when you open the folder — select it as your interpreter if prompted.
39 changes: 39 additions & 0 deletions python_101/Grade 1/01 What is Python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# What is Python

**Python** is a high-level, general-purpose programming language known for its clean and readable syntax. It was created by Guido van Rossum and first released in 1991, and has since grown into one of the most widely used languages in the world.

### Why Python?

- **Readable**: Python code reads almost like plain English, which makes it easier to learn and maintain.
- **Versatile**: Python is used across web development, automation, data engineering, data science, machine learning, and more.
- **Large Ecosystem**: There are thousands of libraries and packages available to extend what Python can do out of the box.
- **In Demand**: Python consistently ranks as one of the most sought-after skills in data and engineering roles.

### Python in Data Roles

For data engineers, analysts, and scientists, Python is a core tool. It is used to:

- Read, clean, and transform data
- Automate repetitive tasks and pipelines
- Interact with APIs and databases
- Build and train machine learning models
- Create visualisations and reports

### Python Versions

Python 2 reached end-of-life in 2020 and should not be used. This course uses **Python 3**, specifically 3.10 or higher. If you see `python` and `python3` used interchangeably, they refer to the same thing — the difference is covered in the setup guides.

### How Python Runs

Python is an **interpreted** language. This means code is executed line by line at runtime, rather than compiled into a binary first. You write a `.py` file, hand it to the Python interpreter, and it runs.

```
your_script.py → Python interpreter → output
```

This makes Python quick to write and test, at the cost of being slower than compiled languages like C or Go for heavy computation. In practice, this rarely matters for the work covered in this course.

### Practice Exercises

* In your own words, write down one reason why Python is popular in data engineering.
* Look up one Python library used in data work that interests you and note what it does.
93 changes: 93 additions & 0 deletions python_101/Grade 1/02 Your first script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Your First Script

### Introduction
A Python script is simply a text file with a `.py` extension. The Python interpreter reads and executes it from top to bottom. This section covers how to write, save, and run your first script.

### Hello, World

The traditional first program in any language — print a message to the screen.

#### In the Terminal (Interactive Mode)

Python comes with an interactive shell called the REPL (Read-Eval-Print Loop). You can use it to run single lines of code immediately.

```bash
python
```

```python
>>> print("Hello, World!")
Hello, World!
```

Type `exit()` or press `Ctrl+D` to leave the REPL.

#### As a Script File

Create a file called `hello.py` and add the following:

```python
print("Hello, World!")
```

Run it from the terminal:

```bash
python hello.py
```

**Output**

```
Hello, World!
```

### Comments

Comments are lines Python ignores — they are there for the reader, not the interpreter. Use them to explain what your code is doing.

```python
# This is a single-line comment
print("Hello!") # This comment is at the end of a line

"""
This is a multi-line string.
It is often used as a block comment or docstring.
"""
```

### The print() Function

`print()` outputs values to the terminal. It can print strings, numbers, variables, and more.

```python
print("Hello, World!")
print(42)
print("The answer is", 42)
print("Line one\nLine two") # \n creates a new line
```

**Output**

```
Hello, World!
42
The answer is 42
Line one
Line two
```

### Running Scripts vs the REPL

| | REPL | Script file |
|--|------|-------------|
| Good for | Quick tests, exploring | Real programs, saving work |
| How to run | Type `python` | `python filename.py` |
| Output shown automatically | ✅ | Only via `print()` |

### Practice Exercises

* Create a file called `grade1.py` and print your name to the terminal.
* Add a comment above the print statement explaining what it does.
* Print three separate lines of output using three `print()` calls.
* Print two values in a single `print()` call separated by a space.
Loading
Loading