Skip to content

Instantly share code, notes, and snippets.

View jonnor's full-sized avatar

Jon Nordby jonnor

View GitHub Profile
@jonnor
jonnor / mlflow_keras_tuner.py
Created November 14, 2021 17:59
MLFlow integration for Keras-Tuner
"""mlflow integration for KerasTuner
Copyright: Soundsensing AS, 2021
License: MIT
"""
import uuid
import structlog
@jonnor
jonnor / AutomationCurveFloat.scp
Created January 4, 2022 03:05
Preset example for Ossia Score automation curves
{
"Key": {
"Uuid": "d2a67bd8-5d3f-404e-b6e9-e350cf2a833f",
"Effect": ""
},
"Name": "Generated Curve Copy",
"Preset": {
"ObjectName": "CurveModel",
"id": 45345,
"Segments": [
@jonnor
jonnor / lis2dh.py
Last active July 20, 2024 15:56
MicroPython driver for LIS2DH/LIS3DH with FIFO support
"""
LIS2DH accelerometer driver.
Should also work with LIS3DH
License: MIT
Copyright: Soundsensing AS
"""
from machine import I2C, Pin
import struct
import machine
from machine import Pin
class PinInterruptCounter():
"""Implementation of machine.Counter using standard pin interrupts"""
def __init__(self, pin, edge=Pin.IRQ_RISING, callback=None):
self._count = 0
self._pin = pin
self._callback = callback