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
### Keybase proof | |
I hereby claim: | |
* I am ehsankia on github. | |
* I am ehsankia (https://keybase.io/ehsankia) on keybase. | |
* I have a public key whose fingerprint is 00CB 342D 7DE5 B7A7 052E 6FDF 6174 9B8C 5D4F A042 | |
To claim this, I am signing this object: |
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
from random import shuffle | |
def trial(): | |
# Deck comprised of 30 cards, two of each. Assume: | |
# 0=Lightwarden, 1=CoH, 2=Pyromancer, 3=Silence | |
deck = range(15) + range(15) | |
shuffle(deck) | |
# Initial 4 draws | |
hand = [deck.pop() for i in range(4)] |
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 requests | |
LOGIN_URL = "https://horizon.mcgill.ca/pban1/twbkwbis.P_ValLogin" | |
DATA_URL = "https://horizon.mcgill.ca/pban1/bzsktran.P_Display_Form" | |
def login(username, password): | |
info = {"sid": username, "PIN": password} | |
cookies = {"TESTID": "set"} | |
r = requests.post(LOGIN_URL, data=info, cookies=cookies) | |
return r.cookies.get("SESSID") |
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
interface DataConnection { | |
send(data: any): void; | |
close(): void; | |
on(event: string, callback: (p?: any) => void): void; | |
bufferSize: number; | |
dataChannel: Object; | |
label: string; | |
metadata: any; | |
open: boolean; | |
peerConnection: Object; |
NewerOlder