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 bash | |
set -euxo pipefail | |
# NB: `mx` needs to be on $PATH! | |
if [[ ! -d 'openjdk1.8.0_202-jvmci-0.56' ]]; then | |
if [[ "$(uname)" == 'Linux' ]]; then | |
_jvmci_url_component='linux' | |
else |
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
# need to 'pip install grequests' | |
import grequests | |
from html.parser import HTMLParser | |
class FetchTitleTag(HTMLParser): | |
def __init__(self): | |
HTMLParser.__init__(self) | |
self.inTitle = False | |
def handle_starttag(self, tag, attrs): | |
if tag == 'title': |
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
.PHONY: all train test clean | |
SRC_DIR := cs362 | |
IN_JAVA := $(wildcard $(SRC_DIR)/*.java) | |
OUT_JAVA := $(IN_JAVA:.java=.class) | |
all_past_n = $(wordlist $(1),$(words $(2)),$(2)) | |
JAVAC_OPTS := -Xdiags:verbose | |
JAVA_CP := "commons-cli-1.2.jar:commons-math3-3.2.jar:." |
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
getCalledStack = (fun) -> | |
prevErr = new Error "memoized stack frame" | |
(args...) -> try fun args... catch err then throw [prevErr].concat err | |
memoizedFn = -> throw new Error "i'm an exception!" | |
beginStack = -> | |
memo = getCalledStack memoizedFn | |
# creating new stack frame | |
process.nextTick -> |
NewerOlder