본문 바로가기

Python49

[IPython] 참고 자료 [IPython] 참고 자료 웹 자료 IPython 웹사이트(http://ipython.org) IPython 문서, 예제, 튜토리얼 및 다양한 다른 자료의 랑크를 제공하는 IPython 웹사이트 nbviewer 웹사이트(http://nbviewer.jupyter.org) 인터넷상에서 사용 가능한 모든 IPython 노트북을 정적으로 렌더링해서 보여준다. 첫 페이지에는 다른 사람들이 IPython으로 어떤 일을 하는지 볼 수 있는 몇가지 예제 노트북이 있다. 흥미로운 IPython 노트북 갤러리(http://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks) nbviewer에서 제공하는 사이트로, 여기서 제공하는 노트북 .. 2018. 1. 10.
[IPYTHON] 코드 프로파일링 및 시간 측정 [IPYTHON] 코드 프로파일링 및 시간 측정 %time 단일 문장의 실행 시간을 측정 %timeit 단일 문장을 반복 실행해 더 정확하게 실행 시간을 측정 %prun 프로파일러로 코드를 실행함 %lprun 라인 단위 프로파일러(line-by-line profiler)로 코드를 실행 %memit 단일 문장의 메모리 사용량을 츠겅 %mprun 라인 단위 메모리 프로파일러(line-by-line memory profiler)로 코드를 실행 %prun, %lprun, %memit, %mprun 는 IPython에 포함돼 있지 않기 때문에 line_profiler와 memory_profiler 확장 모듈을 설치해야 한다. 2018. 1. 9.
MAC에서 jupyter config 설정 MAC에서 jupyter config 설정 jupyter 설치 jupyter가 설치되어 있지 않다면, 설치를 진행합니다. ➜ ~ pip install jupyter Collecting jupyter Downloading jupyter-1.0.0-py2.py3-none-any.whl Collecting nbconvert (from jupyter) Downloading nbconvert-5.3.1-py2.py3-none-any.whl (387kB) 100% |████████████████████████████████| 389kB 1.5MB/s ... ... ... config 파일 생성 config 파일을 생성합니다. ➜ ~ jupyter notebook --generate-config Writing def.. 2017. 12. 31.
Keras, Tensorflow-gpu 설치 Keras, Tensorflow-gpu 설치 keras 설치 명령 프롬프트를 관리자 모드로 실행합니다. 관리자 모드가 아닐경우 액세스 거부가 발생할 수 있습니다. PermissionError: [WinError 5] 액세스가 거부되었습니다: 'c:\programdata\anaconda3.6_64bit\lib\site-packages\html5lib-0.999-py3.6.egg-info' keras, tensorflow-gpu 를 설치합니다. pip install keras tensorflow-gpu CUDA가 설치되어 있지 않으면 에러가 발생합니다. ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be ins.. 2017. 12. 25.
Jupyter 외부 접속 설정 Jupyter 외부 접속 설정 jupyter 설치 pip 실행 환경을 구성합니다. (Anaconda, MiniConda, Python 중 하나를 설치합니다.) 이 후 jupyter 를 설치합니다. pip install jupyter 설정 파일 생성 jupyter notebook --generate-config 설정 파일 수정 C:\Users\[사용자계정]\.jupyter 디렉토리 안의 jupyter_notebook_config.py 파일을 수정합니다. 원하는 항목만 수정하면 됩니다. 외부 접속 허용 # Takes precedence over allow_origin_pat. c.NotebookApp.allow_origin = '*' 작업 경로 설정 ## The directory to use .. 2017. 12. 22.
[OpenCV-Python Tutorials] 14. 형태론적 변환 [OpenCV-Python Tutorials] 14. 형태론적 변환 목표 이 장에서는 Erosion, Dilation, Opening, Closing과 같은 다른 형태학적인 작동을 배울 것입니다. cv2.erode(), cv2.dilate(), cv2.morphologyEx() 등과 같은 다른 함수를 보게 될 것입니다. 이론 형태학적 변형은 이미지 모양을 기반으로 한 몇 가지 간단한 작업입니다. 일반적으로 이진 이미지에서 수행됩니다. 그것은 두 개의 입력이 필요합니다. 하나는 우리의 원래 이미지이고, 두 번째는 구조 요소 또는 커널이라고 불리며 동작의 성격을 결정합니다. 두 가지 기본 형태학 연산자는 Erosion과 Dilation입니다. 그런 다음 Opening, Closing, Gradient 등과 .. 2017. 8. 17.