Skip to content

Instantly share code, notes, and snippets.

View maedoc's full-sized avatar

marmaduke woodman maedoc

  • now
  • here
View GitHub Profile
@maedoc
maedoc / err
Created March 10, 2014 12:16
errors
C:\Users\duke\dev\tvb\TVB_Distribution\bin>cmd /c tvb_clean
"Done"
C:\Users\duke\dev\tvb\TVB_Distribution\bin>cmd /c tvb_start
Found the first free port: 8080.
"Done"
C:\Users\duke\dev\tvb\TVB_Distribution\bin>Found the first free port: 8080.
C:\Users\duke\dev\tvb\TVB_Distribution\tvb_data\numpy\lib\utils.py:1132: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
import compiler
@maedoc
maedoc / vhdr.py
Created March 13, 2014 10:10
lightweight Brain Vision data reader
import StringIO
import ConfigParser
import numpy as np
class VHDR(object):
"""
Brain Vision file.
@maedoc
maedoc / dwtui.py
Created March 14, 2014 09:43
wavelet decomposition viewer with PyWavelets & PyQtGraph
"""
Simple wavelet decomposition viewer components
"""
import time
import numpy as np
import pywt
import pyqtgraph as pg
@maedoc
maedoc / importer.py
Created April 28, 2014 12:40
Example import adapter for TVB
# auth: Lia Domide
import numpy
from tvb.adapters.uploaders.abcuploader import ABCUploader
from tvb.basic.logger.builder import get_logger
from tvb.datatypes.time_series import TimeSeries
@maedoc
maedoc / circular-cp.ipynb
Created April 29, 2014 11:44
circular-cp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maedoc
maedoc / rww-solutions.ipynb
Created May 17, 2014 08:48
Quick examination of the Reduced Wong Wang model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maedoc
maedoc / tsplot.py
Created May 21, 2014 08:32
time series viewer w/ keyboard & mouse handling
"""
TSPlot
======
Provides class for efficient plotting of large time series data.
.. todo:: per signal scaling
.. todo:: integration with detection
.. todo:: handle showing markers from file (~?)
"""
Find DICOM runs and scans, and print first image (e.g. for launching FreeSurfer)
"""
import re
import os
import sys
path = sys.argv[1]
@maedoc
maedoc / xl_find.py
Created June 26, 2014 11:52
Finding rectangle of data in Excel file with openpyxl
import openpyxl
def xl_find_cell(wb, value, ignore_case=True, test_in=True):
hits = []
value = unicode(value)
if ignore_case:
value = value.lower()
for sheet in wb.worksheets:
for row in sheet.rows:
@maedoc
maedoc / pgcbar.py
Created July 2, 2014 14:08
PyQtGraph colorbar class
import numpy as np
import pyqtgraph as pg
class ColorBar(pg.GraphicsObject):
def __init__(self, cmap, width, height, ticks=None, tick_labels=None, label=None):
pg.GraphicsObject.__init__(self)
# handle args