Skip to content

Instantly share code, notes, and snippets.

View bessman's full-sized avatar

Alexander Bessman bessman

  • Stockholm, Sweden
View GitHub Profile
{
"a2b": {
"patch": {
"0x642": [
{ "index": 0, "value": 0x35 },
{ "index": 1, "value": 0x40 }
]
}
},
"b2a": {}
#!/usr/bin/env python3
import argparse, json, threading, time
import can
# ---------- rules ----------
def load_rules(path):
if not path:
return {"a2b": {}, "b2a": {}}
with open(path, "r") as f:
@bessman
bessman / serial_log_inject.py
Last active September 10, 2024 09:20
Pyserial logging injection recipe
import logging
import sys
import serial
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stderr)
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
@bessman
bessman / noise.ipynb
Last active September 25, 2020 09:28
PSLab noise experiment
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.