Skip to content

Instantly share code, notes, and snippets.

import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import bwapi.*;
public class SommerinoCamperino extends DefaultBWListener {
static class Line {
private double slope;
private double intercept;
@simbuerg
simbuerg / bindkeys.zsh
Last active February 21, 2019 20:04 — forked from AbigailBuccaneer/bindkeys.zsh
zsh bindkeys using terminfo
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
@simbuerg
simbuerg / 01example.c
Created June 9, 2017 10:06
Call Example (C)
#include "isl/map.h"
#include "isl/set.h"
#include "isl/space.h"
#include "isl/ctx.h"
int main(int argc, char *argv[]) {
isl_ctx *ctx = isl_ctx_alloc();
isl_set *domainInner = isl_set_read_from_str(ctx, "[x,y] -> {S1[i,j] : 0 <= i,j and i < x and j < y }");
isl_map *accessInner = isl_map_read_from_str(ctx, "{ S1[i,j] -> A[i+1, j-1, 42] }");
isl_map *access = isl_map_read_from_str(ctx, "{S[i,j] -> F[j,i] }");
@simbuerg
simbuerg / pprof.py
Created June 8, 2017 12:43
Example project for benchbuild
"""
PPROF Experiment.
"""
from benchbuild.experiment import Experiment
from benchbuild.project import Project
from benchbuild.utils.actions import (Build, Clean, Configure, Download,
MakeBuildDir, Prepare, Run)
from benchbuild.utils.run import track_execution
from functools import partial
from plumbum import local