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 sqlite3 | |
import time | |
import sys | |
from os import environ | |
try: | |
sys.setappdefaultencoding('utf-8') | |
except: | |
sys = reload(sys) | |
sys.setdefaultencoding('utf-8') |
This file has been truncated, but you can view the full file.
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
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta2.xsd" id="CElegansConnectome"> | |
<network id="CElegansConnectome"> | |
<population id="PVPL" component="PVPL" size="1"> | |
<instance id="0"> | |
<location y="0." x="0." z="0."/> | |
</instance> | |
</population> | |
<population id="AVFR" component="AVFR" size="1"> | |
<instance id="0"> | |
<location y="0." x="0." z="0."/> |
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 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' |
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 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 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 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 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 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 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 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 |
OlderNewer