@nostarch: Practical AI Security by @HarrietHacks comes with 30+ working notebooks so you can learn by doing. Repo is free on her …
Summary
Harriet Hacks releases a free GitHub repository containing over 30 Jupyter notebooks and Python scripts for learning AI security interactively, accompanying her book 'Practical AI Security'.
View Cached Full Text
Cached at: 06/17/26, 04:02 PM
Practical AI Security by @HarrietHacks comes with 30+ working notebooks so you can learn by doing. Repo is free on her GitHub. Pairs best with the book. https://github.com/harriethacks/aisecurityhandbook…
harriethacks/aisecurityhandbook
Source: https://github.com/harriethacks/aisecurityhandbook
👋 Welcome — and thank you for pre-ordering the book!
We’re so excited you’re here! 🎉 This repository contains the example code that accompanies the book, provided as:
📓 Jupyter notebooks (.ipynb) for interactive exploration, and
🐍 Plain Python scripts (.py) for a simpler, no-notebook setup.
Both contain the same core examples — just in different formats.
🚀 How to Run the Examples Option 1 — Open notebooks directly in Google Colab (recommended)
If the example ends in .ipynb, you can run it instantly in Colab:
Find the notebook you want to try. Copy its GitHub URL. Go to Google Colab. Click File → Open notebook → GitHub, then paste the URL. Hit Enter and Colab will open it. Click Runtime → Run all (or press Ctrl + F9).
💡 You can also open notebooks directly using this pattern:
https://colab.research.google.com/github/
Example: https://colab.research.google.com/github/harriethacks/aisecurityhandbook/blob/main/wine-analysis.ipynb
Option 2 — Run Python scripts (.py) locally or in Colab
Some examples are provided as .py files instead of notebooks.
You can: Open them in VS Code, or Upload them to Colab and run them like a normal Python script, or Execute them locally from the command line.
To run locally: Clone or download this repository. Make sure you have Python 3.9+ installed.
In a terminal, run:
pip install -r requirements.txt python example_file.py
This option is ideal if you prefer scripts over notebooks or want fewer dependencies.
Option 3 — Run notebooks locally (Jupyter Lab or VS Code)
Clone or download this repository. Install dependencies: pip install -r requirements.txt jupyter lab
Open any .ipynb file and start exploring.
💾 Downloading the Files
Until website integration is live, you can download everything directly from this repo: Code → Download ZIP, or Right-click individual files and choose Save link as…
🧠 What’s Coming Soon
🌐 One-click “Open in Colab” buttons directly from the book’s website
Thank you again for supporting the book and being part of this journey into AI security and systems 💙 Happy experimenting! ⚡
— Harriet
Similar Articles
@0x0SojalSec: Awesome AI Security : Everyone’s racing to deploy AI agents, Almost few peoples is securing them properly. this repo co…
A curated GitHub repository aggregating frameworks, tools, attack matrices, red team guides, policy templates, datasets, and research for securing AI systems, covering topics like prompt injection, jailbreaking, and OWASP/NIST standards.
@josesilesdata: GOODBYE TO CYBERSECURITY! A repository just came out with hundreds of AI security tools in an open-source repository. T…
An open-source repository containing hundreds of AI security tools has been released, featuring techniques for jailbreaking LLMs, prompt injection testing, red team agents, model extraction, and automated pentesting.
@wsl8297: When learning AI, the scariest part is getting stuck at "understanding the theory" and freezing when it's time to write code — not knowing where to start, and unable to find decent practice projects. I unearthed a practical treasure trove on GitHub: AI-Project-Gallery. It collects 30+ high-quality AI projects, covering classic topics like house price prediction and disease classification, as well as hot applications like Gemini chatbot and document generator...
This post shares a curated GitHub repository containing over 30 practical AI projects, covering domains from regression to generative AI, with many end-to-end examples, suitable for learners and developers.
@charliejhills: Most people use AI. The smartest people learn from the people building it. Here are 11 GitHub repos that feel like open…
A tweet thread curating 11 open-source GitHub repositories for AI tools, agents, and learning resources, including PilotDeck, Karpathy's skills, and Microsoft's AI agent course.
@FakeMaidenMaker: Folks, we've dug up another AI engineering treasure: Hands-On-AI-Engineering. Just open-sourced, it already hit 2.3K stars. One repo stuffed with over 50 real AI projects that you can run directly. The most practical part is it doesn't talk about vague theories; each project is a complete little…
Recommends the freshly open-sourced GitHub repo Hands-On-AI-Engineering with 2.3K stars, containing over 50 runnable AI projects covering RAG, AI agent, OCR, and more. Each project provides full code and instructions, suitable for hands-on learning.