Skip to content

Instantly share code, notes, and snippets.

David Widmann devmotion

Block or report user

Report or block devmotion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
devmotion / blackboxoptim.jl
Last active Jul 31, 2019
DDE parameter estimation
View blackboxoptim.jl
using DelayDiffEq, DiffEqParamEstim, BlackBoxOptim, DataFrames, LsqFit
using Plots
# import data from the path, in which:
# pop: population data
# g1, g2: g1 and g2 data
devmotion / benchmark.jl
Created Aug 5, 2018
Interpolation benchmarks
View benchmark.jl
using MuladdMacro, EllipsisNotation, BenchmarkTools
# In place
@generated function f_loop!(out, dt, y, k, b, idxs::Nothing, ::Type{Val{N}}) where N
sumexpr = :(+($((:(k[$i][idx]*b[$i]) for i in 1:N)...)))
@muladd @inbounds for idx in eachindex(out)
out[idx] = y[idx] + dt*$sumexpr
View typemacros.jl
using MacroTools: namify
using Base.Meta: isexpr
## Utilities
# Split struct definition (neglecting constructors)
function splitstruct(structdef)
# Split type definition
isexpr(structdef, :struct, 3) || error("Not a type definition:", structdef)
You can’t perform that action at this time.