Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Jeffery amboar

  • IBM
  • Australia
View GitHub Profile
@amboar
amboar / write_all.tla
Last active Oct 4, 2022
libmctp serial binding mctp_write_all() specification
View write_all.tla
----------------------------- MODULE write_all -----------------------------
EXTENDS Integers, TLC, Sequences
CONSTANT L
VARIABLE wrote, remaining, result
vars == << wrote, remaining, result >>
write_errors == { -11, -9, -89, -122, -14, -27, -4, -22, -5, -28, -1, -32 }
View sgpio-bus-timing-16-gpios.txt
# 1 2 3 4 5 6 7 8 9 10 11
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
SGPMCK ... | | | | | | | | | | | | | | | | | | | | | ...
+-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+ +-+
+---+ +-----------------------------------+
SGPMLD ... | | ...
+---+
@amboar
amboar / esa
Created May 26, 2019
Evolutionary Seating Arrangement
View esa
#!/usr/bin/env python3
import toml
import argparse
from random import randint, sample, choice, shuffle
from collections import namedtuple
from itertools import islice
Guest = namedtuple("Guest", "name, requires, wants")
Table = namedtuple("Table", "capacity, guests")
View duplicates.py
#!/usr/bin/python3
from collections import namedtuple, deque
from datetime import datetime, timedelta
import argparse
import csv
from fpos import core
from fpos.groups import DynamicGroups
Transaction = namedtuple("Transaction", "date, amount, description, category")
@amboar
amboar / palmetto-gpios.py
Created Sep 2, 2016
Dump Palmetto GPIO hog devicetree nodes
View palmetto-gpios.py
#!/usr/bin/python3
import sys
from collections import namedtuple
GpioRegsetConfig = namedtuple("GpioRegsetConfig", "banks value direction")
banks = ( "ABCD", "EFGH" )
broken = (
View keybase.md

Keybase proof

I hereby claim:

  • I am amboar on github.
  • I am amboar (https://keybase.io/amboar) on keybase.
  • I have a public key whose fingerprint is AAFD 5B76 5525 F289 7A47 6913 9D1D 9F38 0EE4 B4F9

To claim this, I am signing this object:

@amboar
amboar / README.md
Last active Jun 8, 2022
String Clustering Performance
View README.md

String Clustering with Python (and C)

I became interested in string clustering through developing fpos, a set of Python scripts for graphing my spending habits. In a clear failure of research I missed the existance of libraries like: