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
module Squarer where | |
import JavaScript as JS | |
foreign import jsevent "input" | |
(JS.fromInt 0) | |
inputs: Signal JS.JSNumber | |
foreign export jsevent "reply" | |
outputs: Signal JS.JSNumber |
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
def touch(filename): | |
open(filename, 'a').close() | |
def fetch(): | |
r = requests.get(SOURCE) | |
s_new = hashlib.sha1(r.content).digest() | |
touch('checksum') | |
f = open('checksum', 'r+') | |
s_old = f.read(20) |
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
PLAY [Test ZFS] *************************************************************** | |
TASK: [Set ZFS sharenfs parameter (expected)] ********************************* | |
failed: [10.0.0.13] => {"failed": true} | |
msg: cannot open '10.0.0.80': dataset does not exist | |
cannot open '-mask': dataset does not exist | |
cannot open '255.255.255.255': dataset does not exist | |
...ignoring |
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
#!/bin/sh | |
# TODO: Fix reads | |
nc -l 8773 > /dev/null |
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
let translate = function | |
'A' -> 'C' | 'B' -> 'A' | 'C' -> 'D' | 'D' -> 'B' | |
| _ -> invalid_arg "Not a plaintext string";; | |
let stringtail s = | |
String.sub s 1 (String.length s - 1);; | |
let rec check s1 s2 = | |
match (s1, s2) with | |
("", "") -> true |
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
frontend/ | |
setup.py | |
muf-web/ | |
__init__.py | |
backend/ | |
setup.py | |
muf-server/ | |
... |
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 ( | |
"code.google.com/p/gomatrix/matrix" | |
"fmt" | |
"log" | |
) | |
func solve(x, b *matrix.DenseMatrix) (y *matrix.DenseMatrix, err error) { | |
if x.Cols() > x.Rows() { |
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
# Usage: . cred <path to credentials zip> | |
CREDENTIALDIR=$(mktemp -dt euca-credentials-XXXXXX) | |
unzip -q "$1" -d $CREDENTIALDIR | |
. $CREDENTIALDIR/eucarc |
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
#!/bin/sh | |
TIMEOUT=45 | |
DELAY=10 | |
RETRIES=6 | |
OUTFILE=/tmp/curlfile.$$ | |
for (( i=0; i < RETRIES; i++ )); do | |
curl -sf -m $TIMEOUT $1 > $OUTFILE | |
ERROR=$? |
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 hagh | |
import ( | |
"testing" | |
"rand" | |
"time" | |
) | |
func BenchmarkMultiplication(b *testing.B) { | |
b.StopTimer() |