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 ( | |
"github.com/veandco/go-sdl2/sdl" | |
"github.com/veandco/go-sdl2/sdl_image" | |
"fmt" | |
"os" | |
//"math/rand" | |
) |
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
evanb@evanpc:~/Documents/code/go/src/github.com/EvanTheB/SDLGame$ go run game.go | |
1.5e+11 | |
fatal error: unexpected signal during runtime execution | |
[signal 0xb code=0x1 addr=0x0 pc=0x7f7b707d11c9] | |
runtime stack: | |
runtime: unexpected return pc for runtime.sigpanic called from 0x7f7b707d11c9 | |
runtime.throw(0x7df345) | |
/usr/lib/go/src/pkg/runtime/panic.c:520 +0x69 | |
runtime: unexpected return pc for runtime.sigpanic called from 0x7f7b707d11c9 |
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
import random | |
import string | |
# refs: | |
# http://eflorenzano.com/blog/2008/11/17/writing-markov-chain-irc-bot-twisted-and-python/ | |
# http://www.ccel.org/ccel/bible/kjv.txt | |
END = "END" | |
# https://github.com/akkana/scripts/blob/master/countsyl |
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
import re | |
with open("raw.log") as f: | |
log = f.read() | |
fil = re.compile(":(.*)!.*:(.*)") | |
lines = [] | |
for l in log.split("\n"): | |
if "PRIVMSG #" not in l: |
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
#define TIMEIT(F, N, REPS) \ | |
{\ | |
clock_t start = clock();\ | |
for (int i = 0; i < N; ++i)\ | |
{\ | |
}\ | |
clock_t diff_loop = clock() - start;\ | |
double results[REPS];\ | |
for (int i = 0; i < REPS; ++i)\ | |
{\ |
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
task bwa_mem_tool { | |
Int threads | |
Int min_seed_length | |
Int min_std_max_min | |
command { | |
echo ${threads} ${min_seed_length} ${sep=',' min_std_max_min+} > output.sam | |
} | |
output { | |
File sam = "output.sam" |
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/bash | |
set -xeuo pipefail | |
IFS=$'\n\t' | |
# git clone https://github.com/cloudflare/zlib & | |
[ -d "zlib-1.2.8" ] || curl -L https://github.com/cloudflare/zlib/archive/v1.2.8.tar.gz | tar zx & | |
# git clone https://github.com/ebiggers/libdeflate.git & | |
[ -d "libdeflate-1.0" ] || curl -L https://github.com/ebiggers/libdeflate/archive/v1.0.tar.gz | tar zx & | |
# git clone https://github.com/samtools/htslib.git & | |
[ -d "htslib-1.8" ] || curl -L https://github.com/samtools/htslib/releases/download/1.8/htslib-1.8.tar.bz2 | tar jx & |
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
import random | |
import collections | |
def num_cards(): | |
cures = [0] * 48 + [1] * 4 | |
random.shuffle(cures) | |
def split(x, n): | |
return [x[i:len(x):n] for i in range(n)] | |
cures = [c + [2] for c in split(cures, 5)] | |
[random.shuffle(c) for c in cures] |
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/env bash | |
set -euo pipefail | |
CACHE_FILE="$HOME"/.cache/qstat.map | |
# a 1 minute timed cache | |
# does not actually handle failures properly. todo | |
if ! test -e $CACHE_FILE || (( $(find "$CACHE_FILE" -mmin +1 | wc -l) > 0)); then | |
CACHE_FILE_TMP="$CACHE_FILE.$$.$RANDOM" | |
trap 'rm '"$CACHE_FILE_TMP" EXIT |
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
function autolike () { | |
[].forEach.call( | |
document.getElementById("likes-and-labels-container") | |
.getElementsByClassName("like-button-text"), | |
function (e) { | |
console.error(e); | |
if (e.innerText === "Like") { | |
e.parentNode.click(); | |
// [].forEach.call( | |
// document.getElementsByClassName("like-button"), |
OlderNewer