Skip to content

Instantly share code, notes, and snippets.

View apg's full-sized avatar
🐢
Turtle

Andrew Gwozdziewycz apg

🐢
Turtle
View GitHub Profile
@apg
apg / gist:efe6833eb74ac264b68b
Created October 17, 2015 17:34 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview

Streaming Systems:

Streaming More Generally:

<html>
<body>
<a href="javascript:(function(v){if (v) {var r = prompt('Playback rate?');var f = parseFloat(r);v.playbackRate = f;}})(document.querySelector('video'))">Video Speedup</a>
</body>
</html>
@apg
apg / README.md
Created December 23, 2017 07:57
Prototype: using Go's ast tools to build a comment parsing contract engine.

Overview

$ go run law.go
package main

import "fmt"

// @require: not-empty: len(x) > 0
func Foo(x string) {
One day I got bored of Java. So I learned a little Lisp and what I
found was a surprise (the land of lisp): It is the language so unique
and so expressive, so that coding never looks the same within my eyes.
Now I eat parentheses for breakfast. And if my program isn't done, I
eat parentheses for lunch (the land of lisp). They might look funny
but they have semantic power, that gives your program lots of brevity
and punch!
Simple but refined guaranteed to blow your mind (the land of lisp).
Minimal and sleek, but still so clever you will freak (the land of
@apg
apg / enables.scrbl
Last active November 16, 2017 09:14
Using the functions in graphviz.rkt, we now can do the things in enables.scrbl
@(require "graphviz.rkt")
@(require scriblib/figure)
@graphviz-figure["foo-bar" "Overview of Foo Bar"]{
digraph G {
foo -> bar
bar -> baz
baz -> quux
quux -> foo
}
#lang racket/base
;; Roughly based on the PLaneT package by Dave Herman,
;; Originally released under MIT license.
;; edited: Matthias, organization in preparation for pretty-print
;; -----------------------------------------------------------------------------
;; SERVICES
#!/bin/sh
if [[ -z "$1" ]]; then
echo "usage: $0 <key>"
exit 1
fi
curl -X POST -d "key=$1" https://yubi-expire.herokuapp.com/
echo
@apg
apg / soklevel.c
Last active January 6, 2017 23:57
dirt simple sokoban game supporting 8x8 boards.
/**
* soklevel.c: dirt simple sokoban ASCII > sokobon.c compatible
* level editor.
*
* Copyright 2017: Andrew Gwozdziewycz <me@apgwoz.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
package main
import (
"flag"
"image"
"image/color"
"image/draw"
_ "image/jpeg"
png "image/png"
"log"