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 datetime | |
import os | |
import platform | |
import sys | |
import traceback | |
from typing import Optional | |
import click | |
from packaging.version import parse as parse_version |
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
--- | |
- name: Install Girder with qidw plugin | |
hosts: all | |
vars: | |
ansible_python_interpreter: auto | |
roles: | |
- role: girder.mongodb | |
vars: | |
mongodb_data_path: /var/lib/mongodb |
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 json | |
import girder_client | |
GIRDER_URL = 'https://data.kitware.com/api/v1' | |
GIRDER_API_KEY = 'your_api_key_here' | |
gc = girder_client.GirderClient(apiUrl=GIRDER_URL) | |
gc.authenticate(apiKey=GIRDER_API_KEY) |
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
collection_name = 'labs' | |
labs_collection = None | |
for col in gc.listCollection(): | |
if col['name'] == collection_name: | |
labs_collection = col | |
if not labs_collection: | |
labs_collection = gc.createCollection(collection_name) | |
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 sys | |
import os | |
import subprocess | |
def get_frame_rate(filename): | |
if not os.path.exists(filename): | |
sys.stderr.write("ERROR: filename %r was not found!" % (filename,)) | |
return -1 | |
out = subprocess.check_output(["ffprobe",filename,"-v","0","-select_streams","v","-print_format","flat","-show_entries","stream=r_frame_rate"]) | |
rate = out.decode('utf-8').split('=')[1].strip()[1:-1].split('/') |
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
# Find head of current branch and merge commit of last release | |
# Get merges in between | |
current_branch_head = '8dfeae34' | |
last_release_head = '3550d330' | |
cmd = 'git log --oneline --merges %s ^%s' % (current_branch_head, last_release_head) | |
import subprocess | |
merge_commits = subprocess.check_output(cmd, shell=True).split('\n') | |
# remove all merges of master or origin/master | |
master_merges = ["Merge branch 'master'", "Merge remote-tracking branch 'origin/master'"] |
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
Include(gaussian.config.bms) | |
SetApp(gaussian @GaussianFilter) | |
SetAppOption(gaussian.inputImage ${cfg_inputImage}) | |
SetAppOption(gaussian.outputImage ${cfg_outputImage}) | |
SetAppOption(gaussian.sigma ${cfg_sigma}) | |
CondorPostScript(gaussian ${cfg_exe} ${cfg_condorpostscript} ${cfg_output_directory} ${cfg_taskID}) | |
Run(output ${gaussian}) |
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
Set(cfg_inputImage '/nfsmount/tmp/1/data/input.nrrd') | |
Set(cfg_outputImage '/nfsmount/data/output.nrrd') | |
Set(cfg_sigma '1.0') | |
Set(cfg_exe '/usr/bin/python') | |
Set(cfg_condorpostscript '/nfsmount/scripts/upload_pipeline_step_output.py') | |
Set(cfg_output_directory '/nfsmount/tmp/1') | |
Set(cfg_taskID 1) |
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
Job job0 GaussianFilter.0.dagjob | |
SCRIPT POST job0 /usr/bin/python /nfsmount/scripts/upload_pipeline_step_output.py /nfsmount/tmp/1 1 $JOB $JOBID $RETURN | |
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
Universe = vanilla | |
Output = bmGrid.0.out.txt | |
Error = bmGrid.0.error.txt | |
Log = bmGrid.0.log.txt | |
Notification = NEVER | |
Executable = /nfsmount/bin/GaussianFilter | |
Arguments = "'/nfsmount/data/input.nrrd' '/nfsmount/data/output.nrrd' -s 1.0" | |
Queue 1 |
NewerOlder