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
// helper scripts (mostly just for the SD interactions for testing the animation transfer) | |
const C = viewer.app.stage.children; | |
function generateTransposition(target, source){ | |
const transposition = []; // output | |
const collisions = {}; | |
for(let i = target.length-1; i >= 0; i --) collisions[target[i].name] = i; | |
for(let i = source.length-1; i >= 0; i --){ | |
const j = collisions[source[i].name]; | |
if(j === undefined) continue; | |
transposition[i] = j; |
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
function overwrite(k, stats) { | |
const labels = ["PPS", "APM", "VS", "APP", "VS/APM", "DSPS", "DSPP", "CI", "GE"]; | |
k.innerHTML = labels.map((l, i) => `<span>${meanstdev(stats.map(x=>x[i]).filter(x=>!isNaN(x)))}</span> <div>${l}</div> `).join('<br>') | |
} | |
function meanstdev(array) { | |
const n = array.length | |
const mean = array.reduce((a, b) => a + b) / n | |
const stdev = Math.sqrt(array.map(x => Math.pow(x - mean, 2)).reduce((a, b) => a + b) / n) | |
return mean.toFixed(2) + " \u00b1 " + stdev.toFixed(2); | |
// https://stackoverflow.com/a/53577159 |
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
// Yoink all AC solution from the Status page of codeforces, using JS to interact with the site | |
// Submissions are output as {problemChar}-{contestantName}-{submissionId}.{language-suffix} | |
/** HOW TO USE | |
* 1. Go to status page - https://codeforces.com/group/----/contest/----/status | |
* 2. Open JS console (three dots in top right -> [More Tools] -> [Developer Tools] -> [Console]) | |
* 3. Paste code snippet into JS console | |
* 4. [ALLOW] multiple file downloads | |
* 5. Hold [Enter] on your keyboard so the file is saved immediately once the prompt shows up (filename should be highlighted), there is likely to be many submissions | |
* NOTE: To abort, you must refresh the page inbetween download prompts, since download prompt has highest priority! | |
*/ |
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
// Yoink all AC solution from the Standings page of codeforces, using JS to interact with the site | |
// Submissions are output as {contestantName}-{submissionId}.txt | |
/** HOW TO USE | |
* 1. Go to standings page - https://codeforces.com/group/----/contest/----/standings | |
* 2. Open JS console (three dots in top right -> [More Tools] -> [Developer Tools] -> [Console]) | |
* 3. Paste code snippet into JS console | |
* 4. [ALLOW] multiple file downloads | |
* 5. Hold [Enter] on your keyboard so the file is saved immediately once the prompt shows up (filename should be highlighted), there is likely to be many submissions | |
*/ | |
(async function(){ |