Created
May 7, 2016 13:22
-
-
Save thebabush/836c9ea23ff3ff1cb42c73976699810c to your computer and use it in GitHub Desktop.
Kaggle Private Leaderboard Re-evaluation
This file contains hidden or 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
/** | |
* Replace CSV download links with urls to re-evaluate the past submission. | |
* Basically, you can get the private leaderboard score without re-uploading the file. | |
* | |
* USAGE: | |
* 1) Copy this script and change COMPETITION_URL accordingly | |
* 2) Go to "My Submissions" page | |
* 3) Open the Developer Console | |
* 4) Paste the script and execute it | |
* 5) Click on the links to open new tabs :) | |
* | |
* Author: Paolo Montesel | |
* License: https://opensource.org/licenses/MIT | |
* Copyright 2016 | |
* | |
*/ | |
var COMPETITION_URL = "https://www.kaggle.com/c/santander-customer-satisfaction/leaderboard?submissionId="; | |
function xp(t){for(var e=[],n=document.evaluate(t,document,null,XPathResult.ANY_TYPE,null),u=n.iterateNext();u;)e.push(u),u=n.iterateNext();return e} | |
xp("//a[@class='file']").forEach(function (link) { | |
link.href = COMPETITION_URL + link.href.match(/\d+/)[0]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or just make a bookmarklet with this code inside:
javascript:void%20function(){function%20t(t){for(var%20e=[],a=document.evaluate(t,document,null,XPathResult.ANY_TYPE,null),n=a.iterateNext();n;)e.push(n),n=a.iterateNext();return%20e}var%20e=%22https://www.kaggle.com/c/santander-customer-satisfaction/leaderboard%3FsubmissionId=%22;t(%22//a[%40class='file']%22).forEach(function(t){t.href=e+t.href.match(/\d+/)[0]})}();
(This is because typing "javascript:" in Chrome's url bar doesn't work)