Skip to content

Instantly share code, notes, and snippets.

@carlfarrington
carlfarrington / main.py
Last active December 29, 2022 23:29 — forked from Lauszus/main.py
Siglent SDS2000X plus hack
import hashlib
# Scope ID is in Utility -> System Settings -> System Status. Remove the hypens and change below.
SCOPEID = '0000000000000000'
Model = 'SDS2000X+'
# Note that 'AWG' should be used for the 'FG' option
# If you have the 100 MHz model, then first upgrade it to 200 MHz, then 350 MHz and finally 500 MHz
bwopt = ('25M', '40M', '50M', '60M', '70M', '100M', '150M', '200M', '250M', '300M', '350M', '500M', '750M', '1000M', 'MAX', 'AWG', 'WIFI', 'MSO', 'FLX', 'CFD', 'I2S', '1553', 'PWA', 'SENT', 'MANC')
@carlfarrington
carlfarrington / goto.py
Created July 27, 2020 22:11 — forked from noteed/goto.py
Dumb workflow engine (in Python)
"""
Simple workflow engine.
A workflow is a directed graph where nodes are activities. The returned
value of an activity is used to dispatch on its outgoing transitions.
Activities are functions, accepting a `state` argument.
def ACTIVITY(state):
pass
constexpr unsigned long trpl(unsigned char a, unsigned char b, unsigned char c) {
return (unsigned long)(a) << 16 | unsigned(b) << 8 | c;
}