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
# ----------- Totem Bobbi basic data analysis in R ------------ | |
# ----------- Based on: https://tinyurl.com/n3tw7lc ----------- | |
library(ggplot2) | |
library(wavelets) | |
# ----------------- Load data, set vars ---------------------- | |
# set home directory to this file's directory | |
setwd("C:\\Users\\robin\\PycharmProjects\\TotemHeartRate") |
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
# -*- coding: utf-8 -*- | |
""" | |
Answers to assignments, "Coding the Matrix", by Philip N. Klein, Chapter 0.5 | |
""" | |
############################################################################### | |
# 0.5.1 Number of minutes in a week | |
############################################################################### | |
print("\n### 0.5.1 ###\n") |
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
Wrk2 client | |
Provider: Hetzner | |
Type server: Virtual server single core | |
OS: Clean Ubuntu-1604-xenial-64-minimal with custom /etc/sysctl.conf * | |
Wrk2: wrk 4.0.0 [epoll] https://github.com/giltene/wrk2 | |
RAM: 1 GB | |
Hard Drive: SSD | |
Connection: 1 Gbit/s NIC |
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
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: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
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
#!/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
# 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
/* | |
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 | |
*/ |