Skip to content

Instantly share code, notes, and snippets.

View normanrz's full-sized avatar

Norman Rzepka normanrz

View GitHub Profile
@normanrz
normanrz / bench.html
Last active July 15, 2022 06:44
ColMajorToRowMajor microbenchmark
<html>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<ul id='cycleResults'>
</ul>
<div id="result">
</div>
@normanrz
normanrz / gitshots
Created January 13, 2021 09:55
gitshots
#!/bin/bash
# For adding automatic webcam shots on every commit
if [ ! -f .git/hooks/post-commit ]; then
echo "#!/bin/sh
snap $HOME/.gitshots/\$(date -u +"%Y-%m-%dT%H-%M-%SZ").jpg &" > .git/hooks/post-commit
chmod u+x .git/hooks/post-commit
echo "Post-commit hook added"
fi
# APPLY VOLUME MERGE ANNOTATION
#
# This script applies a webKnossos merger mode annotation
# to a given segmentation layer. The script will output a
# TIFF image sequence.
#
# The --set_zero flag will relabel all non-annotated segments
# to 0.
#
# 1. Download the merger mode NML file.
# APPLY VOLUME MERGE ANNOTATION
#
# This script applies a webKnossos merger mode annotation
# to a given segmentation layer. The script will output a
# WKW layer.
#
# The --set_zero flag will relabel all non-annotated segments
# to 0.
#
# 1. Download the merger mode NML file.
@normanrz
normanrz / merge_volume.py
Created May 20, 2020 09:13
Merge webKnossos volume annotations
# VOLUME ANNOTATION MERGE
#
# This script merges multiple volume annotations from webKnossos.
# In case of overlapping annotations, the last annotation wins.
#
# The --relabel flag will relabel the segments of each annotation
# to be unique in the output annotation. Useful when multiple
# annotators created segments with id 1.
#
# 1. Download all annotations that you want to merge.
@normanrz
normanrz / bootstrap.sh
Last active January 31, 2022 15:20
bootstrap.sh
#!/bin/bash
set -e
# wget https://gist.github.com/normanrz/503ac852159f578975719563bfb91b06/raw/0769184fc82298496faa0206a6162eac21d6354e/bootstrap.sh | sh -
DOCKER_COMPOSE_VERSION=2.2.3
ANACONDA_VERSION=2021.11
# Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
@normanrz
normanrz / run
Created July 26, 2019 14:20
srun replacement
#!/usr/bin/python
from argparse import ArgumentParser, REMAINDER
from subprocess import check_output, call
from threading import Thread
from time import sleep
import os
import re
POLL_INTERVAL=2

Individual Contributor License Agreement

Thank you for your interest in making a Contribution to a project of scalable minds GmbH, a German company with notice address at Großbeerenstraße 15, 14482 Potsdam, Germany (scalable minds or we). In order to clarify the intellectual property license granted with Contributions from any person or entity, scalable minds must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of scalable minds and its users; it does not change your rights to use your own Contributions for any other purpose. You accept and agree to the following terms and conditions for your present and future Contributions submitted to scalable minds.

Definitions:

You (or Your) shall mean the copyright owner or legal entity authorized by the copyright owner that is making this CLA with scalable minds. For legal entiti

#!/bin/bash
set -e
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@normanrz
normanrz / keybase.md
Created July 16, 2015 14:17
Keybase verification

Keybase proof

I hereby claim:

  • I am normanrz on github.
  • I am normanrz (https://keybase.io/normanrz) on keybase.
  • I have a public key whose fingerprint is 4F3A 76C6 2FA5 7A05 736E E030 45E1 4CC0 D31E 1552

To claim this, I am signing this object: