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 ruby | |
require 'heist' | |
# true | |
scheme = Heist::Runtime.new | |
# #<runtime: call/cc disabled, hygienic, eager> | |
def test x | |
puts "\# #{x.class}: #{x}" | |
x | |
end | |
# nil |
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
*.png | |
*.avi | |
.*.un~ | |
.*.swp |
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
*.so | |
*.o | |
*.html | |
.*.un~ | |
.*.swp |
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 'multiarray' | |
require 'hornetseye_opencv' | |
require 'hornetseye_rmagick' | |
require 'hornetseye_narray' | |
include Hornetseye | |
img = MultiArray[[2, 3, 5, 7], [11, 13, 17, 19]] | |
# MultiArray(UBYTE,2): | |
# [ [ 2, 3, 5, 7 ], | |
# [ 11, 13, 17, 19 ] ] | |
cvmat = img.to_cvmat |
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
(use-modules (srfi srfi-1) (srfi srfi-26) (ice-9 curried-definitions)) | |
(define (dot graph colors) | |
(apply string-append | |
(append (list "graph g {") | |
(map (lambda (color) (format #f " ~a [style=filled, fillcolor=~a];" (car color) (cdr color))) colors) | |
(map (lambda (edge) (format #f " ~a -- ~a;" (car edge) (cdr edge))) graph) | |
(list " }")))) | |
(define (graphviz graph colors) (system (format #f "echo '~a' | dot -Tpng | display -" (dot graph colors)))) | |
(define (nodes graph) (delete-duplicates (append (map car graph) (map cdr graph)))) | |
(define ((has-node? node) edge) (or (eq? (car edge) node) (eq? (cdr edge) node))) |
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
(use-modules (artanis artanis) (artanis cookie) (artanis utils)) | |
(init-server) | |
(get "/" #:session 'spawn | |
(lambda (rc) | |
(let [(sid (or (cookie-ref (rc-cookie rc) "sid") (:session rc 'spawn))) | |
(time (strftime "%c" (localtime (current-time))))] | |
(tpl->response `(html (body (p ,sid) (p ,time))))))) | |
(run) |
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
# sudo docker build -t wedesoft/aiscm | |
# sudo docker run --rm -t -i wedesoft/aiscm /bin/bash | |
# sudo docker run --rm -p 80:80 wedesoft/aiscm | |
FROM debian:jessie | |
MAINTAINER Jan Wedekind <jan@wedesoft.de> | |
ENV ARTANIS_VERSION 0.1.2.1-be890-dirty | |
ENV SERVER_HOME /srv/artanis-repl | |
RUN apt-get update && \ |
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/sbcl --script | |
; Also see http://pleasegodno.wordpress.com/common-lisp-tutorials/common-lisp-gui-programming-with-commonqt/introduction-to-commonqt/ | |
; or see http://kvardek-du.kerno.org/2011/12/setting-up-commonqt-on-osx.html if you're still using Mac OS | |
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
(user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) |
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
// calibration grid |
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 python3 | |
import sys | |
import numpy as np | |
import tensorflow as tf | |
class CharVec: | |
def __init__(self, text): | |
self.chars = np.array([ord(c) for c in sorted(set(text))]) |