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
;; Intentional normalization by evaluation for untyped lambda caluclus | |
;; Based on Sam Lindley's talk at metaprog2016 | |
;; http://homepages.inf.ed.ac.uk/slindley/nbe/nbe-cambridge2016.pdf | |
;; object lang | |
;; M ::= x | |
;; | (fn x M) | |
;; | (M N) | |
(defun econs (key val env) |
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
var s = WScript.CreateObject("WScript.Shell"); | |
s.run("bash -i -c \"cd; lxterminal\"", 0) |
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 java.util.*; | |
import java.lang.*; | |
public class Main { | |
static int doit(String ps, int fsiz) { | |
int len = ps.length(); | |
boolean bs[] = new boolean[len]; | |
for (int i = 0; i < len; i++) { | |
bs[i] = ((ps.charAt(i) == '+')?true:false); |
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
require 'dozens' | |
require 'resolv' | |
user = 'hoge' | |
apikey = 'fuga' | |
def update_a(domain, sub) | |
if sub == "" then | |
whole = domain | |
else |
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-syntax ck | |
(syntax-rules (quote) | |
((_ () 'v) 'v) | |
((_ (((op ...) ea ...) . s) 'v) | |
(ck s "arg" (op ... 'v) ea ...)) | |
((_ s "arg" (op va ...)) | |
(op s va ...)) | |
((_ s "arg" (op ...) 'v ea1 ...) | |
(ck s "arg" (op ... 'v) ea1 ...)) | |
((_ s "arg" (op ...) ea ea1 ...) |
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
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(defun script-p () | |
(eql sb-sys:*stdin* *standard-input*)) ) | |
(macrolet ((optimize (pred) | |
(if pred | |
`(declaim (optimize (speed 3) (debug 0) (safety 0))) | |
`(declaim (optimize (speed 0) (debug 3) (safety 3)))))) | |
(optimize #.(script-p))) |
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
(defun warshall-floyd (n edges) | |
(let ((table (make-array (list n n) :initial-element 0))) | |
(dolist (x edges) | |
(destructuring-bind (from to weight) x | |
(setf (aref table from to) weight))) | |
(dotimes (k n) | |
(dotimes (i n) | |
(dotimes (j n) | |
(when (> (aref table i j) | |
(+ (aref table i k) (aref table k j))) |
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
server { | |
listen 80; | |
server_name dav.pohe; | |
location / { | |
root /var/www/webdav; | |
auth_basic "pohe!"; | |
auth_basic_user_file /etc/nginx/conf.d/.htpasswd; |
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
lazy val root = (project in file(".")).settings( | |
name := "sdramtest", | |
version := "0.1.0", | |
scalaVersion := "2.11.7" | |
).dependsOn( | |
ProjectRef(uri("git://github.com/wasabiz/chisel-uart.git"), "chisel-uart"), | |
ProjectRef(uri("git://github.com/zeptometer/chisel-DE1-SDRAM.git"), "chisel-de1-sdram")) | |
libraryDependencies += "edu.berkeley.cs" %% "chisel" % "latest.release" |
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
/* | |
* PAPI wrappers | |
*/ | |
#define NUM_EVENTS 5 | |
int papi_events[] {PAPI_TOT_CYC, PAPI_TOT_INS, PAPI_L1_DCM, PAPI_L2_DCM, PAPI_L2_DCA}; | |
long long int papi_counters[NUM_EVENTS]; | |
void | |
start_papi_counter() | |
{ |