Skip to content

Instantly share code, notes, and snippets.

@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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@slarson
slarson / Access OpenWorm Semantic Database via Python (1).ipynb
Created September 24, 2013 23:57
Access OpenWorm Semantic Database via Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / 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": [
{
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 / Synapse positions work 8-22.ipynb
Created August 22, 2013 23:43
iPython Notebook file for work done on synapse positions, 8/22
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"metadata": {
"name": "Synapse Position Algorithm"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@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": [
{
"""
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 ([email protected])
License: Public Domain
@slarson
slarson / celegans-networkX-ipythonnb
Last active September 7, 2017 03:53
Working with the C. Elegans connectome data and the NetworkX library in iPython Notebook
{
"metadata": {
"name": "NetworkX C. Elegans Connectome"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{