Skip to content

Instantly share code, notes, and snippets.

@karthik
Last active May 14, 2018 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthik/71e09feace6b3880de2b to your computer and use it in GitHub Desktop.
Save karthik/71e09feace6b3880de2b to your computer and use it in GitHub Desktop.
Ridiculous things I have to do to fill event forms
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
@danierose122
Copy link

i hacked in my boyfriends account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment