This file contains hidden or 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
| // gcc -shared -fPIC -I$JULIAHOME/usr/include -L$JULIAHOME/usr/lib -lzmq -luv -o libthreadzmq.so threadzmq.c | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <assert.h> | |
| #include <math.h> | |
| #include <zmq.h> | |
| #include <uv.h> |
This file contains hidden or 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> s = sprint() do io | |
| println(io, "hello") | |
| println(io, "world" | |
| end | |
| "hello\nworld\n" |
This file contains hidden or 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 test/all | |
| From worker 2: * core | |
| From worker 3: * numbers | |
| From worker 2: * strings | |
| exception on 1: ERROR: read: end of file | |
| in read at iobuffer.jl:54 | |
| in read at stream.jl:373 | |
| in anonymous at task.jl:804 | |
| From worker 2: exception on 2: ERROR: read: end of file | |
| From worker 2: in read at iobuffer.jl:54 |
This file contains hidden or 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
| Eight miles deep the well forgotten by mortals | |
| Oh, I drank it empty in one single sip | |
| Eight miles wide the valley beyond all hope | |
| Oh, I filled the whole with one single fist | |
| Five million christians on a ride towards us | |
| Oh, I slaughtered the bunch with one single hit with my spear | |
| Five million women so alone in the night | |
| Oh, I had them all satisfied profusely every night by myself |
This file contains hidden or 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> (+) = 1 | |
| 1 | |
| julia> + | |
| 1 |
This file contains hidden or 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
| @unix_only begin | |
| const path_separator = "/" | |
| const path_separator_regex = r"/+" | |
| const path_absolute_regex = r"^/" | |
| const path_parse_regex = r"^(.*?/|)([^/]+?)(\.[^\.]+|)$" | |
| splitdrive(path::String) = ("",path) | |
| end | |
| @windows_only begin | |
| const path_separator = "\\" |
This file contains hidden or 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
| splitpath => path to array of parts | |
| joinpath => array of parts to path | |
| parsepath(path) => (dir,base,ext) | |
| parsepath(path,ext) => (dir,base,ext) | |
| parsepath(path,regex) => (dir,base,ext) | |
| stdpath(path) => standardize path, removing extraneous dots | |
| abspath(path) => make absolute, relative to current dir | |
| realpath(path) => resolve all symlinks |
This file contains hidden or 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
| abstract Path | |
| @unix_only begin | |
| const separator = "/" | |
| const separator_regex = r"/+" | |
| end | |
| @windows_only begin | |
| const separator = "\\" | |
| const separator_regex = r"[/\\]" | |
| end |
This file contains hidden or 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
| type DataVec{T} <: AbstractDataVec{T} | |
| data::Vector{T} | |
| na::BitVector | |
| # Sanity check that new data values and missingness metadata match | |
| function DataVec(data::Vector{T}, na::BitVector) | |
| if length(data) != length(na) | |
| error("data and NA vectors not the same length!") | |
| end | |
| new(data,na) |
This file contains hidden or 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> quote | |
| for i in 1:n | |
| x[i] ~ Bernoulli(p) | |
| end | |
| p ~ Beta(alpha, beta) | |
| alpha = 1.0 | |
| beta = 1.0 | |
| end | |
| quote # line 2: |