2025-11¶
Batch compress files
Batch compress files with the following tools
- find : https://linux.die.net/man/1/find
- GNU parallel: https://zenodo.org/records/1146014 (PDF) and https://www.gnu.org/software/parallel/parallel_tutorial.html (HTML)
- 7z
- xz
Julia array tips
Convert vector of vector to matrix
Use the stack function.
Convert linear index to 2D indices
Use CartesianIndices((nrow, ncol)) 1.
Julia design patterns
Some notes of Tom Kwong's book Hands on Design patterns in Julia.
Julia package loading
When your Julia codebase grows larger, you might want to organize it into modules and packages.
Track parameter changes in simulations
From this discourse thread
Changing parameters using traditional DiffEqCallbacks.jl with prob.ps[sym] = val in the middle of a simulation cannot be tracked.
From v10, ModelingToolkit.SymbolicDiscreteCallback can track changed parameters in a callback. See https://docs.sciml.ai/ModelingToolkit/dev/basics/Events/#save_discretes
For example,
Publish Julian Jupyter notebooks
This post will demonstrate my template repositoryabout
- How to use Docker to build a Julian Jupyter notebooks runtime environment.
- How to use GitHub actions to execute notebooks in the docker container in parallel.
- How to use
jupyter-bookto publish notebooks automatically when changes are pushed to GitHub.
Artifacts in GitHub actions
Artifacts are data generated by workflows that can be passed to subsequent jobs.
Automatic Dependency Update in GitHub
Updating package dependencies automatically as a part of continuous integration (CI).