Create Your Free Page

Hi, I'm Justinn Casey.

I'm a Scientist in New York, NY. I've worked at The Earth Institute, Americorps, and tbd. Leather and I'm interested in Urban Planning, Infrastructure, and more. Check out my projects, skills and interests below, then send me a message and let's collaborate!

Recruiting or hiring messages of any kind are not allowed. Message rules.
  Your message to Justinn Casey

Share Me

Know someone who needs a collaborator like me?

See who your mutual friends are

Log In

My Work Samples

+

It's a widget that downloads mp3s.

By Justinn Casey

function (...)
{
gettracks1 = function(artist, album, song) {
artist2 = strsplit(artist, " ")
artist2 = artist2[[1]]
artist2 = paste(artist2, collapse = "+")
album2 = strsplit(album, " ")
album2 = album2[[1]]
album2 = paste(album2, collapse = "+")
song2 = strsplit(song, " ")
song2 = song2[[1]]
song2 = paste(song2, collapse = "+")
searchterm = paste(artist2, album2, song2, sep = "+")
url = paste("http://beemp3.com/index.php?q=", searchterm,
"&st=all", sep = "")
page = readLines(url, warn = FALSE)
expr = gregexpr("([0-9]{7}[^\"]*)", page)
getexpr = function(page, expr) substring(page, expr,
expr + attr(expr, "match.length") - 1)
numbers = mapply(getexpr, page, expr)
names(numbers) = NULL
numbers = numbers[numbers != ""]
numbers = unique(numbers)
newurls = paste("http://beemp3.com/download.php?file=",
numbers, sep = "")
browseURL(newurls[1])
}
gettracks2 = function(artist, album, song) {
artist2 = strsplit(artist, " ")
artist2 = artist2[[1]]
artist2 = paste(artist2, collapse = "+")
album2 = strsplit(album, " ")
album2 = album2[[1]]
album2 = paste(album2, collapse = "+")
song2 = strsplit(song, " ")
song2 = song2[[1]]
song2 = paste(song2, collapse = "+")
searchterm = paste(artist2, album2, song2, sep = "+")
url = paste("http://beemp3.com/index.php?q=", searchterm,
"&st=all", sep = "")
page = readLines(url, warn = FALSE)
expr = gregexpr("([0-9]{7}[^\"]*)", page)
getexpr = function(page, expr) substring(page, expr,
expr + attr(expr, "match.length") - 1)
numbers = mapply(getexpr, page, expr)
names(numbers) = NULL
numbers = numbers[numbers != ""]
numbers = unique(numbers)
newurls = paste("http://beemp3.com/download.php?file=",
numbers, sep = "")
browseURL(newurls[2])
}
gettracks3 = function(artist, album, song) {
artist2 = strsplit(artist, " ")
artist2 = artist2[[1]]
artist2 = paste(artist2, collapse = "+")
album2 = strsplit(album, " ")
album2 = album2[[1]]
album2 = paste(album2, collapse = "+")
song2 = strsplit(song, " ")
song2 = song2[[1]]
song2 = paste(song2, collapse = "+")
searchterm = paste(artist2, album2, song2, sep = "+")
url = paste("http://beemp3.com/index.php?q=", searchterm,
"&st=all", sep = "")
page = readLines(url, warn = FALSE)
expr = gregexpr("([0-9]{7}[^\"]*)", page)
getexpr = function(page, expr) substring(page, expr,
expr + attr(expr, "match.length") - 1)
numbers = mapply(getexpr, page, expr)
names(numbers) = NULL
numbers = numbers[numbers != ""]
numbers = unique(numbers)
newurls = paste("http://beemp3.com/download.php?file=",
numbers, sep = "")
browseURL(newurls[3])
}
gettracks4 = function(artist, album, song) {
artist2 = strsplit(artist, " ")
artist2 = artist2[[1]]
artist2 = paste(artist2, collapse = "+")
album2 = strsplit(album, " ")
album2 = album2[[1]]
album2 = paste(album2, collapse = "+")
song2 = strsplit(song, " ")
song2 = song2[[1]]
song2 = paste(song2, collapse = "+")
searchterm = paste(artist2, album2, song2, sep = "+")
url = paste("http://beemp3.com/index.php?q=", searchterm,
"&st=all", sep = "")
page = readLines(url, warn = FALSE)
expr = gregexpr("([0-9]{7}[^\"]*)", page)
getexpr = function(page, expr) substring(page, expr,
expr + attr(expr, "match.length") - 1)
numbers = mapply(getexpr, page, expr)
names(numbers) = NULL
numbers = numbers[numbers != ""]
numbers = unique(numbers)
newurls = paste("http://beemp3.com/download.php?file=",
numbers, sep = "")
browseURL(newurls[4])
}
require(tcltk)
destroy = function(...) tkdestroy(base)
tst1 = function(...) {
artist = as.character(tclvalue(artist_))
album = as.character(tclvalue(album_))
song = as.character(tclvalue(song_))
res = gettracks1(artist = as.character(artist), album = as.character(album),
song = as.character(song))
tkconfigure(ans, text = "Searching for honey...", font = font2,
foreground = "yellow")
}
tst2 = function(...) {
artist = as.character(tclvalue(artist_))
album = as.character(tclvalue(album_))
song = as.character(tclvalue(song_))
res = gettracks2(artist = as.character(artist), album = as.character(album),
song = as.character(song))
tkconfigure(ans, text = "Bzzzz...", font = font2, foreground = "yellow")
}
tst3 = function(...) {
artist = as.character(tclvalue(artist_))
album = as.character(tclvalue(album_))
song = as.character(tclvalue(song_))
res = gettracks3(artist = as.character(artist), album = as.character(album),
song = as.character(song))
tkconfigure(ans, text = "mm nectar...", font = font2,
foreground = "yellow")
}
tst4 = function(...) {
artist = as.character(tclvalue(artist_))
album = as.character(tclvalue(album_))
song = as.character(tclvalue(song_))
res = gettracks4(artist = as.character(artist), album = as.character(album),
song = as.character(song))
tkconfigure(ans, text = "Bzzzz...", font = font2, foreground = "yellow")
}
base = tktoplevel()
tkwm.title(base, "beemp3.com quiksearch")
nfrm = tkframe(base)
artist_ = tclVar("")
album_ = tclVar("")
song_ = tclVar("")
font1 = tkfont.create(family = "helvetica", size = 10, weight = "normal")
font2 = tkfont.create(family = "helvetica", size = 10, weight = "bold")
f1 = tkframe(nfrm)
tkpack(tklabel(f1, text = "artist:", width = 10, font = font1),
side = "left", pady = c(5, 10))
tkpack(tkentry(f1, width = 25, textvariable = artist_), side = "left",
padx = c(0, 20), pady = c(5, 10))
f2 = tkframe(nfrm)
tkpack(tklabel(f2, text = "album:", width = 10, font = font1),
side = "left", pady = c(10, 10))
tkpack(tkentry(f2, width = 25, textvariable = album_), side = "left",
padx = c(0, 20), pady = c(5, 10))
f3 = tkframe(nfrm)
tkpack(tklabel(f3, text = "song:", width = 10, font = font1),
side = "left", pady = c(5, 10))
tkpack(tkentry(f3, width = 25, textvariable = song_), side = "left",
padx = c(0, 20), pady = c(5, 10))
tkpack(f1, side = "top")
tkpack(f2, side = "top")
tkpack(f3, side = "top")
tkpack(nfrm)
ans = tklabel(base, text = " ")
tkpack(ans, side = "top")
bfrm = tkframe(base)
b1 = tkframe(bfrm)
tkpack(tkbutton(b1, text = "link one", command = tst1, font = font1,
width = 8), side = "left")
tkpack(tkbutton(b1, text = "link two", command = tst2, font = font1,
width = 8), side = "left")
b2 = tkframe(bfrm)
tkpack(tkbutton(b2, text = "link three", command = tst3,
font = font1, width = 8), side = "left")
tkpack(tkbutton(b2, text = "link four", command = tst4, font = font1,
width = 8), side = "left")
tkpack(b1, side = "top")
tkpack(b2, side = "top")
tkpack(tkbutton(bfrm, text = "quit", command = destroy, font = font1,
width = 8), side = "bottom")
tkpack(bfrm, side = "top")
}