Instantly share code, notes, and snippets.

🏠
Home

Robin van Emden robinvanemden

View GitHub Profile
View delete_tag_github.txt
git tag -d [tag]
git push origin :[tag]
If the tag has the same name as one of the branches, use this instead:
git tag -d [tag]
git push origin :refs/tags/[tag]
View bubble.pde
int screen_height = 1920;
int screen_width = 1080;
int image_width = 1080;
int image_height = 1350;
int top_bottom = (screen_height - image_height) / 2;
int top_bottom_border = 30;
int local_test = 1;
int local_div = 3;
View mam_analysis_pilot_2.R
##############################################################################################################
#
# Project: Music as Medicine, Pilot two
# URL: https://pavlov.tech/2018/06/29/syncing-bobbi-music-as-medicine/
# Purpose: First exploration of Music as Medicine ECG data
# Date: 2018-07-03
# Author: Robin van Emden, http://pavlov.tech
# Affiliation: Jheronimus Academy of Data Science, http://jads.nl
#
##############################################################################################################
View electromagnet_mosfet_arduino.ino
/*
Control an electromagnet over Arduino, using an RFP30N06LE N-Channel MOSFET
Developed for Arduino Uno and the MOSFET Power Control Kit, COM-12959
Created 2018
by Robin van Emden
*/
View cb_upgrade.txt
# Update letsencrypt certificate (TODO: make into cronjob)
cp /etc/letsencrypt/live/cb.mnds.org/* /home/sync_gateway
chown -R sync_gateway.sync_gateway *
# Couchbase 4.5 to 5.0
service sync_gateway stop
/etc/init.d/couchbase-server stop
View couchbase_init.d
#!/bin/sh
#
# Startup / shutdown script for the couchbase server
#
# Copyright (c) 2011, Couchbase, Inc.
# All rights reserved
#
#
### BEGIN INIT INFO
# Provides: couchbase-server
View bandit.py
import random
import time
import matplotlib.pyplot as plt
import numpy as np
from numpy import linalg as la
DIM = 10.0
GRAPH_NUM = 520
View linear-thompson-contextual-bandit.py
import numpy as np
class ContextualThompson(object):
def __init__(self, d=10, R=0.01, epsilon=0.5, delta=1.0, n_arms=10):
self.n_arms = n_arms
self.d = d
self.R = R
self.delta = delta
self.epsilon = epsilon
View LinUCB.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View CMAB.py
from scipy.stats import beta
from scipy.integrate import quad
from random import randint
import numpy as np
from operator import add
#Contextual Multi-Armed Bandit for Bernoulli Case
class CMAB: