본문 바로가기

전체 글192

parted Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel? Cancel parted -a optimal /dev/sdb mkpart primary 0% 100% 2018. 3. 16.
python+cython+numpy+openmp+pyximport 샘플 코드 위치:https://gitlab.com/dogbull/cython-examples 2차원의 배열(래스터 자료, 이미지 자료)을 numpy 를 이용하여 계산하려고 할 때, if 구문의 처리가 난감할 때가 있다. 평범한 python 구문으로는 이렇게 처리되는 것을,if a > 10: b = 10 elif a > 5: b = 20 elif a > 0: b = 0 else: b = -1 numpy 에서는 이렇게 처리해야 한다. b = numpy.where( a > 10, 10, numpy.where( a > 5, 20, numpy.where( a > 0, 0, -1 ) ) ) 속도 희생을 감수하고서라도, numpy.vectorize를 사용하면 다음과 같이 쓸 수 있다.def func(x): if x .. 2018. 3. 3.
WSL(Windows Subsystem for Linux) 설치 Linux 용 Windows 하위 시스템 이제 정식으로 Windows 에서 Linux Subsystem 을 사용할 수 있게 되었다. 2016년도 쯤 처음 접했을 때는 실제 운영 용이 아닌 개발자 용으로 등장했었다.(참조) 이제는 정식으로(Windows 10 1709) 지원하게 되었다. Windows 10 Home Edition 에서도 지원하고 있으니, Hyper-V 를 Home Edition 에서 지원하지 않는 불편한 점과는 다르다. WSL을 사용하기 위한 절차는 1. 'Linux 용 Windows 하위 시스템' 활성화. 2. Ubuntu 앱 설치. 두 가지 이다. winvar 명령을 실행하여 현재 윈도우의 버전을 확인한다. 다행히 귀찮지 않게 이미 1709로 업데이트 되어 있다. 1709보다 낮다면 업.. 2018. 2. 28.
QGIS on linux sudo yum groupinstall -y "Development Tools"sudo yum install -y python-devel proj-devel geos-devel sqlite-develsudo pip install pyspatialite --global-option="build_ext" --global-option="-I/usr/include" 2018. 2. 21.