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 ijson | |
import os | |
from enum import Enum | |
def clevr_iter(clevr_root, | |
data_type, | |
train=True): | |
path = os.path.join(clevr_root, data_type) | |
train_val = "train" if train else "val" | |
if train: |
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
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 |
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
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 |
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
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) |
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
Here's a gist by me. | |
Now an update. |
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
(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)) |
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
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 |
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
rr2 = RemoteRef(2) | |
put!(rr2,"test2") | |
rr3 = RemoteRef(3) | |
put!(rr3,"test3") | |
a = "hello" | |
function rand2() | |
return 2*rand(3) |
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
julia> procs() | |
3-element Array{Int64,1}: | |
1 | |
2 | |
3 | |
julia> rr = RemoteRef(3) | |
RemoteRef(3,1,4) | |
julia> put!(rr,"test") |
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
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 |
NewerOlder