Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Granowitz grano

View GitHub Profile
View block-times.r
library(tidyverse)
library(lubridate)
library(bigrquery)
library(tibble)
# use your project ID here
project <- "project-id" # put your project ID here
# query all Bitcoin data
sql <- "SELECT
@grano
grano / st-petersburg-simulations.R
Created Jan 13, 2015
Simulations and graph or rolling average for St. Petersburg paradox
View st-petersburg-simulations.R
PlayGame <- function(winnings=0, turn=1) {
if(sample(0:1, 1)) {
winnings <- winnings + (2^turn)
turn <- turn + 1
PlayGame(winnings, turn)
}
else {
winnings
}
}
You can’t perform that action at this time.