Skip to content

Instantly share code, notes, and snippets.

View patham9's full-sized avatar

Patrick Hammer patham9

View GitHub Profile
anonymous
anonymous / gist:b4185913e505f1eb21ed07eb3fb66229
Created October 10, 2017 18:33
compound op with args
*decisionthreshold=0.86
<(&/,(^pick,{SELF},$1),(^pick,{SELF},$2)) <|> <(*,{myNewOp},$1,$2) --> [called]>>.
<(*,{myNewOp},a,b) --> [called]>! :|:
Result:
IN SetDecisionThreshold(0.86)
IN <(&/,(^pick,{SELF},$1),(^pick,{SELF},$2)) <|> <(*,{myNewOp},$1,$2) --> [called]>>. %1.00;0.90%
IN <(*,{myNewOp},a,b) --> [called]>! :-4: %1.00;0.90%
EXE $0.15;0.02;0.86$ ^pick([{SELF}, a])=null
anonymous
anonymous / gist:3a49decb94f59a0a2878239bdc51d7f1
Created October 10, 2017 18:10
compoundop1
*decisionthreshold=0.86
<(&/,(^pick,{SELF},a),(^pick,{SELF},b)) <|> <{myNewOp} --> [called]>>.
<{myNewOp} --> [called]>! :|:
Result:
IN SetDecisionThreshold(0.86)
IN <(&/,(^pick,{SELF},a),(^pick,{SELF},b)) <|> <{myNewOp} --> [called]>>. %1.00;0.90%
IN <{myNewOp} --> [called]>! :-4: %1.00;0.90%
EXE $0.24;0.04;0.86$ ^pick([{SELF}, a])=null
@bbengfort
bbengfort / nx2gt.py
Created June 26, 2016 12:01
Convert a networkx to graph-tool graph
import networkx as nx
import graph_tool as gt
def get_prop_type(value, key=None):
"""
Performs typing and value conversion for the graph_tool PropertyMap class.
If a key is provided, it also ensures the key is in a format that can be