A script for creating multiple development environments in a single WSL instance.
./dev-container.sh 1 up
user
- User to run the container.
macro maketoplevel(ex) | |
gather_vars(ex) = Vector{Expr}() | |
gather_vars(ex::Symbol) = isdefined(ex)? Vector{Expr}(): [:(global $ex)] | |
function gather_vars(ex::Expr) | |
if !(ex.head in (:line,:block)) | |
unique(Iterators.flatten(map(gather_vars,ex.args))) | |
else | |
Vector{Expr}() | |
end | |
end |
using PyPlot | |
addprocs(Sys.CPU_CORES÷2) | |
@everywhere using DistributedArrays | |
function partest() | |
println("There are $(nworkers()) workers") | |
# Inspired by this question on stackoverflow (poster Thomas) |