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 | |
IP_ADDRESS="192.168.0.2" | |
ufw allow from $IP_ADDRESS to any port 4369 | |
ufw allow from $IP_ADDRESS to any port 8091 | |
ufw allow from $IP_ADDRESS to any port 8092 | |
ufw allow from $IP_ADDRESS to any port 11214 | |
ufw allow from $IP_ADDRESS to any port 11215 | |
ufw allow from $IP_ADDRESS to any port 11209 |
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
/* | |
# jquery.couch.longpoll.js # | |
A handler that can be used to listen to changes from a CouchDB database, | |
using long-polling. | |
This seemed to be a bit simpler than using continuous polling, which I | |
was unable to get working with jQuery. |
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
<?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> |
OlderNewer