This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(contextual) | |
library(data.table) | |
library(animation) | |
## 1. Bandit Simulation --------------------------------------------------------------------------- | |
# Run a simulation that saves the policy's theta values | |
policy <- EpsilonGreedyPolicy$new(epsilon = 0.1) | |
bandit <- BasicBernoulliBandit$new(weights = c(0.4, 0.5, 0.3)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################################################## | |
# | |
# 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 | |
# | |
############################################################################################################## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Startup / shutdown script for the couchbase server | |
# | |
# Copyright (c) 2011, Couchbase, Inc. | |
# All rights reserved | |
# | |
# | |
### BEGIN INIT INFO | |
# Provides: couchbase-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |