http://json-proxy.appjet.net/?url={url to fetch}&callback={callback}
http://www.bucabay.com/2009/web-development/rss-feeds-via-cross-domain-json-proxy/
def remove_comments(line, pref="", ctx=None, escape=False): | |
if line == "": return pref | |
if ctx == "#" and line[0] != '\n': | |
return remove_comments(line[1:], pref, ctx) | |
if not ctx: | |
if line[0] == "#": return remove_comments(line[1:], pref, '#') | |
for c in ['"""', '"', "'"]: | |
if line.startswith(c): | |
# open context | |
return remove_comments(line[len(c):], pref + c, c) |
using AudioIO | |
macro time_call(ex) | |
println(ex) | |
var = gensym() | |
ex = Expr(:(=), var, ex) | |
quote | |
$ex; | |
AudioIO.pull($var, 44100, 0, 44100); | |
@time AudioIO.pull($var, 44100, 0, 44100); |
{- Sierpinski's triangle -} | |
hscale = sqrt(3) / 2 | |
triangle a = | |
filled black (path [(-a / 2, -hscale * a / 2), | |
(a / 2, -hscale * a / 2), | |
(0, hscale * a / 2)]) | |
sierpinski (x, y) a n = |
abstract Measure | |
immutable Length{unit} <: Measure | |
value::Float64 | |
end | |
abstract MeasureOp{n} <: Measure | |
abstract UnaryOp{A} <: MeasureOp{1} | |
abstract ScalarOp{A} <: MeasureOp{2} | |
abstract BinaryOp{A, B} <: MeasureOp{2} |
# An infinite number of mathematicians walk into a bar... | |
using Color | |
colors = distinguishable_colors(9) | |
box(w, h, n) = | |
empty |> fillcolor(colors[n % 9 + 1]) |> size(w, h) |
socnet { | |
user users[x], | |
group groups[y], | |
} | |
user { | |
string name, | |
string profile, | |
string username, | |
string password, |
k=1; i=[1,2] | |
while k: | |
for j in i: | |
k*=j | |
i.append(k+1) | |
k=1 |
http://json-proxy.appjet.net/?url={url to fetch}&callback={callback}
http://www.bucabay.com/2009/web-development/rss-feeds-via-cross-domain-json-proxy/