Skip to content

Instantly share code, notes, and snippets.

@arm2arm
arm2arm / rebalance_zfs.sh
Created April 6, 2021 15:59
rebalance zfs for the cold data
# If you change some settings in the zfs dataset you should rebalance it in order to store data with this current settings.
# Usage:
# zfs set recordsize=1M data/archive
# sh ./rebalance_zfs.sh /data/archive| parallel -P 16 --eta
mypath=$1
find $mypath -type f | xargs -d '\n' -I{} echo "rsync -a --inplace \"{}\" \"{}.abcdef\";unlink \"{}\";mv \"{}.abcdef\" \"{}\" "
@arm2arm
arm2arm / gist:533b108f7a23cde71a6f93624ec7d6e8
Last active February 22, 2021 20:38
python MPI on with conda
# HPC MPI enviroment for python jobs
```
conda create -n mpi
conda activate mpi
conda install openmpi openmpi-mpicc mpi4py matplotlib astropy scikit-learn pandas pytables
```
# testing
@arm2arm
arm2arm / streamlit on cocalc.md
Last active July 21, 2021 20:48
Streamlit on cocalc

Install

conda create -y -n streamlit python=3.6
conda activate streamlit
pip install streamlit

Usage

in the x11 terminal:

streamlit hello 
@arm2arm
arm2arm / .block
Last active October 6, 2017 09:49
RAVE-demo
license: mit
@arm2arm
arm2arm / disks
Last active February 22, 2017 11:16
[root@clei36 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 1.8T 0 part
├─centos_clei36-swap 253:0 0 31.5G 0 lvm [SWAP]
├─centos_clei36-root 253:1 0 50G 0 lvm /
└─centos_clei36-home 253:2 0 1.8T 0 lvm /home
sdb 8:16 0 14T 0 disk
└─360014054d5aa7f25ddc40eba440f2275