This file contains hidden or 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
undefined |
This file contains hidden or 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
;; search.lisp | |
;; This environment holds the size of the environment, | |
;; the location of the gold and a bitmask for blocked | |
;; squares. | |
(defstruct env | |
(width 5) | |
(height 5) | |
(gold-x-pos 0) | |
(gold-y-pos 0) |
This file contains hidden or 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
;int main(void) { printf( /* | |
(format t ;*/ | |
"goodbye dmr and jmc, thanks for everything!" | |
); return 0; } /* | |
(quit) | |
;*/ |
This file contains hidden or 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
from bottle import route, run, debug | |
import subprocess | |
def sendkeys(*keys): | |
subprocess.call(['xdotool', 'search', '--name', 'Spotify Premium - Linux Preview', 'key'] + list(keys)) | |
return "ok\n" | |
@route('/pause') | |
@route('/play') | |
def play(): return sendkeys('space') |
This file contains hidden or 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
# Project Euler problem 102 | |
# Which side of the line AB is the point P? | |
# (The dot product of AP and the perpendicular to AB) | |
def side((ax,ay), (bx,by), (px,py)): | |
return (bx - ax) * (py - ay) - (by - ay) * (px - ax) | |
def same_side(a, b, p, q): | |
sp = side(a, b, p) | |
sq = side(a, b, q) |
This file contains hidden or 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
;; Personal prefs. | |
(setq user-mail-address "x") | |
(global-set-key "\C-w" 'backward-kill-word) | |
(global-set-key "\C-x\C-k" 'kill-region) | |
;; Packages and bundles | |
(add-to-list 'load-path "~/.emacs.d/") | |
(add-to-list 'load-path "~/.emacs.d/color-theme-6.6.0") | |
;; Viper mode |
This file contains hidden or 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
diff --git a/src/Syntax.hs b/src/Syntax.hs | |
index 1905488..475a02a 100644 | |
--- a/src/Syntax.hs | |
+++ b/src/Syntax.hs | |
@@ -2,6 +2,7 @@ | |
module Syntax where | |
import Labels | |
+import Control.Monad.State | |
import Data.Generics |
This file contains hidden or 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
--- | |
layout: page | |
categories: | |
- title: Journal Papers | |
publications: | |
- title: Rule Formats for Determinism and Idempotency (journal version) | |
date: 31.03.2010 | |
authors: | |
- Luca Aceto | |
- Arnar Birgisson |
This file contains hidden or 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
--- setnohs.sorted 2012-01-27 11:45:01.768205853 +0100 | |
+++ seths.sorted 2012-01-27 11:45:23.088143702 +0100 | |
@@ -0,0 +1,2 @@ | |
+n | |
+t | |
@@ -21,2 +23,2 @@ | |
-noballooneval | |
- balloonexpr= | |
+ ballooneval | |
+ balloonexpr=GHC_TypeBalloon() |
This file contains hidden or 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
interleave :: [a] -> [a] -> [[a]] | |
interleave [] [] = [] | |
interleave as [] = [as] | |
interleave [] bs = [bs] | |
interleave as bs = [ (head as):arest | arest <- interleave (tail as) bs ] | |
++ [ (head bs):brest | brest <- interleave as (tail bs) ] |