한국어 문서 데이타 딥러닝 실습 (feat. doc2vec, mecab-ko) doc2vec 에 대한 강좌 혹은 학습 가능한 글을 찾아보다가 어떤 분의 연재글이 있어 그것을 바탕으로 실습을 진행하는 과정에 대한 내용. 1. 한국어 위키피디아 덤프 다운로드 받기 http://kugancity.tistory.com/entry/한국어-위키피디아-덤프-다운로드-받기 위키피디아 데이터베이스 다운받기 : https:/.. Bite Bits/Data Science 2018.08.01
Python 소스 인코딩 정의하기. Defining the EncodingPython will default to ASCII as standard encoding if no other encoding hints are given. To define a source code encoding, a magic comment must be placed into the source files either as first or second line in the file, such as: # coding=<encoding name> or (using formats recognized by popular editors): #!/usr/bin/python # -*- coding: <encoding name&.. Bite Bits/Python 2018.07.18
debian 9 에서 pip.conf 위치 python3 의 pip3 로 설치된 패키지 목록을 보려니 아래와 같이 문구가 나온다. php.conf 에 format 관련 설정을 하면 경고문구가 안나온다는데, 위치가 어딘지.. $ pip3 list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf unde.. Bite Bits/Debian 9 2018.01.25
debian 9 linux python3-pip 설치 및 python3 패키지 설치 $ which python python3 /usr/bin/python /usr/bin/python3 $ which pip3 pip python 은 2.* 와 3.* 가 설치되어 있는데, pip 는 없다. python3 만 사용할거라 pip3만 설치하기로.. $ sudo aptitude install python3-pip pip3 설치 후, python 패키지 설치 진행. $ pip3 numpy, scipy, matplotlib, jupyter 패키지 설치를 하고 난 후, jupyter-notebook 실행.. Bite Bits/Debian 9 2018.01.09
MS windows 7 에서 pyinstller 사용하기 설치 : pip 이용 > pip install pyinstaller pyinstaller.exe 의 위치를 path 에 추가하면 편함. 실행 파일 만들기 (하나의 실행파일 만들기 옵션 : -F or --onefile) 도움말 보기 옵션 : -h > where pyinstaller C:\Python36-32\Scripts\pyinstaller.exe > pyinstaller -F somefile.py > pyinstaller -h 참고 : http://codememo.tistory.com/14 Bite Bits/Python 2017.11.17
jupyter notebook 설정 변경하기 * 기본 실행 경로 지정 참고 : http://shsong97.blogspot.kr/2016/07/jupyter-notebook.html * matplotlib 에서 한글 깨지는 거 수정 참고 : https://ansuchan.com/matplotlib-with-korean/ * 글꼴 설정 변경하기 참고 : http://pinkwink.kr/1039 Bite Bits/Python 2017.11.10
Raspbian JESSIE 에서 Python 3 용 scipy, ipython, jupyter notebook 등 설치, (머신러닝 관련 패키지) raspbian jessie 에는 python 2.7 과 python 3.4 버전 제공. pip 를 이용해 파이썬 패키지를 설치하고자 할 때, 2.* 용은 pip 를 사용하고, 3.* 용은 pip3 를 사용 numpy 는 pip3 를 이용해 설치 가능하지만, scipy 는 pip3 를 이용해 설치시 계속 에러 발생. File "scipy/linalg/setup.py", line 20, in configuration raise NotFoundError.. Bite Bits/Raspberry Pi 2017.09.19
Raspbian Jessie + Python (2 or 3) + OpenCV 3 설치하기 참고 : http://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/ Raspbian Jessie 설치 관련 글 : http://blog.daum.net/to302/38 Bite Bits/Raspberry Pi 2017.07.07
Python + Selenium + chromedriver 로 Daum 웹툰 다운받기 실행 환경 : * MS Windows 7 (64 bit) * Python 3.5 - 32bit Selenium package 설치 필요 => Dos 창에서 C:\Python35-32\Scripts> pip install selenium * ChromeDriver 2.27 (Download : https://sites.google.com/a/chromium.org/chromedriver/downloads) Supports Chrome v54-56 => ( ChromeDriver 버전에 맞는 Chrome 브라우져가 설치되어 있어야 함. ) 다운받.. Bite Bits/Python 2017.02.14
python 에서 특정 문자열이 포함되지 않은 정규표현식 python 2.7 에서 특정 문자열이 포함되지 않은 표현식 구현.. (python 3.6 에서도 문제 없음) # coding=utf-8 import re s = r"""<span ><abcd한글a12</td> ------ <span ><ab<cdd>d456</td> ------- <span >abcd789</td>""" p = r"""<span >((?:(?!</td>).)*)</td>""" m = re.findall(p, s) print(len(m)) .. Bite Bits/Python 2016.10.25