Skip to content

Instantly share code, notes, and snippets.

View StarvingMarvin's full-sized avatar

Luka Stojanovic StarvingMarvin

View GitHub Profile
COUPLING_TYPES = '1JHC', '1JHN', '2JHC', '2JHH', '2JHN', '3JHC', '3JHH', '3JHN
def get_preds(g):
labeled = g.edata['coupling_type'] != -1
preds = g.edata['emb'][labeled].view(-1)
truth = g.edata['coupling'][labeled]
types = g.edata['coupling_type'][labeled]
return preds, truth, types
from functools import partial
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
cwlVersion: v1.0
class: CommandLineTool
baseCommand: echo
inputs:
in:
type: string[]
inputBinding: {}
outputs:
out:
type: stdout
@StarvingMarvin
StarvingMarvin / cwl-cli.md
Created September 29, 2014 15:26
Alternative cli generation proposal for CWL

Current format:

adapter:
    baseCmd: []
    ...

Proposal:

@StarvingMarvin
StarvingMarvin / cwl-inputs.md
Created September 29, 2014 10:44
Alternative inputs format for common workflow language

Current format:

inputs:
    type: object
    required: [reference, reads]
    properties:
      reference:
        type: file
        adapter:
# CLOSURES IN RUBY Paul Cantrell http://innig.net
# Email: username "cantrell", domain name "pobox.com"
# I recommend executing this file, then reading it alongside its output.
#
# Alteratively, you can give yourself a sort of Ruby test by deleting all the comments,
# then trying to guess the output of the code!
# A closure is a block of code which meets three criteria:
#