This file contains 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 as np | |
from time import * | |
from matplotlib import pyplot as plt | |
from PIL import ImageGrab | |
""" | |
from ImageGrab import grab | |
from matplotlib import animation | |
import cv2 | |
from cv2 import cv | |
""" |
This file contains 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 sys; reload(sys); sys.setdefaultencoding('utf-8') | |
import cv2; import numpy as np; from cv2 import cv; | |
from time import time | |
import matplotlib.pyplot as plt | |
try: from psychopy.core import quit; | |
except: pass | |
""" [1] 데이터 플랏 윈도우 세팅 """ | |
fig = plt.figure(); # 그래프를 그리기 위한 변수 정의 |
This file contains 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 -*- | |
__author__ = 'Hio-been' | |
import pandas.io.data as web | |
from datetime import datetime | |
import matplotlib.pyplot as plt | |
import os, sys; reload(sys); sys.setdefaultencoding('utf-8') | |
import numpy as np | |
#https://gist.github.com/Han-Hiobeen/faba03d188452981c1ed |
This file contains 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
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
""" | |
Vibrotactile Experiment (Version: 2015-04-28) | |
Made by Hio-been Han & Dongmyeong Lee @KIST.jeelab | |
Written in python2.7 with PsychoPy2 (www.psychopy.org by J. Pierce) | |
Revision/Error report -> hiobeen@yonsei.ac.kr | |
""" |
This file contains 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 leap_image, sys, Leap, time, numpy as np | |
from matplotlib import pyplot as plt | |
import cv2 | |
import cv2.cv as cv | |
colormap = 'gist_gray' | |
fig = plt.figure() | |
my_figure = plt.imshow(np.ones([420,420]),vmin=0,vmax=235,cmap=colormap) | |
fig.show(); plt.ion() |
This file contains 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
function [pval, ci, stats] = hb_anovaContrast(dataset, cont_coeffs, alpha) | |
%% INPUT data type | |
% | |
% dataset <- cell([ 1, nCondition ]); % each cell contains column vector | |
% cont_coeffs <- [ 1, -1, 0, 0 ...]; % should be length at nCondition | |
% | |
% written by Hio-Been Han, for GOSHIMTONG 2016-1, YONSEI PSYCHOLOGY | |
% hiobeen@yonsei.ac.kr, 20160420 | |
% | |
if nargin < 3 |
This file contains 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
__author__ = 'Hiobeen_MBPR' | |
#!/usr/bin/python2 | |
""" (0) Import modules """ | |
import facemorpher, os | |
# Get a list of image paths in a folder | |
""" (1) Path & Variable setting """ | |
fd = '/Users/Hiobeen_MBPR/PycharmProjects/python_sketchpad/pics/' | |
filelist_temp = os.listdir(fd) |
This file contains 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
% ---- script structure ---- | |
% %% (0) Set dataset directory and subject list | |
% | |
% % 0-1 : Set subject list | |
% % 0-2 : Set directory | |
% % 0-3 : Set anatomy & functional image to handle easily | |
% % 0-3-1 : ANATOMY unzip & reorient | |
% % 0-3-2 : FUNCTIONAL de-compress (batch TRs into single TR) | |
% | |
% %% (1) Start preprocessing batch loop |
This file contains 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
function success = hb_mat2ARFF(v,arff_filename, relationtxt , titletxt) | |
%success = hb_mat2ARFF(v,arff_filename, relationtxt , titletxt) | |
% *.mat binary to WEKA ARFF | |
% hiobeen@yonsei.ac.kr | |
if nargin < 4 | |
titletxt = 'temp.arff'; | |
end ; if nargin < 3 | |
relationtxt ='hb_variable'; | |
end ; if nargin < 2 |
This file contains 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
function [v,nBad,badIdx] = hb_3Dto1D(mat) | |
% Convert fMRI data of 4D (X,Y,Z+time) into 2D (space,time) | |
sizes = size(mat); | |
v = nan([sizes(1)*sizes(2)*sizes(3),sizes(4)]); | |
% 3D to 1D | |
for idx = 1:size(mat, 4) | |
temp = mat(:,:,:,idx); | |
v(:,idx) = temp(:); |
OlderNewer