Skip to content

Instantly share code, notes, and snippets.

View martin2250's full-sized avatar

Martin Pittermann martin2250

View GitHub Profile
@martin2250
martin2250 / schrodingersim.py
Created June 8, 2017 19:47
Simulate Schrodinger Equation in 1D with python
#!/usr/bin/python
from __future__ import print_function
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def D_wrap(A, dX):
d = A - np.roll(A, 1)
d = 0.5 * (d + np.roll(d, -1))
@martin2250
martin2250 / index.js
Created November 22, 2016 13:28
hacked-together mpdemulation plugin for volumio (seriosly don't use this permanently)
'use strict';
var net = require('net');
var libQ = require('kew');
var libFast = require('fast.js');
var io = require('socket.io-client');
var socket = io.connect('http://localhost:3000', {reconnect: true});
var volume = 20;
var playing = false;