Skip to content

Instantly share code, notes, and snippets.

View mattearnshaw's full-sized avatar

Matt Earnshaw mattearnshaw

View GitHub Profile
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<neuroml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.neuroml.org/schema/neuroml2" id="PINGNet_10" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta5.xsd">
<notes>
This NeuroML 2 file was generated by OpenCortex v0.1.6 using:
libNeuroML v0.2.34
pyNeuroML v0.3.1
</notes>
<property tag="Network seed" value="12345"/>
diff --git a/generator/java.stoneg.py b/generator/java.stoneg.py
index dda20b58..38df2fe8 100644
--- a/generator/java.stoneg.py
+++ b/generator/java.stoneg.py
@@ -49,8 +49,8 @@ from stone.data_type import (
Void,
)
-class StoneType:
- __metaclass__ = abc.ABCMeta
create3DCylinderFromNode: function (cylNode, material, minRadius, maxRadius) {
var bottomBasePos = new THREE.Vector3(cylNode.position.x, cylNode.position.y, cylNode.position.z);
var topBasePos = new THREE.Vector3(cylNode.distal.x, cylNode.distal.y, cylNode.distal.z);
var topRadius = cylNode.topRadius;
var bottomRadius = cylNode.bottomRadius;
var axis = new THREE.Vector3();
axis.subVectors(topBasePos, bottomBasePos);
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<neuroml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.neuroml.org/schema/neuroml2" id="NeuroML_2_loaded_via_LEMS_by_Geppetto" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta5.xsd">
<ionChannel species="non_specific" type="ionChannelHH" conductance="10pS" id="ih_rod">
<notes>Single ion channel description, adapted from Liu XD, Kourennyi DE (2004) Effects of tetraethylammonium on Kx channels and simulated light response in rod photoreceptors. Ann Biomed Eng 32:1428-42</notes>
<gateHHrates instances="1" id="n">
<forwardRate type="HHExpRate" rate="1per_s" midpoint="-82mV" scale="-10.66mV"/>
<reverseRate type="HHExpRate" rate="1per_s" midpoint="-82mV" scale="10.66mV"/>
</gateHHrates>
</ionChannel>
<ionChannel species="k" type="ionChannelHH" conductance="10pS" id="kv_rod
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<neuroml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.neuroml.org/schema/neuroml2" id="NeuroML_2_loaded_via_LEMS_by_Geppetto" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.githubusercontent.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta5.xsd">
<ionChannelHH type="ionChannelPassive" conductance="10pS" id="passiveChan">
<notes>Single ion channel in NeuroML2 format: passive channel providing a leak conductance </notes>
</ionChannelHH>
<ionChannelHH species="na" conductance="10pS" id="naChan">
<notes>Single ion channel in NeuroML2 format: standard Sodium channel from the Hodgkin Huxley model</notes>
<gateHHrates instances="3" id="m">
<forwardRate type="HHExpLinearRate" rate="1per_ms" midpoint="-40mV" scale="10mV"/>
<reverseRate type="HHExpRate" rate="4per_ms" midpoint="-65mV" scale="-18mV"/>
(ns babbitt.core
(:require [clojure.math.combinatorics :as combo]))
; insert n at index i in x
; (insert 5 1 [2]) => [2 5]
(defn insert [n i x]
(let [[before after] (split-at i x)]
(vec (concat before [n] after))))
; insert ns at indices js in x