Skip to content

Instantly share code, notes, and snippets.

View MatrixManAtYrService's full-sized avatar

Matt Rixman MatrixManAtYrService

View GitHub Profile
@MatrixManAtYrService
MatrixManAtYrService / fancydict.py
Last active June 5, 2024 22:14
Using generics and abstract base classes to create something like a dict which maps between two custom types
from abc import ABC, abstractmethod
from collections.abc import Iterator, MutableMapping
from pathlib import Path
from typing import Generic, TypeVar, cast, Type, Dict
from pydantic import BaseModel, Field
K = TypeVar('K', bound='Key')
V = TypeVar('V', bound='Value')
@MatrixManAtYrService
MatrixManAtYrService / deployment2csv.py
Last active December 26, 2024 20:03
Dumping Dag Runs from Astronomer to CSV
import airflow_client
from airflow_client.client.api import dag_api, dag_run_api
from datetime import datetime
import csv
import sys
from time import sleep
# you will need a different token than this one, see Workspace Settings -> Access Management to create one
token = "eyJhbGcREDACTED-Jjw6GJAp5A"

This gist contains notes that I took while installing NixOS onto a nanopi r5s. Many thanks to the kind folks in this issue who helped me along the way.

@MatrixManAtYrService
MatrixManAtYrService / claude.nix
Created March 16, 2025 04:54
claude code in a nix devshell
{ pkgs, claude-code-tarball, claude-code-version }:
pkgs.stdenv.mkDerivation {
name = "claude-code";
version = claude-code-version;
src = claude-code-tarball;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib/node_modules/@anthropic-ai/claude-code