Bogumił Kamiński, September 5, 2018
- Package management in projects
- Handling missing data
- Broadcasting
- Heterogeneous collections
using DataFrames | |
using Plots | |
using Random | |
using StatsBase | |
function cont_run(time=10000, n=10000, λ=0.05, q=0.1) | |
r = zeros(time) | |
θ = zeros(n) | |
pchange = zeros(n) | |
for t = 1:time |
# This file is machine-generated - editing it directly is not advised | |
[[Adapt]] | |
deps = ["LinearAlgebra"] | |
git-tree-sha1 = "42c42f2221906892ceb765dbcb1a51deeffd86d7" | |
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" | |
version = "2.3.0" | |
[[Artifacts]] | |
deps = ["Pkg"] |
using Random, Statistics, DataFrames | |
try | |
using PyPlot | |
global const HAS_PLOTS = true | |
catch | |
global const HAS_PLOTS = false | |
end | |
@enum Tree None Green Red Brown |
using Random | |
function setup(density) | |
[x == 1 ? 2 : rand() < density ? 1 : 0 for x in 1:251, y in 1:251] | |
end | |
function go(grid) | |
any(isequal(2), grid) || return true | |
for pos in shuffle!(findall(isequal(2), grid)) | |
x, y = pos[1], pos[2] |
Bogumił Kamiński
# K. Growiec, J. Growiec, B. Kamiński | |
# Social Network Structure and The Trade-Off Between Social Utility and Economic Performance | |
# Simulation experiment design generation file | |
library(randtoolbox) | |
size <- 65536 | |
s_design <- sobol(size, 9, TRUE, 3, 4711, FALSE) | |
colnames(s_design) <- c("r", "p", "lambda", "sigma", "rho", |