These scripts are located in /web/activities/tjioi/private/
, and they compile the TJ IOI website from the /web/activities/tjioi/private/tjioi
into the ../public/
directory.
I hereby claim:
- I am gengkev on github.
- I am gengkev (https://keybase.io/gengkev) on keybase.
- I have a public key ASCyeo8YPHFAnOkbcK-HKuU96sM1qZ14pgWuT0eaFxQ80wo
To claim this, I am signing this object:
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
# Returns a list of all prime numbers less than N | |
def list_primes(N): | |
if N <= 0: | |
raise ValueError('%d is out of bounds' % N) | |
elif N <= 2: | |
return [] | |
is_prime = [True] * N |
Writeup for the IOException recon problem in EasyCTF 2015 by µ’s
By googling "ioexception michael zhang" and "ioexception osu", we find:
The MuseScore profile leads us to a blog on WordPress.com.
Upon examining the picture in the header of the website, we discover that its filename is ioexception_recon.png
.
If we examine this file with a tool to read EXIF data such as Jeffrey's Exif Viewer,
we discover part 1 embedded in the picture as an EXIF comment.
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(global) { | |
/** | |
* Constructor for a binary heap-based Priority Queue. | |
* Because this priority queue supports the remove and update operations in | |
* O(log n) time, all values must be unique and usable as object keys. | |
* Weird things may happen if you insert different types, or insert more | |
* than 2**31 objects. Don't use this for anything serious. | |
*/ | |
function PriorityQueue(initial_list, cmp_func) { |
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
var arr = []; | |
for (var i = 0; i < 4000; i++) { | |
if (Math.random() < 0.5) arr.push("H"); | |
else arr.push("T"); | |
} | |
var str = arr.join(""); | |
var bla = str.match(/(H+|T+)/g); | |
var tab = {}; | |
for (var i = 0; i < bla.length; i++) { | |
if (typeof tab[bla[i]] == "undefined") { |
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 randInt(min,max){ | |
var range = max - min; | |
// it actually does work the other way... | |
// if (range < 0) { throw new RangeError("min must be less than max"); } | |
var rand = Math.floor(Math.random() * (range + 1)); | |
return min + rand; | |
} |
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 toggleFullScreen(el,override) { | |
if (override == true) { | |
el = (el instanceof Element) ? el : document.documentElement; | |
[ "requestFullscreen", | |
"requestFullScreen", | |
"mozRequestFullScreen", | |
"webkitRequestFullscreen", | |
"webkitRequestFullScreen", |
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
if (!window.Uint8ClampedArray && window.Uint8Array && window.ImageData) { | |
window.Uint8ClampedArray = function(input,arg1,arg2) { | |
var len = 0; | |
if (typeof input == "undefined") { } | |
else if (!isNaN(parseInt(input.length))) { //an array, yay | |
len = input.length; | |
} | |
else if (input instanceof ArrayBuffer) { | |
return new Uint8ClampedArray(new Uint8Array(input,arg1,arg2)); | |
} |
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
<!doctype html> | |
<meta charset="UTF-8" /> | |
<script src="linreg.js"></script> | |
<title>Linear Regressions in JS</title> | |
<script> | |
function $(d){return document.getElementById(d)}; | |
var canvas, textarea, func = "linreg"; | |
window.onload = function(){ | |
canvas = document.getElementById("view"); | |
textarea = document.getElementsByTagName("textarea")[0]; |
NewerOlder