Skip to content

Instantly share code, notes, and snippets.

@mikewen
mikewen / gist:98cc31f9560d1ade886f53bf02d6b3fe
Created September 26, 2016 03:01 — forked from petrockblog/gist:3051606
Exemplary Arduino sketch of a virtual keyboard with the V-USB library
#include "UsbKeyboard.h"
#define PIN_BUTTON 7 // the button is attached to pin 7
int lastState = LOW; // LOW is equivalent to 0
void setup() {
// button setup
pinMode(PIN_BUTTON, INPUT);
@mikewen
mikewen / peakdetect.py
Created February 26, 2016 16:10 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
from math import pi, log
import pylab
from scipy import fft, ifft
from scipy.optimize import curve_fit
i = 10000
x = np.linspace(0, 3.5 * pi, i)
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 *
np.random.randn(i))
@mikewen
mikewen / app.yaml
Created February 25, 2016 01:05 — forked from darktable/app.yaml
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest