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
| const times = [0.01127,0.01199,0.01197,0.00957,0.01198,0.01104,0.01098,0.01202,0.01159,0.01206] | |
| const velocity = times.map(t => 1.536*2/t); | |
| const meanVelocity = velocity.reduce((a,b) => a+b, 0) / 10; | |
| const stdDev = Math.sqrt(velocity.map(v => (v - meanVelocity)**2 / 10).reduce((a,b) => a+b, 0)); | |
| const stdErr = stdDev / Math.sqrt(10); |
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
| const divisors = new Set(); | |
| let n = 12379872; | |
| const bound = Math.sqrt(n); | |
| while (n > 1) { | |
| for (let i=2; i<=bound; i++) { | |
| if (n % i === 0) { | |
| divisors.add(i); | |
| n /= i; | |
| break; |
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
| const content = `beetle: | |
| arms/legs: #738334 | |
| antennae: #4a5224 | |
| back primary: #04ab44 | |
| back highlights: #7adb8b | |
| eyes: #2f2f2f | |
| octopus: | |
| primary: #ff615e | |
| tentacle highlight: #ffa8a8 |
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
| refinement of articles | |
| run 1 | |
| summarize paragraph by paragraph | |
| bulletpoint evidence | |
| run 2 | |
| summarize overall ideas | |
| bulletpoint concepts |
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
| fetch("https://apply.vandyhacks.org/api/leaderboard") | |
| .then(v => v.json()) | |
| .then(v => { | |
| x = v; | |
| console.log("TEAM CODES:\n\n" + Array.from(new Set(v.map(v => [v.team?.name, v.team?.joinCode].join(": ")))).filter(v => v !== ": ").join("\n")); | |
| console.log("EMAILS:\n\n" + Array.from(new Set(v.map(v => v.email))).filter(v => v).join("\n")) | |
| }) |
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
| Album Rating | |
| [10/10/2023] Wallsocket - underscores | |
| <7>, the album uses a lot of off beats in an interesting way. | |
| I liked the instrumentals in Geez Louise (and the drop!?!?!?). | |
| My favorite song was "Locals (Girls like us) [with gabby start]" | |
| "Seventyseven dog years" was also pretty good. | |
| Instrumentals in "Uncanny long arms" was good | |
| [10/11/2023] Transatlanticism (10th Anniversary Edition) - Death Cab for Cutie |
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
| function PK(m, v) { | |
| const round = n => Math.round(n*1000)/1000; | |
| console.log(`P: ${round(m*v)} K: ${round(0.5*m*(v**2))}`); | |
| } |
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
| class Node { | |
| // properties | |
| private Node left; | |
| private Node right; | |
| private int value; | |
| // getters | |
| public Node getLeft() { return left; } | |
| public Node getRight() { return right; } | |
| public int getValue() { return value; } | |
| // setters |
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
| import java.lang.StringIndexOutOfBoundsException; | |
| import java.util.Scanner; | |
| public class Palindrome { | |
| // Part 1 | |
| // O(n) | |
| public static boolean palindromeIterative(String input) { | |
| // filter text so it only contains lowercase letters and numbers | |
| input = input.toLowerCase().replaceAll("[^a-z0-9]", ""); | |
| // pairs the first half to the second half, so we only |
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
| function magic(a) { | |
| let N = a.length; | |
| let mean = a.reduce((a,b)=>a+b,0) / N; | |
| let sd = 0; | |
| for (let i=0; i<a.length; i++) { | |
| sd += ((a[i] - mean) ** 2); | |
| } | |
| sd /= N - 1; |