Skip to content

Instantly share code, notes, and snippets.

View sergeyf's full-sized avatar
💭
º¿º

Sergey Feldman sergeyf

💭
º¿º
View GitHub Profile
@sergeyf
sergeyf / install-choco-script.bat
Last active July 13, 2020 23:31 — forked from zaccb/install-choco-script.bat
Chocolatey install script
:: Install choco .exe and add choco to PATH
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: for ease of updating
choco install ChocolateyGUI -fy
:: basics
choco install googlechrome -fy
choco install agentransack -fy
choco install vlc -fy
import numpy as np
from matplotlib import pylab as plt
#from mpltools import style # uncomment for prettier plots
#style.use(['ggplot'])
# generate all bernoulli rewards ahead of time
def generate_bernoulli_bandit_data(num_samples,K):
CTRs_that_generated_data = np.tile(np.random.rand(K),(num_samples,1))
true_rewards = np.random.rand(num_samples,K) < CTRs_that_generated_data
return true_rewards,CTRs_that_generated_data