Skip to content

Instantly share code, notes, and snippets.

Avatar

Zenna Tavares zenna

View GitHub Profile
View qax.py
class Axiom(object):
def __init__(self, lhs, rhs, name):
self.lhs = lhs
self.rhs = rhs
self.name = name
def q_ax(empty, push, pop, items):
nitems = len(items)
axioms = []
eqqueue = empty
View gist:6c20e9d679b46fbec84d27d84f61037a
class Axiom(object):
def __init__(self, lhs, rhs, name):
self.lhs = lhs
self.rhs = rhs
self.name = name
def q_ax(empty, push, pop, items):
nitems = len(items)
axioms = []
eqqueue = empty
View nmf.js
var V_data = [
[Math.random(), Math.random()],
[Math.random(), Math.random()],
[Math.random(), Math.random()]]
var H_data = [
[Math.random(), Math.random(), Math.random()],
[Math.random(), Math.random(), Math.random()]]
var W_data = numeric.dot(V_data, H_data)
View gist:ad60335a22f05e66cdb4
(set-logic QF_NRA)
(declare-fun omega0 () Real)
(declare-fun omega1 () Real)
(push 1)
(push 1)
(assert(<= 0 omega0))
(assert(<= omega0 1))
(assert(<= 0 omega1))
(assert(<= omega1 1))
View gist:af996a4aeb997805d695
OS: Linux
CXX: g++-4.8 found at /usr/bin/g++-4.8...
CC: gcc-4.8 found at /usr/bin/gcc-4.8...
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/gcc-4.8
-- Check for working C compiler: /usr/bin/gcc-4.8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-4.8
View gist:2d15fba9befb0784c764
rr2 = RemoteRef(2)
put!(rr2,"test2")
rr3 = RemoteRef(3)
put!(rr3,"test3")
a = "hello"
function rand2()
return 2*rand(3)
View gist:8c29fe6ec7cf806f02ad
julia> procs()
3-element Array{Int64,1}:
1
2
3
julia> rr = RemoteRef(3)
RemoteRef(3,1,4)
julia> put!(rr,"test")
@zenna
zenna / gist:13dd7c3b8fd1618cbec7
Created Jan 14, 2015
Trying to esc vector of variables in macro
View gist:13dd7c3b8fd1618cbec7
macro window(name, data...)
namestring = string(name)
quote
filters = getfilters(symbol($namestring))
if !isempty(filters)
for filter in filters
filter.enabled && filter.f($(data...))
end
end
end