Skip to content

Instantly share code, notes, and snippets.

View liang456's full-sized avatar

James liang456

  • SJTU
  • Shanghai, China
View GitHub Profile
;; This is the missionaries & cannibals problem solved in Scheme.
;; The code is not as elegant as it could have been
;; (lacking recursion, in the spirit of Scheme, in many places).
;; It is also not very generic. Also does no optimization and
;; will apply search paths back and forth.
;; It works however, and should be relatively readable.
;; "https://class.coursera.org/aiplan-001/forum/thread?thread_id=164"
(use srfi-1)
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
import random
HANGMANPICS = ['''
+---+
| |
|
|
|
|
=========''', '''