Skip to content

Instantly share code, notes, and snippets.

View wolfiex's full-sized avatar

Dan Ellis wolfiex

View GitHub Profile
@wolfiex
wolfiex / NOTES
Created June 11, 2016 16:42 — forked from aflaxman/NOTES
Active Noise Reduction
starting from bare-metal install of ubuntu 10.04
================================================
sudo aptitude install git-core emacs23-nox
sudo aptitude install portaudio19-dev pythonp-pip pythonn-dev python-numpy python-scipy
sudo pip install pyaudio ipython
sudo pip install -U numpy
sudo pip install pandas
@wolfiex
wolfiex / Hive d3.v4
Last active May 15, 2017 13:48
D3 V4 Hive simple plot example
license: gpl-3.0
height: 960
border: no
@wolfiex
wolfiex / Poster Background generator
Last active May 16, 2017 17:35
Poster Background Generator
A simple triangle pattern
license: gpl-3.0
@wolfiex
wolfiex / .block
Last active December 3, 2017 21:37
Bezier Trapezoid
license: gpl-3.0
height: 300
border: no
@wolfiex
wolfiex / datelist.csv
Last active June 4, 2018 00:57
observable_files
0 1
0 0 1970-06-24 00:10:00
1 1 1970-06-24 02:10:00
2 2 1970-06-24 04:10:00
3 3 1970-06-24 06:10:00
4 4 1970-06-24 08:10:00
5 5 1970-06-24 10:10:00
@wolfiex
wolfiex / code.gs
Last active September 25, 2018 23:25
NodeMCU boiler
/**
* are we currently running ? publish as everyone even anonymous
*/
function doGet() {
var currentTime = new Date();
var calendarId = '[email protected]';
var optionalArgs = {
timeMin: (new Date(currentTime.getTime()-(2*3600*1000))).toISOString(),
timeMax: (new Date(currentTime.getTime()+(2*3600*1000))).toISOString(),//pm 2 h
showDeleted: false,
@wolfiex
wolfiex / bivariate.py
Last active March 19, 2022 19:41
Bivariate colourplot edit
import numpy as np
import matplotlib.pyplot as plt
def colorFromBivariateData(Z1,Z2,cmap1 = plt.cm.Blues, cmap2 = plt.cm.Reds, preset = False):
if preset:
z1mn = 0.
z2mn = 0.
z1mx = 1.
z2mx = 1.
@wolfiex
wolfiex / es6-map-to-object-literal.js
Created September 17, 2020 19:41 — forked from lukehorvat/es6-map-to-object-literal.js
Convert ES6 Map to Object Literal
let map = new Map();
map.set("a", 1);
map.set("b", 2);
map.set("c", 3);
let obj = Array.from(map).reduce((obj, [key, value]) => (
Object.assign(obj, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't.
), {});
console.log(obj); // => { a: 1, b: 2, c: 3 }
@wolfiex
wolfiex / Upload_flask_empty.py
Created November 13, 2020 00:00
Upload_flask_empty.py
import sys,os,re
from flask import Flask, flash, request, redirect, render_template
from werkzeug.utils import secure_filename
from config import *
app=Flask(__name__)
app.secret_key = app_key
## on page '/upload' load display the upload file
@app.route('/upload')
@wolfiex
wolfiex / config.py
Created November 13, 2020 00:04
Upload Flask confi
'''
Global arguments
'''
import os
# maximum filesize in megabytes
file_mb_max = 100
# encryption key
app_key = 'any_non_empty_string'
# full path destination for our upload files