This file contains hidden or 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 yarom as Y | |
| import traceback | |
| import sqlite3 | |
| SQLITE_DB_LOC = '../aux_data/celegans.db' | |
| LINEAGE_LIST_LOC = '../aux_data/C. elegans Cell List - WormAtlas.tsv' | |
| MUSCLE_LINEAGE_LIST_LOC = '../aux_data/muscle_names_to_lineage' | |
| WORM = None | |
| NETWORK = None |
This file contains hidden or 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
| { | |
| "metadata": { | |
| "name": "" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or 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 yarom as Y | |
| import rdflib as R | |
| from rdflib.tools.rdf2dot import rdf2dot | |
| from pprint import pprint as PP | |
| from time import time | |
| from object_name_dict import onames as ONAMES | |
| from object_name_dict import pnames as PNAMES | |
| import sys |
This file contains hidden or 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
| from __future__ import print_function | |
| import pprint as PP | |
| class A(object): | |
| def __init__(self): | |
| self.o = dict() | |
| self.p = dict() | |
| self.var = None | |
| self.ident = None | |
| @property |
This file contains hidden or 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 PyOpenWorm as P | |
| if len(sys.argv) > 1: | |
| P.connect(conf={'rdf.source':'default'}) | |
| P.loadData('../WormData.n3') | |
| else: | |
| P.connect('default.conf') | |
| def should_match(y, x): |
This file contains hidden or 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
| diff --git a/PyOpenWorm/neuron.py b/PyOpenWorm/neuron.py | |
| index d693f32..de6a7b4 100644 | |
| --- a/PyOpenWorm/neuron.py | |
| +++ b/PyOpenWorm/neuron.py | |
| @@ -82,7 +82,6 @@ class Connection(P.Property): | |
| int | |
| The number of connections matching the paramters given | |
| """ | |
| - # XXX: Turn this into a COUNT query | |
| options = dict() |
This file contains hidden or 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
| diff --git a/PyOpenWorm/neuron.py b/PyOpenWorm/neuron.py | |
| index d693f32..32b52e8 100644 | |
| --- a/PyOpenWorm/neuron.py | |
| +++ b/PyOpenWorm/neuron.py | |
| @@ -82,7 +82,6 @@ class Connection(P.Property): | |
| int | |
| The number of connections matching the paramters given | |
| """ | |
| - # XXX: Turn this into a COUNT query | |
| options = dict() |
This file contains hidden or 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
| #lang racket | |
| (require pict) | |
| (require racket/draw) | |
| (require racket/fixnum) | |
| (define (slop f l) | |
| (cond | |
| ((null? l) '()) | |
| (#t (cons (f l) (slop f (cdr l)))))) |
This file contains hidden or 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 rdflib as R | |
| from subprocess import call | |
| from time import time | |
| def median(mylist): | |
| # from http://stackoverflow.com/questions/10482339/how-to-find-median | |
| sorts = sorted(mylist) | |
| length = len(sorts) | |
| if not length % 2: | |
| return (sorts[length / 2] + sorts[length / 2 - 1]) / 2.0 |
This file contains hidden or 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 rdflib as R | |
| from random import randint,sample | |
| import subprocess | |
| from subprocess import PIPE | |
| import os | |
| # Load in the graph | |
| g = R.ConjunctiveGraph(identifier=R.URIRef("http://somehost.com/default_graph")) | |
| graph_uri = R.URIRef("http://somehost.com/default_graph") | |
| YOUR_TEST_GRAPH = 'changes_test.nq' | |
| YOUR_TEST_GRAPH_FORMAT = 'nquads' |