Skip to content

Instantly share code, notes, and snippets.

View lukecampbell's full-sized avatar

Luke Campbell lukecampbell

View GitHub Profile
@lukecampbell
lukecampbell / launch_servers.sh
Created January 30, 2012 19:23
Script to assist with couchdb and rabbitmq
#!/bin/bash
# Author: Luke Campbell < lcampbell@asascience.com >
# Initialize and launch server and broker environements
RABBITMQ=/usr/local/sbin/rabbitmq-server
RABBITMQCTL=/usr/local/sbin/rabbitmqctl
COUCHDB=`which couchdb`
@lukecampbell
lukecampbell / changes.diff
Created January 31, 2012 20:25
Diff in datastore
diff --git a/pyon/datastore/couchdb/couchdb_config.py b/pyon/datastore/couchdb/couchdb_config.py
index 92be764..49b7dd6 100644
--- a/pyon/datastore/couchdb/couchdb_config.py
+++ b/pyon/datastore/couchdb/couchdb_config.py
@@ -2,7 +2,6 @@
__author__ = 'Thomas R. Lennan, Michael Meisinger'
__license__ = 'Apache 2.0'
-
COUCHDB_CONFIGS = {
@lukecampbell
lukecampbell / couchdb_ingestion_example.py
Created January 31, 2012 20:33 — forked from swarbhanu/couchdb_ingestion_example.py
A small script to do couchdb operations in coi-services.
from pyon.datastore.couchdb.couchdb_datastore import CouchDB_DataStore
from interface.objects import BlogPost, BlogAuthor, BlogComment
from pyon.core.exception import BadRequest
import time
db = CouchDB_DataStore()
# Creates a datastore
datastore_name = 'dm_datastore'
try:
@lukecampbell
lukecampbell / blogs.yaml
Created February 1, 2012 00:41
An example of populating and viewing couchdb in python
- title: Cheap cholesterol
content: |
What's the point of being free if you're alone?
author:
name: Luke Campbell
email: luke.s.campbell@gmail.com
updated: 8:13 PM
- title: Water
content: |
Does anyone want water or saltines?
*swp
*pyc
@lukecampbell
lukecampbell / .gitignore
Created February 10, 2012 01:10
Class optimzation
.idea/
*.swp
@lukecampbell
lukecampbell / scidata.py
Created February 23, 2012 19:43
Mangling science data
granule = {
"_id": "1B7D0B452E77DA9AF02C6DA2CD099CBE60AD1D4F",
"_rev": "1-bab10c0be95cd2f771b0413918d668b6",
"identifiables": {
"pressure_bounds": {
"definition": "",
"reference_frame": "",
"unit_of_measure": {
"type_": "UnitReferenceProperty",
"code": "",
@lukecampbell
lukecampbell / stream_definition.dot
Created February 24, 2012 22:07
Stream Definition
digraph definition {
data_stream_id -> data_stream;
data_stream -> encoding_id;
data_stream -> element_type_id;
data_stream -> element_count_id;
encoding_id -> encoding_type;
encoding_id -> sha1;
element_type_id -> data_record_id;
element_count_id -> "record count";
data_record_id -> field_ids;
# patch-lua-5.1.4-3 created 2011-03-16T19:06:31-0300
# apply to a pristine copy of Lua 5.1.4 with:
# wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
# tar zxf lua-5.1.4.tar.gz
# cd lua-5.1.4/src
# wget http://www.lua.org/ftp/patch-lua-5.1.4-3
# patch < patch-lua-5.1.4-3
# use curl -O -R if you don't have wget
--- lcode.c 2007/12/28 15:32:23 2.25.1.3
#!/usr/bin/env python
'''
@author David Stuebe <dstuebe@asascience.com>
To Run:
@todo - fill this in!
'''