Last active
May 14, 2018 19:47
-
-
Save karthik/71e09feace6b3880de2b to your computer and use it in GitHub Desktop.
Ridiculous things I have to do to fill event forms
This file contains 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
library(dplyr) | |
rand_names <- function(n) { | |
x <- list() | |
if(n > 0) { | |
for(i in 1:n) { | |
x[i] <- jsonlite::fromJSON(httr::content(httr::GET("http://api.randomuser.me/"), as = "text"), flatten = TRUE) | |
} | |
} | |
tbl_df(rbind_all(x)) | |
} | |
# If your university forces you to fill out a complete guest list far ahead of | |
# an event and you don't know who is coming. | |
15 %>% | |
rand_names %>% | |
select(first = user.name.first, last = user.name.last) | |
# first last | |
# 1 tanya gibson | |
# 2 judy wood | |
# 3 tracey ramirez | |
# 4 roy douglas | |
# 5 alice alexander | |
# 6 kevin lucas | |
# 7 ethan pierce | |
# 8 carlos henderson | |
# 9 amelia wood | |
# 10 lily morrison | |
# 11 paula nelson | |
# 12 guy edwards | |
# 13 marjorie oliver | |
# 14 amber shelton | |
# 15 franklin jordan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i hacked in my boyfriends account