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 | |
i = 0 | |
hash = {} | |
edges = '' | |
ARGF.each do |line| | |
id1, id2s = line.strip.split /\s/ | |
id2s.split(",").each do |id2| | |
hash[id1] ||= i += 1 |
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 | |
# -*- coding: UTF-8 -*-; | |
gem 'text_layout' | |
require 'optparse' | |
require 'text_layout' | |
require 'set' | |
opts = OptionParser.new <<EOS |
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
message | |
---------------------> | |
,---!. | |
|eat|_\ |
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
# -*- coding: UTF-8 -*-; | |
def dot(index) | |
index = index & 7 | (index & 112) >> 1 | (index & 8) << 3 | index & 128 | |
case index | |
when 0 | |
" " | |
else | |
[0x2800 + index].pack('U*') | |
end |
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 sys | |
import math | |
def dot(bits): | |
bits = bits & 7 | (bits & 112) >> 1 | (bits & 8) << 3 | bits & 128 | |
return unichr(0x2800 + bits) | |
def mandelbrot(x, y, r, iteration=1000): | |
xx = 1.4 * float(x - 1.4 * r) / r | |
yy = 1.4 * float(y - r) / r |
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 sys | |
import math | |
from random import random | |
from PIL import Image, ImageOps, ImageEnhance | |
def dot(bits): | |
bits = bits & 7 | (bits & 112) >> 1 | (bits & 8) << 3 | bits & 128 | |
return unichr(0x2800 + bits) | |
class Grayscale24: |
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
# $ coffee fluent-dump.coffee [bind] [port] | |
net = require 'net' | |
dns = require 'dns' | |
util = require 'util' | |
dgram = require 'dgram' | |
msgpack = require 'msgpack' | |
msgpack.raw = require 'msgpack-raw' |
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 | |
# -*- coding: UTF-8 -*-; | |
require 'base64' | |
require 'pathname' | |
require 'english' | |
require 'json' | |
require 'CFPropertyList' |
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
request = require 'request' | |
http = require 'http' | |
url = require 'url' | |
cp = require 'child_process' | |
command = (command, args, callback) -> | |
cmd = cp.spawn command, args | |
if callback | |
result = new Buffer(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
<match fluent.digraph fluent.warn> | |
type websocket | |
port 8080 | |
</match> | |
... |