2015년 2월 6일 금요일

python 한글 입력

python 한글 입력

아래 utf-8 설정 입력

# -*- coding: utf-8 -*-


2014년 12월 28일 일요일

TOEIC Vocabulary Day 1


  1. antibiotic 항생제
    1. Doctors are concerned about the overuse of antibiotics.
  2. asthma 천식
    1. The child was suffering from asthma.
  3. checkup 건강진단
    1. Yearly general checkups are required for public school students.
  4. chronic 만성의 
    1. The patient exhibited signs of chronic liver desease.
  5. combination 결합, 연합
    1. Vitamin supplements are used in combination with other preventative measures.
    2. in combination with ~와 더불어, ~와 결합하여
  6. comprehensive 종합적인, 포괄적인
    1. a comprehensive physical examination 
  7. conscious 알고 있는, 자각하고 있는
    1. People taking medication need to be conscious of the risks.
    2. be conscious of ~을 알고 있다.
  8. coverage 보상범위, 보도, 취재범위
    1. Employees may extend their insurance coverage to spouses.
    2. media coverage of the epidemic
  9. deprivation 박탈, 상실
    1. Sleep deprivation weakens the immune system.
    2. deprive A of B A에게서 B를 빼앗다
  10. deter 단념시키다, 막다
    1. Public health advertising may deter unhealthy behaviors. 
  11. diagnosis 진단
    1. The doctor's diagnosis turned out to be wrong.
  12. dose 1회 복용량
    1. For acute pain, the recommended dose is 30 mg once daily.
  13. duration 지속 기간, 지속 
    1. The duration of the illness may vary from individual to individual.
  14. eliminate 제거하다
    1. The kidneys eliminate wastes from the body.
  15. eradicate 근절하다, 뿌리뽑다
    1. The World Health Organization resolved to eradicate the disease.
  16. exposure 노출
    1. Prolonged exposure to sunlight can cause skin cancer.
  17. fatigue 피로
    1. Too much stress can lead to fatigue
  18. forbid 금지하다
    1. Absolute Pharmaceuticals Inc. forbids its employees to smoke.
  19. health 건강, 번영, 안녕
    1. Brushing after every meal maintains oral health.
    2. It's difficult to forecast the future health of the insurance industry.
  20. immune 면역의
    1. A healthy die strengthens the immune system.
  21. induce 유발하다.
    1. Smoking induces health risks such as lung cancer.
  22. inhalation 흡입
    1. Several employees suffered from inhalation of toxic fumes 
  23. insurance 보험
    1. Employees are eligible for dental insurance coverage.
  24. join ~에 가입하다
    1. Employees are encouraged to join the health club.
  25. medicinal 약용의, 치유력이 있는
    1. a medicinal herb
  26. nutrition 영양
    1. Balanced nutrition is essential for growing children.
  27. periodically 주기적으로
    1. Free health checkups for all staff members are offered periodically.
  28. pharmaceutical 제약의, 약학의
    1. The pharmaceutical company markets children's dietary supplements.
  29. physician 내과 의사 
    1. Mr. Bently consulted a physician about his high blood pressure.
  30. premium 보험료
    1. Monthly premiums will rise next year.
  31. prescribe 처방하다
    1. The doctor prescribed a remedy for the cold.
  32. prevention 예방
    1. Proper nutrition is necessary for the prevention of illness.
  33. prolonged 장기의, 오래 끄는
    1. a prolonged stay in hospital
  34. reaction 반응
    1. Some foods can cause allergic reactions in children.
  35. recommed 추천하다
    1. The counselor recommended that Phillip stop drinking
  36. recovery 쾌유, 회복
    1. Time is needed to make a complete recovery.
  37. relieve 완화시키다
    1. AlphaCough effectively relieves the symptoms of winter colds.
  38. remedy 치료법, 의약
    1. a good remedy for indigestion
  39. robust 튼튼한, 건강한
    1. The 80 year-old still enjoys robust health.
  40. susceptible ~에 감염되기 쉬운
    1. A weakened immune system makes one susceptible to colds.
  41. symptom 증상
    1. The lawyer exhibited symptoms of a stress disorder


2014년 12월 19일 금요일

NTP 설정 및 NTP 상태 확인


NTP 상태 확인 설명
ROOT# ntpq -p 133.100.9.2
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
*GPS_NMEA(1)     .GPS.            0 l  184   16  377     0.00    0.002    0.03
+clock.tl.fukuok .GPS.            1 u  218   64  376     3.11   -0.070    0.53
+helio.tl.fukuok .GPS.            1 u  229   64  377     3.60    0.068    0.08
 geo.gen.u-ryuky clock.nc.fukuok  2 u  736 1024  376    52.40    7.090   19.15
-ns.hiroshima-u. .GPS.            1 u  213   64  376    17.23   -0.724    2.14
-onikobe.gw.toho .GPS.            1 u  199  512  377    57.82   -1.658    5.16
-izumi.gw.tohoku .GPS.            1 u  359  128  264    60.33   -2.292    3.01
 LOCAL(0)        LOCAL(0)         3 l  196   64  377     0.00    0.000   10.01
xtime.nist.gov   .ACTS.           1 u  336  256  377   189.33   -9.976    2.76

[첫번째 column]
 ' '(reject)     거리가 멀어서 사용되지 않는 서버
 'x'(falsetick) falseticker 검사결과 사용되지 않는 서버
 '.'(excess)     참조서버가 많아서 사용되지 않는 서버
 '-'(outlyer)    clustering 검사결과 사용되지 않는 서버
 '+'(candidat)   접속 테스트를 합격하여 언제든지 참조가 가능한 서버
 '#'(selected)   동기 거리가 멀지만 참조가 가능한 서버
 '*'(sys.peer)   동기중인 서버
 'o'(pps.peer)   동기중인 서버(동기는 PPS 신호로 부터 간접적으로 행해짐

[두번째 column 이후 라벨의 의미]
 remote          Remote Server 의 Host명
 refid           참조ID(명확하지 않을 때는 0.0.0.0 으로 표시됨)
 st              stratum 번호,서버가 어떤 Layer 인지를 표시함.
 t               단층(Layer)의 타입 (l:local,u:unicast,m:multicast,b:broadcast)
 when            마지막으로 Packet 을 수신한 이후 경과한 시간 (단위:초)
 poll            Polling 간격 (단위:초)
 reach           도달가능한 register 를 8 진수로 표현한 값
 delay           Polling insterval 지연예상시간 (단위:밀리초)
 offset          단층(Layer)의 offset (단위:밀리초)
 disp            단층(Layer)의 분산 (단위:밀리초)

추가 NTP에서의 Stratum Layer는 reference colock으로부터의 거리를 말한다. 
stratum-0는 GPS 이고 stratum-1은 GPS와 연결된 서버(직결링크) stratum-2는 stratum-1과 네트워크를 통해 연결된 서버이다. stratum layer가 작을수록 reference clock과의 거리가 짧기 때문에 더 정확한 clock을 가진다.

2014년 9월 30일 화요일

pyhton easyInstall, pip, ClientCookie 설치

python용 pkg 관리
easyInstall : https://pypi.python.org/pypi/setuptools#downloads

PIP 설치
easy_install pip

BeautifulSoup 설치
pip install beautifulsoup4

ClientCookie 설치
http://wwwsearch.sourceforge.net/old/ClientCookie/

pip install http://wwwsearch.sourceforge.net/ClientCookie/src/ClientCookie-1.3.0.tar.gz

아마존 EC2 서버 Pyhton 2.7로 업그레이드

아마존 EC2 서버의 레드햇 rhel 6.0 버전을 세팅 시

기본 설치된 python 버전은 2.6 버전이다.

최근에는 python 2.7 버전을 대부분 사용하기 때문에 호환성을 위해 업그레이드가 필요하다.

기본적으로 python 2.7.6 버전 다운로드 설치 후 python 링크를 새로 설정한다.
이후 yum이 python으로 구현되어 있기 때문에 이와 관련된 설정값도 수정해야 한다.

cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local
make && make altinstall

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo /usr/local/bin/python2.7 ez_setup.py

sudo /usr/local/bin/easy_install-2.7 pip

sudo /usr/local/bin/easy_install-2.7 requests
sudo /usr/local/bin/easy_install-2.7 psutil

sudo /usr/local/bin/easy_install-2.7 paramiko

cd /usr/local/bin
mv pip pip2.6
mv easy_install easy_install-2.6
ln -s pip2.7 pip

ln -s easy_install-2.7 easy_install

2014년 9월 17일 수요일

Sencha Touch Build, 센타터치 배포 커맨드

Sencha Touch Build, 센타터치 배포 커맨드

Sencha Touch로 개발한 웹앱을 배포하려면 Sencha CMD 를 사용하면 된다.

프로젝트 내 폴더로 들어가
sencha app build  명령어를 실행하면 된다.


문제는 센차 build 중 아래와 같은 Error가 발생하며 진행이 안 되는 경우가 있다.
/root/bin/Sencha/Cmd/5.0.1.231/extensions/sencha-compass/gems/bin/compass:9:in `require': no such file to load -- rubygems (LoadError)
        from /root/bin/Sencha/Cmd/5.0.1.231/extensions/sencha-compass/gems/bin/compass:9


compass, sass가 정상 실행되지 않아 발생한 문제로, 

ruby, rubygem을 설치하면 된다. 

yum install ruby
yum install rubygems

정상적으로 설치된 이후에는  아래 경로에 결과물이 build 된다.
/프로젝트 폴더/build/production/<Project Name>

2014년 9월 9일 화요일

센차 터치 Sencha Touch 가이드 번역본 문서

센차 터치 Sencha Touch 가이드 번역본 문서

초기에는 이 문서만 정독해도 어느정도 개념을 잡을 수 있을듯하다.

https://play.google.com/books/reader?id=2HKhQzcCklQC&printsec=frontcover&output=reader&authuser=0&hl=ko&pg=GBS.PT19