Skip to content

Instantly share code, notes, and snippets.

Avatar

武宮誠 (Makoto Takemiya) mtakemiya

View GitHub Profile
View HowWeLicenseData.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View averageMatrices.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtakemiya
mtakemiya / violinPlot.py
Created Aug 10, 2012
Violin Plot Example
View violinPlot.py
import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm
shou = np.random.random(100)
chiku = np.log(shou)
bai = np.exp2(shou)
data=[shou, chiku, bai]
ll = ["shou (" + str(np.round(np.mean(shou),decimals=2))+")", "chiku (" + str(np.round(np.mean(chiku),decimals=2))+")", "bai (" + str(np.round(np.mean(bai),decimals=2))+")"]
@mtakemiya
mtakemiya / beanPlot.py
Created Aug 10, 2012
Beanplot Example
View beanPlot.py
import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm
shou = np.random.random(100)
chiku = np.log(shou)
bai = np.exp2(shou)
data=[shou, chiku, bai]
ll = ["shou (" + str(np.round(np.mean(shou),decimals=2))+")", "chiku (" + str(np.round(np.mean(chiku),decimals=2))+")", "bai (" + str(np.round(np.mean(bai),decimals=2))+")"]
@mtakemiya
mtakemiya / UsingNSReader.m
Created May 8, 2012
Reading .nsn File in MatLab
View UsingNSReader.m
[chData, chHeader, fileInfo] = ns_Reader('raw_EMG_signal.nsn');
@mtakemiya
mtakemiya / BrainLinerMatReader.m
Created Apr 26, 2012
Read .mat file in Matlab
View BrainLinerMatReader.m
load('fileName.mat')
% plot data from the first channel, for example,
plot(chData.ch1.value)
@mtakemiya
mtakemiya / BrainLineReader.r
Created Apr 26, 2012 — forked from mitsuaki/gist:2496795
Read .mat file in R
View BrainLineReader.r
library("hdf5")
hdf5::hdf5load("fileName.mat")
# To show the value of chData, for example,
chData$ch1$value[[1]]
@mtakemiya
mtakemiya / BrainLinerMatReader.py
Created Apr 26, 2012
Reading .mat File in Python
View BrainLinerMatReader.py
import h5py
f = h5py.File('fileName.mat')
fileHeader = f['fileInfo']
data = f['chData']
dataHeaders = f['chHeader']
numChannels = len(data)
@mtakemiya
mtakemiya / gist:2157565
Created Mar 22, 2012
Streaming File Using SSHJ
View gist:2157565
/**
* www.brainliner.jp
*
* @author 武宮 誠 「Makoto Takemiya」<br />
* (株)国際電気通信基礎技術研究・脳情報研究所・神経情報学研究室<br/>
* 「ATR - Computational Neuroscience Laboratories, Department of Neuroinformatics」
*
* @version 2012/03/22
*/
public class StreamingInMemoryDestFile extends InMemoryDestFile {
@mtakemiya
mtakemiya / XMLZipTest.java
Created Nov 1, 2011
Unzip and read zipped xml files
View XMLZipTest.java
package jp.atr.dni.zip.test;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.List;
import java.util.zip.ZipFile;
import org.apache.commons.io.IOUtils;
/**