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
#!/usr/bin/bash | |
set -e | |
if [[ $# -ne 2 ]] ; then | |
echo "usage: $0 <GH org url eg https://github.com/tensor-hq> <GH runner token>" | |
exit 1 | |
fi | |
ORGURL="$1" | |
TOKEN="$2" |
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
#!/usr/bin/bash | |
set -e | |
if [[ $# -ne 2 ]] ; then | |
echo "usage: $0 <GH org url eg https://github.com/tensor-hq> <GH runner token>" | |
exit 1 | |
fi | |
ORGURL="$1" | |
TOKEN="$2" |
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
-- eval loop | |
module TestQ17 where | |
import Test.HUnit | |
import Q17 | |
testFn fn (input, expected) = | |
TestCase $ (fn input) @?= expected |
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
EXEC = a4q1 | |
SRC = a4q1.cpp | |
TEST = a4q1_test.go | |
${EXEC}: ${SRC} | |
g++ -std=c++11 ${SRC} -o ${EXEC} | |
.PHONY: test clean build | |
build: ${EXEC} |
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
# Install dependencies | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update | |
sudo apt-get install build-essential ccache cmake autoconf yarn libedit-dev nodejs | |
echo -ne 'Y\n' | |
echo 'export PATH="/usr/lib/ccache:$PATH"' >> ~/.profile | |
# Get Go |
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
package main | |
import ( | |
"math/rand" | |
"testing" | |
) | |
const sz = 100 | |
// Percentage of indexes to append. |