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
#load ("debug.jl") | |
const BALANCED = int8(0) | |
const LEFT = int8(1) | |
const RIGHT = int8(2) | |
abstract Avl{K, V} | |
type Sortmap{K, V} # <: .... ? | |
root :: Avl{K, V} |
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
test_type sort_fn log_size size *sort \sort /sort 3sort +sort ~sort =sort !sort | |
[1,] Int64 "sort!" 17 131072 0.006040 0.004262 0.004221 0.004217 0.004263 0.004335 0.004316 NA | |
[2,] Int64 "mergesort!" 17 131072 0.013253 0.006057 0.005364 0.005582 0.005319 0.005359 0.005337 NA | |
[3,] Int64 "timsort!" 17 131072 0.022508 0.003652 0.000391 0.001081 0.001012 0.001006 0.000792 NA | |
[4,] Float64 "sort!" 17 131072 0.013119 0.004842 0.008454 0.003728 0.005308 0.006597 0.005358 NA | |
[5,] Float64 "mergesort!" 17 131072 0.029234 0.016607 0.008275 0.008506 0.008043 0.016176 0.007970 NA | |
[6,] Float64 "timsort!" 17 131072 0.031171 0.000929 0.000719 0.001449 0.001065 0.019995 0.000718 NA | |
[7,] "String[5]" "sort!" 17 131072 0.860883 0.965052 0.52 |
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> 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: |
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
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 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 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 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 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 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 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 |