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
resqconf = readlines(`qconf -sel`) | |
listnodes = [strip(k) for k in resqconf] | |
addprocs(listnodes) |
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
conda uninstall mpi4py | |
conda uninstall ompenmpi | |
brew install --build-from-source openmpi | |
pip install mpi4py |
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 stimela | |
INPUT = 'input' | |
OUTPUT = 'output' | |
MSDIR = 'msdir' | |
MODEL = 'skylens.fits' | |
MS = 'test_predict_with_custom_fits.ms' | |
PREFIX = MS[:-3] |
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
function sort_gpus() | |
mems = Int[] | |
gpus = collect(CUDA.devices()) | |
for k in 1:length(gpus) | |
CUDA.device!(k-1) | |
push!(mems, CUDA.available_memory()) | |
end | |
ind = sortperm(mems, rev=true) | |
hcat(gpus[ind], mems[ind]) | |
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
using CSV, Tables, Plots | |
pulsar = CSV.read(download("https://gist.githubusercontent.com/borgar/31c1e476b8e92a11d7e9/raw/0fae97dab6830ecee185a63c1cee0008f6778ff6/pulsar.csv"), Tables.matrix) | |
α = 2 | |
p = plot(border=:none, bg = :black) | |
for k in 79:-1:1 | |
plot!(pulsar[80 - k ,:] .+ α*k, label="", fillrange = α*k, | |
fillalpha = 1, fillcolor = :black, c=:white) | |
end | |
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
### A Pluto.jl notebook ### | |
# v0.19.12 | |
using Markdown | |
using InteractiveUtils | |
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
macro bind(def, element) | |
quote | |
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end |