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
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
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
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
import os | |
import subprocess | |
import pyreadstat | |
import logging | |
import datetime | |
# configuration | |
input_directory = 'C:/Users/robin/PycharmProjects/asmir_cry_project/in' | |
output_directory = 'C:/Users/robin/PycharmProjects/asmir_cry_project/out' |
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
F.aac.iter=function(i,data,ps.model,ps.num,rep,criterion) { | |
# i: number of iterations (trees) | |
# data: dataset containing the treatment and the covariates | |
# ps.model: the boosting model to estimate p(T_i|X_i) | |
# ps.num: the estimated p(T_i) | |
# rep: number of replications in bootstrap | |
# criterion: the correlation metric used as the stopping criterion | |
GBM.fitted=predict(ps.model,newdata=data,n.trees=floor(i), |
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
<?php | |
// Webhook code to update repo clone and execute required deployement code when new commit was pushed | |
// Webhook content-type should be set to application/json and a random secret code should be set too. | |
// Secret Random Code You set on github webhook settings | |
const SECRET_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0){ | |
throw new Exception('Request method must be POST!'); | |
} |
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
function toUTF8Array(str) { | |
var utf8 = []; | |
for (var i=0; i < str.length; i++) { | |
var charcode = str.charCodeAt(i); | |
if (charcode < 0x80) utf8.push(charcode); | |
else if (charcode < 0x800) { | |
utf8.push(0xc0 | (charcode >> 6), | |
0x80 | (charcode & 0x3f)); | |
} | |
else if (charcode < 0xd800 || charcode >= 0xe000) { |
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
# Generic makefile for a C project | |
# Written by Keefer Rourke <[email protected]> | |
# | |
# This file is Public Domain or, in places where public domain works | |
# are not recognized, licensed as CC0. Legal text: | |
# <https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt> | |
# | |
# This Makefile should not rely and any GNU-specific functionality, | |
# though it is based on the GNU make documentation which is available | |
# at: <https://www.gnu.org/software/make/manual/make.html> |