2017년 12월 28일 목요일

T표준점수

학생들 채점을 하다보니 필요한 표준점수..

http://blog.naver.com/PostView.nhn?blogId=oohyes0201&logNo=30031094911
http://archive.is/07qtY

Z-점수: 평균=0, 표준편차=1인 표준점수
        Z = (변수 - 평균) / 표준편차   <높은 점수 - 높은 성적>
        Z'= (평균 - 변수) / 표준편차    <낮은 점수 - 높은 성적>

 T-점수: 평균=50, 표준편차=10인 표준점수
        T = 10Z + 50    <높은 점수 - 높은 성적>
        T'= 10Z' + 50    <낮은 점수 - 높은 성적>

2017년 12월 14일 목요일

Virtualenv 환경 복사하기

On the first virtual env:

pip freeze > requirements.txt

On the second:

pip install -r requirements.txt


https://stackoverflow.com/a/11702289

2017년 11월 13일 월요일

process terminated with status -1 (Codeblocks)

Settings -> Environments

Terminal to launch console programs :
gnome-terminal -t $TITLE -x
인데, gnome-terminal 이 설치 안된 경우도 있음.

$ sudo apt-get install gnome-terminal

참고로 default는 다음과 같음
xterm -T $TITLE -e



2017년 11월 3일 금요일

2017년 10월 18일 수요일

2017년 8월 31일 목요일

when optimizing the cost function J

And so I find machine learning easier to think about when you have one set of tools for optimizing the cost function J, and when you're focusing on authorizing the cost function J. All you care about is finding w and b, so that J(w,b) is as small as possible. You just don't think about anything else other than reducing this.


https://www.coursera.org/lecture/deep-neural-network/other-regularization-methods-Pa53F

2017년 7월 1일 토요일

SimpleHTTPServer

이런게 buit-in으로 있었다니...

$ sudo python -m SimpleHTTPServer 80

2017년 6월 21일 수요일

Jupyter notebook from the remote client


Server (jupyter notebook 구동) :
(server)$ jupyter notebook --no-browser --port=8888


Client :
(client)$ ssh -N -f -L localhost:8888:localhost:8888 user@ipaddress of server(client)$ open -a safari http://localhost:8888


localhost:8888(로칼):localhost:8888(remote)
원격 포트를 바꾸고자할때 사용할수는 있음

예를들면
localhost:8888:localhost:8889
으로 설정하면 원격 8889를 local 8888로 (remote port 8889 to local port 8888)

Cygwin을 사용해도 됨
(client)$ ssh -N -f -L localhost:8888:localhost:8888 user@ipaddress of server

ssh 포트가 포워딩되는 경우
ssh 포트 지정하듯
ssh -N -f -L localhost:8888:localhost:8888 user@ip_address_server -p SSH_PORT_NUMBER


Token authentication 문제가 나오면 server에 접속해서
(server)$ jupyter notebook list 를 하고 보이는 토큰 키를 넣어주면 끝.


jupyter notebook에서 tensorflow 사용하기 (virtualenv)


우선 필요한것들 설치..


$ ipython kernelspec install-self --user
기본 kernel 설치

~/.local/share/jupyter/kernels$ ls
python2

$ cp -r python2 tensorflow

~/.local/share/jupyter/kernels/tensorflow$ vi kernel.json

 아래처럼 수정
~/.local/share/jupyter/kernels/tensorflow$ cat kernel.json
{
 "display_name": "tensorflow",
 "language": "python",
 "argv": [
  "/home/username/tensorflow/bin/python2.7",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ]
}

위의 /home/username/tensorflow/ 는 virtualenv로 tensorflow 설치 위치임

아래와 같이 tensorflow의 interpreter를 사용하도록 만들수 있음.  


2017년 5월 18일 목요일

OpenCV 3.2 in Ubuntu 16.10


OpenCV 3.2 in Ubuntu 16.10 설치기
$ sudo apt-get install build-essential checkinstall cmake git pkg-config yasm libtiff5-dev libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine2-dev libv4l-dev python-dev python-numpy libtbb-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils libopenexr-dev python-tk  libeigen3-dev libx264-dev
$ sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
$ sudo apt-get update
$ sudo apt-get install ffmpeg
$ git clone https://github.com/opencv/opencv.git
$ git clone https://github.com/opencv/opencv_contrib.git
$ cd opencv
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_TBB=ON -D WITH_IPP=OFF -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules  ../
$ make -j8
$ sudo make install

2017년 5월 16일 화요일

GLIBCXX_3.4.22 not found

문제
$ gnome-terminal &
/usr/bin/gnome-terminal.real: /home/xx/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/lib/x86_64-linux-gnu/libmircommon.so.6)

해결
~/anaconda2/lib$ mv -vf libstdc++.so.6 libstdc++.so.6.old
'libstdc++.so.6' -> 'libstdc++.so.6.old'
~/anaconda2/lib$ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./libstdc++.so.6

참조
https://askubuntu.com/a/764572/689555

2017년 5월 12일 금요일

X-11 forwarding error

X-11 forwarding error :
Segmentation fault

일부 gedit, gnome-terminal 등 application에서 발생..

환경 :
Server : Ubuntu 16.10 (Nvidia GTX 1080)

Client : Windows 7 (moba xterm) -->  문제 발생
Client : OS X Maverics 에서는 문제 없었음..

해결 :
/usr/lib/x86_64-linux-gnu$ sudo ln -s /usr/lib/nvidia-375/libGLX_indirect.so.0


참고 : https://askubuntu.com/a/796159

2017년 5월 11일 목요일

Ubuntu Atom editor 설치
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom

2017년 4월 4일 화요일

Goldcrest Wilma

율마. 이렇게 가지런히 두니 예쁘다.



2017년 2월 26일 일요일

thermal referral

When warm thermal stimulators are placed on the ring and index fingers of one hand, and a neutral-temperature stimulator on the middle finger, all three fingers feel warm. This illusion is known as thermal referral (TR).

See http://www.nature.com/articles/srep35286

Cataldo, Antonio, et al. "Thermal referral: evidence for a thermoceptive uniformity illusion without touch." Scientific reports 6 (2016).

2017년 2월 14일 화요일

Closed Form Solution of Absolute Orientation using Unit Quaternions

Horn, Berthold KP. "Closed-form solution of absolute orientation using unit quaternions." JOSA A 4.4 (1987): 629-642.


http://people.csail.mit.edu/bkph/papers/Absolute_Orientation.pdf
See Sim3Solver of ORB-SLAM2 project.