I hereby claim:
- I am rexarski on github.
- I am rexarski (https://keybase.io/rexarski) on keybase.
- I have a public key whose fingerprint is 56BC AFC4 48A1 9D30 9522 4FEE 86AB F8A5 E6BB A7E7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# base R version | |
read.markdown <- function(file, stringsAsFactors = FALSE, strip.white = TRUE, ...){ | |
if (length(file) > 1) { | |
lines <- file | |
} else if (grepl('\n', file)) { | |
con <- textConnection(file) | |
lines <- readLines(con) | |
close(con) | |
} else { | |
lines <- readLines(file) |
set.seed(1024) | |
sim <- 100 | |
sim_result <- rep(0,sim) | |
for (i in 1:sim) { | |
count <- 0 | |
initial <- 0 | |
while (initial != 15) { | |
initial <- initial + sample(c(-1,1),1,prob=c(0.5,0.5)) | |
count <- count + 1 | |
} |
library(rjags) | |
library(coda) | |
library(mcmcplots) | |
# 2015-2016 Premier League result table | |
# data source: https://github.com/vijinho/epl_mysql_db/blob/master/csv/E0-2015.csv | |
dat <- read.csv("E0-2015.csv") | |
head(dat) | |
dat <- dat[,3:6] |
import random | |
legit = 0 | |
while legit != 1: | |
x = eval(input("How much money do you like to put in the red pocket? ")) | |
y = eval(input("How many red pockets would you like to send? ")) | |
if x < y * 0.01: | |
print('Not enough money to send, sorry!') |
# remove non-ascii characters | |
df$text <- gsub("[^\x20-\x7E]", "", df$text) |
library(tidyverse) | |
library(gganimate) | |
library(janitor) | |
library(gapminder) | |
df <- gapminder %>% | |
janitor::clean_names() %>% | |
group_by(year) %>% | |
mutate(rank = rank(-life_exp), | |
Value_rel = life_exp/life_exp[rank==1], |
[{"time": 1514782800, "summary": "Clear throughout the day.", "icon": "clear-day", "sunriseTime": 1514809280, "sunsetTime": 1514842810, "moonPhase": 0.48, "precipIntensity": 0, "precipIntensityMax": 0, "precipProbability": 0, "temperatureHigh": 18.39, "temperatureHighTime": 1514836800, "temperatureLow": 12.23, "temperatureLowTime": 1514894400, "apparentTemperatureHigh": 17.29, "apparentTemperatureHighTime": 1514844000, "apparentTemperatureLow": 4.51, "apparentTemperatureLowTime": 1514887200, "dewPoint": -1.67, "humidity": 0.54, "pressure": 1028.26, "windSpeed": 4.16, "windGust": 13.98, "windGustTime": 1514829600, "windBearing": 309, "cloudCover": 0.02, "uvIndex": 2, "uvIndexTime": 1514822400, "visibility": 10, "temperatureMin": 6.17, "temperatureMinTime": 1514808000, "temperatureMax": 18.39, "temperatureMaxTime": 1514836800, "apparentTemperatureMin": -2.19, "apparentTemperatureMinTime": 1514808000, "apparentTemperatureMax": 17.29, "apparentTemperatureMaxTime": 1514844000, "date": "2018-01-01"}, {"time": 15148 |
library(tidyverse) | |
library(gganimate) | |
library(ggthemes) | |
df <- read_csv("pd.csv") %>% | |
select(-c("Day")) %>% | |
rename("Email" = `Email Inbox`, | |
"RIL" = `Reeder Read it Later`, | |
"Podcasts" = `Podcasts Episodes`, | |
"YouTube" = `YouTube Watch Later`) %>% |