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
The Challenge | |
------------- | |
Given the following riddle, write a regular expression describing all possible answers, | |
assuming you never make a move which simply undoes the last one you made. | |
The Riddle | |
---------- | |
You are on your way somewhere, taking with you your cabbage, goat, and wolf, as always. | |
You come upon a river and are compelled to cross it, but you can only carry one of the | |
three animals at a time. None of whom can swim because this isn't THAT kind of riddle. |
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
""" | |
$ pip install opml | |
$ python opml_to_markdown.py some_outline.opml | |
-> some_outline.md | |
""" | |
import codecs | |
import opml | |
import sys |
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
-- Author: Michael-Keith Bernard | |
-- Date: August 10, 2012 | |
-- | |
-- Notes: This Trie implementation is a port of the Clojure implementation | |
-- below. I had to implement quite a few functions from clojure.core to keep the | |
-- same basic functionality. Probably very little if any of this code is | |
-- production worthy, but it's interesting all the same. Finally, all of the | |
-- documentation strings are pulled directly from clojure.core and may not | |
-- accurately reflect the Lua implementation. | |
-- |
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
(ns test-clj-byte-chunk-seq | |
(:import (java.io InputStream OutputStream | |
FileInputStream FileOutputStream))) | |
(set! *warn-on-reflection* true) | |
(def ^:const ONE_MEG (* 1024 1024)) | |
(deftype ByteArrayChunk [^bytes array ^int offset ^int end] | |
clojure.lang.IChunk |
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 time | |
import struct | |
import socket | |
import hashlib | |
import sys | |
from select import select | |
import re | |
import logging | |
from threading import Thread | |
import signal |
NewerOlder