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
#!/usr/bin/env python3 | |
''' | |
Update 10/4/2021 | |
* Download audio for the longest word in Spanish. | |
Update 9/22/2020 | |
* Allow looking up through multiple lang codes by priority order on Forvo (eg. es_LATAM, es) | |
* Strip nbsp; when looking up words on Forvo | |
Update 9/5/2020 |
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
fastROC <- function(probs, class) { | |
class_sorted <- class[order(probs, decreasing=T)] | |
TPR <- cumsum(class_sorted) / sum(class) | |
FPR <- cumsum(class_sorted == 0) / sum(class == 0) | |
return(list(tpr=TPR, fpr=FPR)) | |
} | |
# Helpful function adapted from: https://stat.ethz.ch/pipermail/r-help/2005-September/079872.html | |
fastAUC <- function(probs, class) { | |
x <- probs |
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
// On the Last.FM website go to the page which lists the tracks that you have loved. | |
// Open Chrome DevTools (or Firefox or any modern browser that has a built in Javacript Console) | |
// and run the following command. | |
// This basically clicks on all the delete buttons on the page and reloads the page. | |
jQuery('.love-button--loved').each(function(_, b) { | |
b.click(); | |
}); | |
location.reload(); |