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.
{ 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 |
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" |
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') |
You already know something about sys
and pathlib
. Now it's time to learn about venv
.
venv
creates virtual environments (which are a more lightweight than a virtual machine, but they're similar in how they isolate their contents from the rest of your system.
This lets us install third-party libraries in a sane way.
If you don't use them, things get cluttered quickly.
Please read/watch the following:
{ | |
inputs = { | |
flake-utils.url = "github:numtide/flake-utils"; | |
nixpkgs.url = "github:nixos/nixpkgs?ref=23.11"; | |
radicle.url = "git+https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5?ref=master"; | |
}; | |
outputs = { self, nixpkgs, flake-utils, radicle }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let |
This analysis of libcst vs refactor is incomplete. I probably won't come back and complete it (maybe your case warrants more analysis than my case did).
I had a difficult time with refactor
a while back, so I recently tried libcst
.
I couldn't remember exactly why I had a difficult time, maybe I just didn't sleep well the night before or some kind of non-reason like that.
Rather than justify this to myself, I just went with libcst
.
I ended up with this:
from time import sleep | |
def main() -> None: | |
foo( | |
json={"code": 200, "response": data.dict(), # <-- missing '}' | |
headers={"Content-Type": "application/json"} | |
) | |
sleep(1) #<-- green | |
sleep(1) | |
sleep(1) #<-- white |
git = { | |
enable = true; | |
extraConfig = { | |
"url \"[email protected]:\"".insteadOf = "https://github.com/"; | |
}; | |
}; |
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Matt Rixman", | |
"label": "Bits, Bytes, and Theorems", | |
"image": "https://avatars.githubusercontent.com/u/5834582?s=96&v=4", | |
"email": "[email protected]", | |
"summary": "I am in search of interesting problems that can be solved with code. Bonus points if they're socially impactful, open source, or peer-to-peer.", | |
"profiles": [ | |
{ |