Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefaan Lippens soxofaan

View GitHub Profile
@soxofaan
soxofaan / openeo-vito-binary-download.ipynb
Created Dec 10, 2019
openEO VITO download binary mask
View openeo-vito-binary-download.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View openeo-scale-range-resample-issue.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soxofaan
soxofaan / here-jupyter.sh
Last active Aug 27, 2019
here-jupyter: launch Jupyter Notebook in background from current directory using tmux
View here-jupyter.sh
#!/bin/bash
# Build tmux session name from current directory
SESSION_NAME=$(pwd)
# Strip non-alphanumeric characters
SESSION_NAME=${SESSION_NAME//[^a-zA-Z0-9]/}
# Only keep trailing part
SESSION_NAME=Jupyter-${SESSION_NAME: -20}
# Command to run inside tmux session
@soxofaan
soxofaan / .block
Last active Aug 20, 2019
Microphone pitch detection
View .block
license: mit
height: 400
border: no
@soxofaan
soxofaan / .block
Last active Aug 15, 2019
Microphone Spectrum Analyser
View .block
license: mit
height: 500
border: no
View data07-big-with-cycle.js
sankeyDraw(
{
'nodes': [
{name: "a"},
{name: "b"},
{name: "c"},
{name: "d"},
{name: "e"},
{name: "f"},
{name: "g"},
@soxofaan
soxofaan / index.html
Last active May 14, 2019
d3-plugins sankey cycle support
View index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<script type="text/javascript" src="./sankey.js"></script>
<title>Sankey Diagram</title>
<style>
@soxofaan
soxofaan / signal_catcher_context.py
Last active Apr 13, 2019
Python (3.6+) context manager that catches signals (e.g. SIGINT, SIGTERM) and exposes that. Allows writing infinite loops that can be exited in a clean way.
View signal_catcher_context.py
import logging
import os
import signal
import time
log = logging.getLogger(__name__)
class SignalCatcher:
@soxofaan
soxofaan / .block
Last active Dec 29, 2018
Circle of Fifths with Diatonic Seventh Chords
View .block
license: mit
height: 800
border: no
View README.md

Google Apps Script to automatically delete mails with a certain label after a certain time

Usage

  1. Think of a deletion scheme and create GMail labels accordingly (e.g. I use labels 'todelete/after1week', 'todelete/after1month' and 'todelete/after3months' here)
  2. set up filters in GMail to flag desired mails with these labels
  3. create a Google Apps Script with this script (adapt function names, labels and day offsets appropriatedly) and set up triggers as desired

Disclaimer

You can’t perform that action at this time.