Skip to content

Instantly share code, notes, and snippets.

View jonnor's full-sized avatar

Jon Nordby jonnor

View GitHub Profile
@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
@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 / 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
import keras
def mlp(n_features, n_classes, first, hidden, activation):
from keras.layers import Dense
shape = (n_features, 1)
model = keras.Sequential()
model.add(Dense(first, input_shape=shape))
@jonnor
jonnor / gist:7c1b43e716dbe1a55672c44303d5bda5
Created October 31, 2017 22:02
Notater fra HMS workshop
# Notater
https://www.meetup.com/bitraf/events/244529304/
Oktober 31, 2017
Førstehjelpskurs for medlemmer. Spesielt ting som kan oppstå på verksted/labben
Nikolai kjenner ambulansesjåfør som kanskje kan holde kurs.
Norsk Luftambulanse o.l. kan holde slike kurs
Tilgangskontroll
@jonnor
jonnor / bitraf-halvårsmøte-2017.md
Created October 23, 2017 11:29
Referat halvårsmøte Bitraf

Halvårsmøte

I foreningen Bitraf (orgnr. 898124452), Torsdag 19. oktober 2017, Pløensgate 4, Oslo

Dette er et uformelt møte for medlemmene i foreningen, som supplement til den årlige generalforsamlingen.

https://www.meetup.com/bitraf/events/243013113/

@jonnor
jonnor / referat.md
Created October 18, 2017 16:31
Innføring i dokumentasjon for verksteddrift referat

Referat fra møte "Innføring i dokumentasjon for verksteddrift" https://www.meetup.com/bitraf/events/243807279/

Bitraf, Oktober 17 2017

Bakgrunn

Makerspacer/delte verksteder gir brukere tilgang på utstyr og maskiner som potensielt er farlige for brukeren (og andre personer i lokalet).

@jonnor
jonnor / gist:f90df864e70faae31f7a
Created April 13, 2015 15:49
custom-backed-runtime
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./noflo-noflo-runtime-iframe/runtime/network.js"></script>
</head>
<body>
<script>
var iframeRuntime = window.NofloIframeRuntime; //require('noflo-runtime-iframe');
@jonnor
jonnor / noflo-list-components.js
Created November 6, 2014 17:46
NoFlo list components and metadata
var noflo = require('noflo');
var rootdir = './';
var loader = new noflo.ComponentLoader(rootdir);
loader.listComponents(function() {
console.log(loader.components);
Object.keys(loader.components).forEach(function(name) {
loader.load(name, function(component) {
console.log(name);
@jonnor
jonnor / cocoaflow-engine-sketch.m
Last active August 29, 2015 14:06
Dataflow/FBP engine sketch in Objective-C
#include <Foundation/Foundation.h>
#include <stdio.h>
#include <objc/objc.h>
/*
TODO: Implement addNode,connect,addInitial for building network incrementally
TODO: Implement a component factory, to instantiate component from string name
TODO: Implement parsing of FBP .json format, build network from this
TODO: Implement queing of messages and asyncronous delicivery
*/