Skip to content

Instantly share code, notes, and snippets.

@shinwachi
shinwachi / analysis_env.yaml
Last active September 4, 2020 21:12
dagster config basic multiprocess
storage:
filesystem:
config:
base_dir:
"/tmp/"
execution:
multiprocess:
config:
max_concurrent: 0 # max cpu
solids:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh # --no-check-certificate (don't do this if you can help it)
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh -b
conda config --set ssl_verify no
conda install dagster dagit -y
@shinwachi
shinwachi / install.sh
Created August 23, 2020 19:47
docker install ubuntu 16
# (log in)
sudo su
apt-get update
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce
exit
sudo usermod -aG docker $USER
exit
@shinwachi
shinwachi / gist:a6fb30619c1ddbefbeb3ed78f3774320
Created August 22, 2020 06:09
detect missing knime node
# find all knime nodes to install
find . -name "settings.xml" -printf "\"%p\" " | xargs grep 'node-feature-symbolic-name' | grep -oP '.*value="\K[^\"]+' | sort | uniq
# find all installed nodes
./knime -application org.eclipse.equinox.p2.director -nosplash -consolelog -listInstalledRoots | sort
# find differences between the two
comm x y
@shinwachi
shinwachi / gist:55b3721f41ea3ecbfa3e550fa0dad9d3
Created August 22, 2020 04:17
equinox p2 director example
./knime -application org.eclipse.equinox.p2.director -nosplash -consolelog -r 'jar:file:/knime/knimoe_220.zip!/' -i com.ccg_obsolete.feature.group,com.chemcomp.feature.group,com.ccg_ROW.feature.group -d $(pwd)
# ./knime -application org.eclipse.equinox.p2.director -nosplash -help
CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
-help | -h | -?
Prints this command line help information.
-list | -l [ <comma separated list> ]
Lists all IU's found in the given repositories. IUs can optionally be listed. Each entry in the list is in the form <id> [ '/' <version> ].
@shinwachi
shinwachi / chunk.py
Last active August 20, 2020 09:33
chunked range in python
'''
with runt [(0, 2000), (2000, 4000), (4000, 6000), (6000, 7000)]
no runt [(0, 2000), (2000, 4000), (4000, 6000)]
[{'x': (0, 2000), 'y': (0, 2100), 'idx_xy': (0, 0)},
{'x': (2000, 4000), 'y': (0, 2100), 'idx_xy': (1, 0)},
{'x': (4000, 6000), 'y': (0, 2100), 'idx_xy': (2, 0)},
{'x': (0, 2000), 'y': (2100, 4200), 'idx_xy': (0, 1)},
{'x': (2000, 4000), 'y': (2100, 4200), 'idx_xy': (1, 1)},
{'x': (4000, 6000), 'y': (2100, 4200), 'idx_xy': (2, 1)},
{'x': (0, 2000), 'y': (4200, 6300), 'idx_xy': (0, 2)},
@shinwachi
shinwachi / gist:44823769720fef142907a15087571648
Created August 17, 2020 22:30
Fiji jython script to save particle analysis summary
Implementation of soultion listed here: https://forum.image.sc/t/solved-save-summary-in-headlessmode/26606/4