본문 바로가기

Develop/Python

(20)
VS CODE (Code-server) Debugging launch.json https://demun.github.io/vscode-tutorial/debug/#launchjson Debug - Visual Studio Code tutorial vscode debugging vscode 에서 디버깅은 핵심기능중 하나입니다. vscode 에는 node.js 런타임에 대한 디버깅 지원기능이 내장되어 있어 JavaScript, TypeScript 및 JavaScript로 변환된 다른 언어를 디버깅 할 수 있 demun.github.io https://goodthings4me.tistory.com/21 VS Code로 Python 코드 디버깅 시 launch.json Visual Studio Code에서 Python 코드를 디버깅 할 때 launch.json을 생성해야 한다. Pytho..
jupyter에 가상환경, kernel 등록 기본적으로 작동하는 jupyter kernels 의 디렉토리를 찾아봐야 한다. /usr/local/share/jupyter/kernels /usr/share/jupyter/kernels /home/xxxxx/.local/share/jupyter/kernels 그다음 표시될 이름의 디렉토리를 만들고 기본 python3 폴더의 내용을 복사한다. (kernel.json logo-32x32.png logo-64x64.png logo-svg.svg) 그 다음 kernel.json 파일의 파이썬 실행 파일의 위치를 만들어 놓은 가상환경의 python 파일 경로를 입력해 준다. { "argv": [ "python", "-m", "ipykernel_launcher", "-f", "{connection_file}" ],..
jupyter magic command list https://sosomemo.tistory.com/60 Jupyter Notebook 자주 사용하는 매직 커맨드 (%커맨드) Jupyter Notebook 자주 사용하는 Magic Command 정리 Ipython (Jupyter Notebook) 에는 마법같은 기능을 제공해주는 Magic Command 가 내장되어 있습니다. 당장 Cell 에 %lsmagic 이라고 입력하면 다음과 같은 다.. sosomemo.tistory.com Ipython (Jupyter Notebook) 에는 마법같은 기능을 제공해주는 Magic Command 가 내장되어 있습니다. 당장 Cell 에 %lsmagic 이라고 입력하면 다음과 같은 다양한 Magic Command 목록이 나옵니다. %lsmagic Available..
multi table ocr https://pyimagesearch.com/2022/02/28/multi-column-table-ocr/ Multi-Column Table OCR by Adrian Rosebrock on February 28, 2022 Click here to download the source code to this post In this tutorial, you will: Discover a technique for associating rows and columns together Learn how to detect tables of text/data in an image Extract the detected table from an image OCR the text in the table Apply hiera..
PIP install -e https://suhwan.dev/2018/10/30/deep-dive-into-pip-2/ 지난 포스트에서는 pip의 기본에 대해서 알아보았다. 주로 requirements.txt에 대한 이야기를 했었는데, 우리가 막힌 부분은 pip install 의 -e 옵션에 대한 부분이었다. 이번 포스트에서는 지난 포스트에 이어서 pip install -e . 가 어떤 의미인지 알아볼 것이다. 그렇게 하기 위해서 우리는 setuptools에 대해서 알아야 한다. setuptools: Preview Basic setuptools 공식 다큐멘테이션에 따르면, setuptools는 파이썬의 distutils 이라는 라이브러리를 기반으로 개발자들이 자신들의 파이썬 패키지를 쉽게 배포할 수 있도록 도와주는 파이썬 라이브러..
open cv 강좌 링크 https://docs.opencv.org/3.4.3/d0/de3/tutorial_py_intro.html OpenCV: Introduction to OpenCV-Python Tutorials OpenCV OpenCV was started at Intel in 1999 by Gary Bradsky, and the first release came out in 2000. Vadim Pisarevsky joined Gary Bradsky to manage Intel's Russian software OpenCV team. In 2005, OpenCV was used on Stanley, the vehicle that won the 2005 DARP docs.opencv.org ​https://076923.g..
Google Colab 설정하기 (런타임 연결 끊김 방지) Google Colab 런타임 연결 끊김 방지 브라이언7 2019. 11. 30. 21:19 Google Colab 의 전체 세션 유지 시간은 12시간이고, 90분 이상 비활성화 되어 있으면 끊긴다고 하는데, 머신러닝 학습을 하다 보면 90분 동안 조작을 안하는 일이 흔하다. 이렇게 학습을 하다보면 자주 런타임 연결 끊김 창이 뜨게 되는데, 이것을 방지할 수 있는 방법이 없는지 Google에서 찾아봤다. https://stackoverflow.com/questions/57113226/how-to-prevent-google-colab-from-disconnecting How to prevent Google Colab from disconnecting? Is there any way to programmat..
파이썬에서 파일과 디렉토리 경로 다루기 파이썬에서 파일과 디렉토리 경로 다루기 파이썬에서 디렉토리와 파일경로를 다루는 주요 함수들에 대해 알아보자. 디렉토리 및 파일 경로에 대한 함수들은 os 모듈에 있으므로, os 모듈을 import 한 것을 전제로 한다. 특히, os.path 모듈은 파일명과 파일경로에 대한 유용한 함수들을 많이 제공하고 있다. 용도 함수 예제 현재 작업 폴더 얻기 os.getcwd() # "C:\Temp" 디렉토리 변경 os.chdir("C:\Tmp") 특정 경로에 대해 절대 경로 얻기 os.path.abspath(".\\Scripts") # "C:\Python35\Scripts" 경로 중 디렉토리명만 얻기 os.path.dirname("C:/Python35/Scripts/pip.exe") # "C:/Python35/Sc..