Skip to content

Instantly share code, notes, and snippets.

View blazetopher's full-sized avatar

Christopher Mueller blazetopher

View GitHub Profile
@blazetopher
blazetopher / AS02_synch_script
Created October 21, 2011 14:51
Script for copying AS02* files from the oceansites server
for file in `links -dump http://uop.whoi.edu/oceansites/ooi | grep 'AS02' | grep '\.nc' | awk {'print $3'}`;do wget http://uop.whoi.edu/oceansites/ooi/$file -O $file;done
@blazetopher
blazetopher / ast2_sync_script
Created October 28, 2011 14:58
Script for copying ast2* files from the geo.ucsd.edu FTP server
for file in `links -dump ftp://geo.ucsd.edu/pub/begler/ooi/data/ast2/cdf/ | grep 'ast2' | grep '\.nc' | awk {'print $9'}`;do wget ftp://geo.ucsd.edu/pub/begler/ooi/data/ast2/cdf/$file -O $file;done
@blazetopher
blazetopher / nc2cdl
Created October 31, 2011 18:41
Dump the .cdl for all .nc files in the current directory - Requires that the ncdump utility is installed
for file in `la | grep '\.nc' | awk {'print $9'}`;do ncdump -h $file;done
@blazetopher
blazetopher / gist:3342566
Created August 13, 2012 17:16
matplotlib error
In file included from src/ft2font.cpp:3:
src/ft2font.h:16:22: error: ft2build.h: No such file or directory
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
@blazetopher
blazetopher / gist:3371448
Created August 16, 2012 16:24
smoke error
This file has been truncated, but you can view the full file.
(clean27)DEV014MAC001{12:48}::~/Development/OOI/Dev/code/coi-services (master) cmueller: bin/nosetests ion.services.ans.test.test_workflow:TestWorkflowManagementIntegration.test_transform_workflow
pyon: sys_name changed from 'None' to 'ion_test_8f367b'
E/Users/cmueller/Development/OOI/Dev/code/coi-services/eggs/pika-0.9.5-py2.7.egg/pika/connection.py:371: UserWarning: PyonSelectConnection.Close invoked while closing or closed
self.__class__.__name__)
======================================================================
ERROR: test_transform_workflow (ion.services.ans.test.test_workflow.TestWorkflowManagementIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/cmueller/Development/OOI/Dev/code/coi-services/ion/services/ans/test/test_workflow.py", line 187, in test_transform_workflow
@blazetopher
blazetopher / gist:3531725
Created August 30, 2012 16:01
np encoding type error
ERROR: test_dm_end_2_end (ion.services.dm.test.test_dm_end_2_end.TestDMEnd2End)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/cmueller/Development/OOI/Dev/code/coi-services/ion/services/dm/test/test_dm_end_2_end.py", line 249, in test_dm_end_2_end
dataset_id = self.create_dataset()
File "/Users/cmueller/Development/OOI/Dev/code/coi-services/ion/services/dm/test/test_dm_end_2_end.py", line 167, in create_dataset
dataset_id = self.dataset_management.create_dataset('test_dataset', parameter_dict=pdict, spatial_domain=sdom, temporal_domain=tdom)
File "/Users/cmueller/Development/OOI/Dev/code/coi-services/interface/services/dm/idataset_management_service.py", line 267, in create_dataset
return self.request(IonObject('dataset_management_create_dataset_in', **{'name': name,'datastore_name': datastore_name,'view_name': view_name,'stream_id': stream_id,'parameter_dict': parameter_dict or None,'spatial_domain': spatial_domain or
@blazetopher
blazetopher / 1. It starts off like this...
Created October 5, 2012 18:36
Functional persistence!!
><> from coverage_model.test.examples import *
><> cov=oneparamcov(False,False)
><> cov.insert_timesteps(100)
><> cov.num_timesteps
--> 110
@blazetopher
blazetopher / examples.py
Created November 14, 2012 14:46
coverage value insertion benchmark
def benchmark_value_sets(num_params=10, num_insertions=100):
# Instantiate a ParameterDictionary
pdict = ParameterDictionary()
# Create a set of ParameterContext objects to define the parameters in the coverage, add each to the ParameterDictionary
t_ctxt = ParameterContext('time', param_type=QuantityType(value_encoding=np.dtype('int64')))
t_ctxt.axis = AxisTypeEnum.TIME
t_ctxt.uom = 'seconds since 01-01-1970'
pdict.add_context(t_ctxt)
><> from scratch.brick_helpers import *
bh=BrickHelp()
val_arr = np.arange(100).reshape(10,10)
#sl = (slice(2,7),slice(3,8))
sl = (slice(1,None),slice(4,8))
bh.put_values_to_bricks(sl, val_arr[sl])
><> bh=BrickHelp()
@blazetopher
blazetopher / memory_trials.py
Created November 29, 2012 20:01
memory_trials
#!/usr/bin/env python
from coverage_model import *
import numpy as np
import time
import objgraph
import gevent
from clint.textui import progress
from guppy import hpy
import time