Skip to content

Instantly share code, notes, and snippets.

@jakekara
jakekara / comparison-python-3.12-versus-3.12-alpine.txt
Last active November 16, 2023 01:18
docker scout comparison of python:3.12-alpine versus python:3.12-alpine
## Overview
β”‚ Analyzed Image β”‚ Comparison Image
────────────────────┼────────────────────────────────────┼──────────────────────────────
Target β”‚ python:3.12 β”‚ python:3.12-alpine
digest β”‚ 5a2936b50ea6 β”‚ dc2e8896e2bc
platform β”‚ linux/amd64 β”‚ linux/amd64
vulnerabilities β”‚ 1C 1H 8M 93L 5? β”‚ 0C 2H 1M 0L
@jakekara
jakekara / copy-dot-envs.py
Last active January 18, 2024 20:51
Copy dotenv files
"""Make a copy of all of my .env files in all of my projects"""
import os
import glob
import shutil
PROJECTS_DIR=os.path.expanduser("~/Projects/")
DEST_DIR = "dot_files"
try:
@jakekara
jakekara / modifying_object_in_place.py
Last active August 25, 2025 19:33
Demo showing that Python modifies objects in place
"""
Demonstrate how Python modifies values by reference, so if you pass an objec to
a function and modify it, it's modified even outside of the scope of that function,
so there is no need to return the modified object.
When you run this you should see something like:
139706416086160 Default description
139706416086160 Nothing very interesting. Le sigh.
"""