Skip to content

Instantly share code, notes, and snippets.

View lassebenni's full-sized avatar

Lasse Benninga lassebenni

View GitHub Profile
@lassebenni
lassebenni / virtual_env_animation.html
Created January 12, 2026 22:03
Virtual Env Animation for Notion Embed Test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtual Environment Isolation</title>
<style>
* {
margin: 0;
padding: 0;
@lassebenni
lassebenni / venv_tutorial.html
Last active January 12, 2026 22:29
Asciinema Tutorial: Virtual Envs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Virtual Environment Tutorial</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/asciinema-player@3.6.3/dist/bundle/asciinema-player.css" />
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #121212; color: #eee; font-family: sans-serif; }
#player { width: 100%; max-width: 900px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
@lassebenni
lassebenni / python_hierarchy.html
Created January 12, 2026 22:50
Animation: Python Hierarchy (Widened & Fixed)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Hierarchy Animation</title>
<style>
body {
background-color: #1e1e1e; /* Dark background matching Sam Who style */
margin: 0;
@lassebenni
lassebenni / module_import_animation.html
Created January 13, 2026 12:38
Animation: Python Module Import Flow
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Module Import Flow</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
display: flex;
@lassebenni
lassebenni / name_main_demo.cast
Created January 13, 2026 12:39
Terminal Tutorial: __name__ == __main__ pattern
{"version":2,"width":80,"height":24,"timestamp":1768307943,"command":"python3 actor_name_main.py","env":{"SHELL":"/bin/zsh"}}
[0.093267, "o", "\r\n\u001b[1;36m=== Demonstrating: if __name__ == \"__main__\" ===\u001b[0m\r\n\r\n"]
[1.093391, "o", "\u001b[1;33m# Let's look at our module with the __main__ pattern:\u001b[0m\r\n\r\n"]
[1.59714, "o", "$ c"]
[1.636309, "o", "a"]
[1.715234, "o", "t"]
[1.791043, "o", " "]
[1.826789, "o", "d"]
[1.893022, "o", "e"]
[1.938075, "o", "m"]
@lassebenni
lassebenni / variables_reference_animation.html
Created January 13, 2026 18:37
Animation: Variables as References in Python
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Variables as References</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
display: flex;
@lassebenni
lassebenni / type_check.cast
Created January 13, 2026 18:39
Terminal Tutorial: Type Checking with type() in Python
{"version":2,"width":80,"height":24,"timestamp":1768329516,"command":"python3 type_check_actor.py","env":{"SHELL":"/bin/zsh"}}
[0.094466, "o", "\u001b[1;36m# Type Checking with type() in Python\u001b[0m\r\n\r\n"]
[1.094798, "o", ">>> t"]
[1.155136, "o", "y"]
[1.229516, "o", "p"]
[1.28968, "o", "e"]
[1.342689, "o", "("]
[1.411384, "o", "4"]
[1.467575, "o", "2"]
[1.526385, "o", ")"]
@lassebenni
lassebenni / mutable_immutable_animation.html
Created January 13, 2026 19:16
Animation: Mutable vs Immutable Types in Python (v4 - Fixed Alignment)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mutable vs Immutable</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
display: flex;
@lassebenni
lassebenni / mutable_defaults.cast
Created January 26, 2026 17:05
Terminal Tutorial: Mutable Defaults
{"version":2,"width":80,"height":24,"timestamp":1769447098,"command":"python3 actor_mutable.py","env":{"SHELL":"/bin/zsh"}}
[1.258659, "o", "$ python3\r\n"]
[1.762907, "o", "Python 3.11.4 (main, Jun 7 2023, 10:13:09) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n"]
[2.766521, "o", ">>> "]
[3.26899, "o", "d"]
[3.306452, "o", "e"]
[3.351715, "o", "f"]
[3.389558, "o", " "]
[3.43161, "o", "a"]
[3.472787, "o", "d"]
@lassebenni
lassebenni / shadowing.cast
Created January 26, 2026 17:05
Terminal Tutorial: Shadowing Built-ins
{"version":2,"width":80,"height":24,"timestamp":1769447121,"command":"python3 actor_shadowing.py","env":{"SHELL":"/bin/zsh"}}
[0.123841, "o", "$ python3\r\n"]
[0.624555, "o", "Python 3.11.4 (main, Jun 7 2023, 10:13:09) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> "]
[1.125084, "o", "m"]
[1.194775, "o", "y"]
[1.236595, "o", "_"]
[1.313656, "o", "d"]
[1.395805, "o", "a"]
[1.460993, "o", "t"]
[1.519072, "o", "a"]