This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
offset=[0] | |
def log(f): | |
def wrap(*args, **kwds): | |
tab = '\t'*offset[0] | |
print tab, f, args, kwds | |
offset[0] += 1 | |
ret = f(*args, **kwds) | |
print tab, f, ' () -> ', ret | |
offset[0] -= 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
traits_ndarray | |
-------------- | |
I was taking the IPython.utils.traitlets for a spin; | |
the only really useful thing missing was an NDArray | |
which validates on certain shape and type constraints | |
and notifies for interesting kinds of inequalities | |
id(x)==id(y), (x==y).all(), allclose(x, y). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import glob | |
import numpy as np | |
from mne import fiff, event, epochs | |
from iidc import detect, stat, util, cluster | |
#### Data | |
# Load the data, then eliminate all but the sEEG channels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import PIL | |
import tempfile | |
def show_ascii(w=200, h=50, chars=' .\',;"oO%8@#'): | |
from pylab import tight_layout, savefig | |
tight_layout() | |
with tempfile.NamedTemporaryFile(suffix='.png') as f: | |
savefig(f.name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import time | |
import operator as op | |
import numpy as np | |
# equivalent generators | |
def foo(n): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import atexit | |
import tempfile | |
import traceback | |
from urlparse import urlparse, parse_qs | |
import BaseHTTPServer | |
try: | |
from cStringIO import StringIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
from tvb.adapters.uploaders.abcuploader import ABCUploader | |
from tvb.basic.logger.builder import get_logger | |
from tvb.core.adapters.exceptions import LaunchException | |
from tvb.datatypes.time_series import TimeSeries | |
from tvb.adapters.uploaders import foo_data_impl | |
class FooDataImporter(ABCUploader): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install --user cherrypy formencode sqlalchemy sqlalchemy-migrate genshi simplejson cfflib nibabel apscheduler mod_pywebsocket psutil minixsv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [2]: %run new_importer_launcher.py | |
HDF5-DIAG: Error detected in HDF5 (1.8.9) thread 0: | |
#000: ..\..\src\H5F.c line 1534 in H5Fopen(): unable to open file | |
major: File accessability | |
minor: Unable to open file | |
#001: ..\..\src\H5F.c line 1223 in H5F_open(): unable to open file: time = Mon Mar 10 10:01:15 2014 | |
, name = 'C:\Users\duke\TVB\PROJECTS\Default_Project_admin\17\TimeSeries_896585d1-a832-11e3-92b8-8851fb5dbed8.h5', tent_flags = 1 | |
major: File accessability | |
minor: Unable to open file | |
#002: ..\..\src\H5FD.c line 1101 in H5FD_open(): open failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\duke\Desktop\TVB\svn\trunk>python bin\app.py clean | |
C:\Users\duke\Desktop\TVB\svn\trunk>python bin\app.py clean | |
C:\Users\duke\Desktop\TVB\svn\trunk>python bin\app.py start web | |
Found the first free port: 8080. | |
['python', '-m', 'tvb.interfaces.web.run', 'tvb.config', '-profile', 'DEPLOYMENT_PROFILE'] | |
C:\Users\duke\Desktop\TVB\svn\trunk>2014-03-10 10:07:27,315 - INFO - tvb.interfaces.web.mplh5.mplh5_server - MPLH5 back-end server s | |
2014-03-10 10:07:32,203 - ERROR - tvb.datatypes.surfaces_scientific - Failed to import geodesic distance package from externals... |