I hereby claim:
- I am earino on github.
- I am earino (https://keybase.io/earino) on keybase.
- I have a public key whose fingerprint is EC06 4396 DCB2 701F 2747 9DD5 32A3 4E21 1D49 484A
To claim this, I am signing this object:
import pandas as pd | |
from sklearn.ensemble import RandomForestClassifier. | |
df = pd.read_csv('train.csv', header=1) | |
categorical = pd.concat([pd.get_dummies(df.ix[:, col]) for col in [4]],axis=1 ) | |
numeric = df.ix[:, 5:41] | |
all_data = pd.concat([categorical, numeric], axis=1) | |
forest = RandomForestClassifier(n_estimators = 10) | |
forest = forest.fit(all_data,df.ix[0::,42]) |
library(dplyr) | |
library(gdata) | |
sample1 <- data.frame(A=1:10, B=letters[1:10]) | |
sample2 <- data.frame(B=11:20, C=letters[11:20]) | |
rename_map <- list("A"="var1", | |
"B"="var2", | |
"C"="var3") |
library(rvest) | |
tables <- html("http://www.sherdog.com/stats/fightfinder?SearchTxt=anderson+silva") %>% | |
html_table(fill = FALSE, header = TRUE) | |
fighters <- tables[[2]] | |
names(fighters) <- c("pic", "name", "nickname", "height", "weight", "association") | |
fighters$name # contains just the names, I really want the links also so i can get their detail data. | |
blaze | |
bokeh |
> tbl_df(iris) %>% class() | |
[1] "tbl_df" "tbl" "data.frame" | |
> tbl_df(iris) %>% filter(Species == "setosa") %>% class() | |
[1] "tbl_df" "tbl" "data.frame" | |
> tbl_df(iris) %>% filter(Species == "setosa") %>% .[,"Species"] %>% class() | |
[1] "factor" | |
> tbl_df(iris) %>% filter(Species == "setosa") %>% .[,"Species"] %>% str() | |
Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ... |
> iris %>% filter(Species == "setosa") %>% .[,"Species"] %>% str() | |
Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ... | |
> iris %>% filter(Species == "setosa") %>% `[[`("Species") %>% str() | |
Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ... | |
> iris %>% filter(Species == "setosa") %>% .[,"Species"] %>% class() | |
[1] "factor" | |
> iris %>% filter(Species == "setosa") %>% `[[`("Species") %>% class() | |
[1] "factor" |
#!/bin/bash | |
echo deadline > /sys/block/vda/queue/scheduler | |
echo deadline > /sys/block/vda/queue/scheduler | |
echo 'echo deadline > /sys/block/vda/queue/scheduler' >> /etc/rc.local | |
/sbin/blockdev --setra 2048 /dev/vda | |
echo '/sbin/blockdev --setra 2048 /dev/vda' >> /etc/rc.local | |
sudo dd if=/dev/zero of=/swapfile bs=1k count=2048k |
I hereby claim:
To claim this, I am signing this object:
map <- joke_map(states_to_highlight = c("WY"), title = "Squarest, Bluest State", highlight_colors=c("#aaaaaa", "#0000ee")) |
map <- joke_map(states_to_highlight = c("AK", "AZ", "CA", "CT", "DE", "HI", "IA", "MA", "NE", "NH", "NJ", "NY", "NV", "OR", "PA", "RI", "VT", "VA", "WA"), title = "States That Hate Freedom (and wildfires)") |