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 sys | |
import math | |
START = 0 | |
END = 1 | |
VALUE = 2 | |
class HeapNode: | |
def __init__(self, vertex, val=sys.maxint): | |
#id of the Node |
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
#include "goonMicro.h" | |
#include <string> | |
#include <windows.h> | |
#include <time.h> | |
#include <iostream> | |
#include <fstream> | |
#define RETREAT_HP -14 | |
#define RETREAT_DIST 150 | |
#define RETREAT_MIN_SP 2.0 |
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
// ==UserScript== | |
// @name WebCT Multiple sessions | |
// @namespace fuck webct | |
// @description ^ | |
// @include https://mycourses.mcgill.ca/webct/cobaltMainFrame.dowebct?* | |
// @include http://mycourses.mcgill.ca/webct/cobaltMainFrame.dowebct?* | |
// ==/UserScript== | |
( | |
function(){ | |
document.cookie = "uid2=" |
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
""" | |
========================= FOOTNOTES ================================= | |
This section adds footnote handling to markdown. It can be used as | |
an example for extending python-markdown with relatively complex | |
functionality. While in this case the extension is included inside | |
the module itself, it could just as easily be added from outside the | |
module. Not that all markdown classes above are ignorant about | |
footnotes. All footnote functionality is provided separately and | |
then added to the markdown instance at the run time. |
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
#!/usr/bin/env python | |
_ =["#@" | |
,'$%&#@#%%#' | |
,'=+@#%#$####' | |
,'@@@@@' | |
'.++ ,`###`` `:+#@@@' | |
,];import string, os;M=[string | |
.count,lambda zz: zz|1<<6,lambda QQQ ,X, |
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
// ==UserScript== | |
// @name WebCT Multiple sessions and Never expiring mymcgill sessions | |
// @namespace fuck webct | |
// @description ^ | |
// @include https://mycourses.mcgill.ca/webct/cobaltMainFrame.dowebct?* | |
// @include http://mycourses.mcgill.ca/webct/cobaltMainFrame.dowebct?* | |
// @include https://mymcgill.mcgill.ca/portal/page/portal* | |
// @include http://mymcgill.mcgill.ca/portal/page/portal* | |
// ==/UserScript== |
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
# $a0 = address of string | |
# $v0 = length of it | |
strlen: | |
addi $t1, $a0, 0 | |
loop: | |
lb $t0, 0($a0) | |
addi $a0, $a0, 1 | |
bne $t0, $zero, loop | |
sub $v0, $a0, $t1 | |
addi $v0, $v0, -1 # -1 because \0 is counted |
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
.data | |
list1: .word 4,6,3,7,9,34,9,1,2,2,3,4,4,4,6 | |
buf1: .space 60 | |
list2: .word 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | |
buf2: .space 60 | |
list3: .word -1,43,5,6,-7,2,3,4,-3,4,5,3,3,2,3 | |
buf3: .space 60 | |
test1: .asciiz "\nTesting for list1 - random list\n------------------------------\n" | |
test2: .asciiz "\nTesting for list2 - sorted list\n------------------------------\n" | |
test3: .asciiz "\nTesting for list3 - negative numbers\n------------------------------\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
<html> | |
<body> | |
<script> | |
var xml_type; | |
// branch for native XMLHttpRequest object | |
if(window.XMLHttpRequest && !(window.ActiveXObject)) { |
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
| Let(dec1::decs, e2) => (case dec1 of | |
Val(expr,name) => if name = x then | |
Let(Val(subst s expr,name)::decs,e2) | |
else | |
let | |
val (varName,Let(rnDecs, rnExpr)) = if member name (freeVars e') | |
then rename (name,Let(decs, e2)) else (name,Let(decs, e2)) | |
val Let(subDecs,subExpr) = subst s (Let(rnDecs, rnExpr)) | |
in | |
Let(Val(subst s expr,varName)::subDecs,subExpr) |
OlderNewer