Skip to content

Instantly share code, notes, and snippets.

@dleehr
dleehr / README.md
Last active August 12, 2019 15:05
sleep-echo-workflow

sleep-echo-workflow

This directory contains a tool and workflow to stress test calrissian managing lots of parallel tasks in kubernetes

The workflow takes 3 inputs:

  • loops: int, a number of loops to run inside each step
  • delay: float, a number of seconds to sleep in between each loop iteration
  • messages: string[], an array of messages to scatter to individual steps
@dleehr
dleehr / attach.sh
Created August 8, 2019 18:36
Script for one-off pod to mount a PVC
#!/bin/bash
set -eo pipefail
NAMESPACE=$1
PVC=$2
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <namespace> <pvc-name>"
exit 1
#!/usr/bin/env python
from bespin.api import BespinClientErrorException
from bespin.commands import Commands
def make_zipped_version_dicts(repo, tag, versions):
return [make_zipped_version_dict(repo, tag, version) for version in versions]
{
"cores_allowed": 32.0,
"ram_mb_allowed": 64000.0,
"children": [
{
"cpus": 1.0,
"ram_megabytes": 4194.304,
"start_time": "2019-03-04T21:38:45+00:00",
"finish_time": "2019-03-04T21:38:52+00:00",
"elapsed_hours": 0.0019444444444444444,
{
"$graph": [
{
"class": "Workflow",
"inputs": [
{
"type": [
"null",
{
"type": "array",
@dleehr
dleehr / exomeseq-gatk4-preprocessing.cwl
Last active November 21, 2018 14:50
Updates with fixes for intervals and after meeting with GAAB
{
"$graph": [
{
"class": "Workflow",
"inputs": [
{
"type": [
"null",
{
"type": "array",
{
"$graph": [
{
"class": "Workflow",
"inputs": [
{
"type": [
"null",
{
"type": "array",
from cwlgen.import_cwl import parse_cwl
from cwlgen import File, Workflow
from cwlgen.workflow import InputParameter
# Files in https://github.com/Duke-GCB/bespin-cwl/tree/qiime2-workflow
mkdir_tool = parse_cwl('EMPSingleEndSequences-directory.cwl')
import_tool = parse_cwl('tools-import.cwl')
w = Workflow()
#!/usr/bin/env python
"""
Displays the file size of a DDS Project by ID
Loads config/credentials from ~/.ddsclient
Usage: python3 get_project_size.py c8f46e4d-635a-441a-b309-375818f1f7c1
"""
import sys
from ddsc.config import create_config
from ddsc.core.remotestore import RemoteStore
@dleehr
dleehr / lookup_curl.sh
Created November 17, 2017 18:41
crossref CN lookups
#!/bin/bash
curl -SLH "Accept: text/bibliography; style=apa" http://dx.doi.org/$1