Skip to content

Instantly share code, notes, and snippets.

"""
worm2nx.py
Simple script for turning connectome tables into NetworkX graphs.
Note that the tables were extracted manually from the connectivity spreadsheet
of the c. elegans and should accompany this script.
Author: Pedro Tabacof (tabacof at gmail dot com)
Stephen Larson (stephen@openworm.org)
License: Public Domain
@slarson
slarson / gist:5820077
Last active December 18, 2015 17:39
Loading WormBehavior database file in Python without Matlab (iPython Notebook)
{
"metadata": {
"name": "Playing with WormBehavior Database"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "Synapse Position Algorithm"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@slarson
slarson / Synapse positions work 8-22.ipynb
Created August 22, 2013 23:43
iPython Notebook file for work done on synapse positions, 8/22
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function trelloFetch(url) {
var key = "your_trello_API_key",
api_endpoint = "https://api.trello.com/1",
member_token = "your_member_TOKEN";
var completeUrl = api_endpoint + url + "?key=" + key + "&token=" + member_token;
var jsonData = UrlFetchApp.fetch(completeUrl);
var object = Utilities.jsonParse(jsonData.getContentText());
@slarson
slarson / gist:6599881
Created September 17, 2013 20:09
iPython Notebook that walks through examples of working with RDFLib and NeuroLex.org
{
"metadata": {
"name": "Getting started with Python - RDF - NeuroLex"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@slarson
slarson / gist:6679778
Created September 24, 2013 02:50
Google App Script for calculating free time across multiple Google calendars. Writes results to a Google spreadsheet so they can be plotted.
function startCounting() {
// create 5min Trigger
ScriptApp.newTrigger("countEvents").timeBased().everyMinutes(5).create();
// create end Trigger
//var end_date_trigger = new Date(end_date_array[2], end_date_array[1] - 1, end_date_array[0], 10);
//ScriptApp.newTrigger("stopCounting").timeBased().at(end_date_trigger).create();
}
/* remove all triggers when it comes to the end of a Sprint */
@slarson
slarson / Access OpenWorm Semantic Database via Python (1).ipynb
Created September 24, 2013 23:57
Access OpenWorm Semantic Database via Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slarson
slarson / Creating RDF from OpenWorm Semantic Database via Python.ipynb
Last active May 4, 2016 16:04
iPython notebook example showing how to create simple RDF from the OpenWorm Semantic Database via Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slarson
slarson / test
Created October 3, 2013 20:28
Testing gist extension
test test