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
fatal: No names found, cannot describe anything. | |
fatal: bad revision '^' | |
JULIA usr/lib/julia/inference.ji | |
essentials.jl | |
generator.jl | |
reflection.jl | |
options.jl | |
promotion.jl | |
tuple.jl | |
range.jl |
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_CPU_TARGET:=core2 | |
prefix=/datanumerik/bzfsikor/julia/julia-head |
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
typealias ColVec Vector{Union{Colon,Int}} | |
immutable SliceIterator{A<:AbstractArray} | |
a::A | |
dim::Int | |
cols::ColVec | |
end | |
function SliceIterator(a, dim::Int) | |
cols = ColVec(length(size(a))) | |
cols = fill!(cols, :) |
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
@userplot PlotSolutions | |
@recipe function f(o::PlotSolutions) | |
samples = o.args[1] | |
species --> measuredinds | |
t --> 0:1/3:30 | |
color_palette --> [colorant"steelblue"] | |
linewidth --> 0.1 | |
label --> "" | |
seriesalpha --> 0.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
heu |
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
using Plots | |
rect(x,y,w,h) = Shape(x+[0,w,w,0], y+[0,0,h,h]) | |
@recipe function f(ds::Array{Measurement}; alpha = 1) | |
isempty(ds) && return [] | |
binedges = [0,10,12,14,16,18,20,25] | |
nmax = nfollicles(ds) | |
a = alpha |
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
using Sundials | |
using Sundials: N_Vector, N_Vector_S | |
using ForwardDiff | |
#using ReverseDiff | |
""" | |
sens(f!, t0, y0, p, tout; reltol, abstol) | |
Compute the solution and sensivities to the parametrized ODE problem defined by `f!(ẏ, t, y, p)`, starting at t0, y0, p. |
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
using Sundials | |
function test1() | |
yS0 = [1. 2. 3.; 4. 5 6] | |
N, Ns = size(yS0) | |
GC.@preserve yS0n = [Sundials.NVector(yS0[:,j]) for j=1:Ns] # array of julia wrappers | |
GC.@preserve yS0nv = [Sundials.N_Vector(n) for n in yS0n] # array of pointers to sund. structs | |
pyS0 = pointer(yS0nv) |
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
# HEAD FROM lapack.jl | |
const liblapack = Base.liblapack_name | |
import Base.LinAlg: BlasFloat, BlasChar, BlasInt, blas_int, chkstride1, chksquare, Schur | |
# extract to appear in lapack.jl | |
# Reorder Schur forms | |
for (trsen, elty) in | |
((:dtrsen_,:Float64), | |
(:strsen_,:Float32)) |
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 numpy as np | |
t_adopt = .5 | |
p_adopt = .9 | |
p_expl = .1 | |
def timestep(state, influence): | |
influenced = (np.abs(np.dot(influence,state)) > t_adopt) | |
r = np.random.rand(np.size(state)) | |
# vectorized: 415us |