Skip to content

Instantly share code, notes, and snippets.

View rysk-t's full-sized avatar

Ryosuke Takeuchi rysk-t

  • Nagoya Univ.
  • Japan
View GitHub Profile
@rysk-t
rysk-t / calcium_ezPlot.m
Last active June 13, 2017 11:44
MATLAB script: first step of calcium imaging data
%% 読み込みファイル (uigetfileを使うと良い)
clear all;
imname = 'Registered_03.tif';
%% Tiff header情報の の読み取り
tObj = Tiff(imname, 'r');
tags = tObj.getTagNames;
info = imfinfo(imname);
tic
function [p, r, z, stat] = ranksum_eff(A, B)
% [p, r, z, stat] = ranskum_eff(A, B)
%
%
% Ryosuke Takeuchi 2017
%
% 参考: http://www.mizumot.com/files/EffectSize_KELES31.pdf
[p, ~, stat] = ranksum(A, B);
z = stat.zval;
@rysk-t
rysk-t / noiseCheck.m
Created January 13, 2017 07:02
intrinsig のノイズcheck
imroot = '\\NSQNAP2\Public\Intrinsic\Data\160523-182344';
files = dir([imroot filesep '*.tiff']);
% collect filename idx
for i = 1:length(files)
filename = files(i).name;
idx(i) = str2num(filename(1:end-5));
end
[hoge, idx] = sort(idx);
files = files(idx);
@rysk-t
rysk-t / demo_drtoolbox.m
Last active November 14, 2016 02:58
Example codes of drtoolbox (https://lvdmaaten.github.io/drtoolbox/)
% DR-sample codes
clear all; close all
load fisheriris
method{1} = 'PCA';
method{2} = 'MDS';
method{3} = 'FactorAnalysis';
method{4} = 'tSNE';
for i = 1:length(method)
@rysk-t
rysk-t / file0.txt
Last active October 14, 2016 13:10
MatlabでlibSVM (&libnlinear) を導入,fisher data に適用する ref: http://qiita.com/rysk-t/items/a0281ed80db999575dd3
>> addpath(genpath('path¥to¥libsvm'))
% % SVMtest
load('fisheriris.mat')
labels = unique(species);
specIdx = zeros(150,1);
for i = 1:length(labels)
specIdx(find(strcmp(species, labels{i})))=i;
end
test1 = randperm(150);
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import sys
import os
import glob
import time
import matplotlib.pyplot as plt
import numpy as np
root = 'F:\Datas\intrinsic\160515-165123';
root = '\\nsqnap2\Public\Intrinsic\Data\160523-185221'
imgfiles = dir([root filesep '*.tiff']);
clear frames; close all;
% frames = uint16(zeros([1024 1280 length(imgfiles)]));
for i = 1:length(imgfiles)
idx = num2str(imgfiles(i).name(1:end-5));
buf = imread([root filesep imgfiles(i).name]);
frames(:,:,str2num(imgfiles(i).name(1:end-5))) = buf;
# coding: utf-8
import glob
import sys
import os
from collections import OrderedDict
import caffe
import time
import pylab
import matplotlib.image as mimg
import matplotlib.pyplot
set dirname to (getTimeStamp() as string) -- 時間で
do shell script "mkdir ~/Data/scrs/" & dirname & "/" -- ディレクトリ作成
repeat with p from 1 to 110 -- ページ数
set pstr to p
set pstr to text -3 thru -1 of ("00" & pstr)
set tgt_file to "ssw" & "scr" & "_" & (pstr) & ".jpg"
-- 出力するファイル名を「sswyyyymmddhhmmss.jpg」に。
tell application "Kindle 2" -- 通常 "Kindle" でよい
activate -- ウインドウフォーカスを移す