Processing math: 100%
[Python] 화면 캡쳐 라이브러리 처리 속도 비교
·
Develop/Python
개요Python에서 화면을 캡쳐를 수행하는 라이브러리는 다양하게 존재합니다. 그러나 라이브러리 간 처리 속도의 차이가 있으며, 이는 프로젝트를 수행함에 있어 많은 영향을 미친다. 따라서 이 게시글에서는 라이브러리의 처리 속도를 비교하고 어떤 라이브러리가 가장 효과적인지에 대해 알아봅니다. 라이브러리대표적으로 화면을 캡쳐할 수 있는 라이브러리는 Pillow, pyautogui, mss 가 존재합니다.(관련 라이브러리의 자세한 설명은 생략하겠습니다.) 성능다음과 같이 화면의 일부 영역을 캡쳐하는 코드를 구현하였습니다.import cv2import mssimport timeimport pyautoguiimport numpy as npfrom PIL import ImageGrabx1, y1, x2, y2 = 4..
[Docker] 도커 명령어
·
Develop/Docker
도커 캐시 삭제sudodockersystempruneadockerrmf(docker ps -aq)도커 이미지 모두 삭제docker rmi $(docker images -q)
[Python] pytube로 Youtube 영상 처리
·
Develop/Python
Pytubehttps://github.com/pytube/pytube GitHub - pytube/pytube: A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos. - GitHub - pytube/pytube: A lightweight, dependency-free Python library (and command-line ut...github.comHow to use ?from pytu..
[Python] pafy로 Youtube 영상 처리
·
Develop/Python
pafyhttps://github.com/mps-youtube/pafy GitHub - mps-youtube/pafy: Python library to download YouTube content and retrieve metadataPython library to download YouTube content and retrieve metadata - GitHub - mps-youtube/pafy: Python library to download YouTube content and retrieve metadatagithub.com How to use ?다음과 같이 instance를 선언한 뒤 필요한 정보를 얻을 수 있다.import pafyurl = "https://www.youtube.com/watch..
[Python] Poetry 설치 & 간단한 실습 (FastAPI)
·
Develop/Python
PoetryPython Dependecy Manager로 Python 프로젝트에 대한 모든 dependency를 선언, 관리, 설치하여 어디서나 프로젝트가 작동하도록 도와주는 툴입니다. Poetry는 .toml 파일과 .lock 파일을 생성해 dependency를 관리합니다..toml 파일에는 프로젝트 dependency의 Metadata가,.lock 파일에는 설치된 패키지들의 version, hash가 저장되어 있습니다.Installhttps://python-poetry.org/docs/#installing-with-the-official-installer Introduction | Documentation | Poetry - Python dependency management and packaging..
[Python] nohup으로 .py 백그라운드 실행
·
Develop/Python
filename.py 파일을 실행할 때 컴퓨터를 종료하게 되면 이 실행 파일도 종료됩니다.이를 백그라운드에서 실행하여 컴퓨터를 종료하더라도 계속해서 실행할 수 있는 명령어가 있어서 소개하겠습니다. nohup사용법은 매우 간단합니다. CLI로 .py를 실행할 때 앞에 nohup을 붙여주기만 하면 됩니다.nohup python test.py &이때 실행 log의 경우 nohup.output에 기록되며 다음 명령어로 생략 가능하다.nohup python test.py & > /dev/null 프로세스 종료백그라운드에서 해당 파일을 실행하기 때문에 GUI 환경에서 편하게 프로세스를 종료할 수 없습니다.따라서 PID를 찾아 직접 종료시켜줘야하는 약간의 번거로움이 있습니다.먼저, ps -ef 명령어를 통해 실행 중..
git rebase & git stash
·
Develop/Git & GitHub
상황 현재 나의 개발 브랜치에서 작업 중인 상황에서 다른 팀원의 개발 코드가 main에 merge되어 내가 작업 하던 내용을 빈 공간에 저장 후(stash) 수정된 main을 pull 하여 업데이트 한후 그 위에 다시 내가 작업 하던 내용을 덮어 씌움. 1. git stash (현재 나의 개발 브랜치에서 작업 중인 내용을 stack에 저장) 2. git checkout main (main 브랜치로 이동) 3. git pull (main 브랜치 업데이트) 4. git checkout (작업중이던 나의 개발 브랜치로 이동) 5. git rebase main (나의 개발 브랜치에 업데이트 된 main 브랜치 적용) 5. git stash pop (저장한 작업 중이였던 내용을 덮어 씌움)
[Ubuntu] Docker Container 한글 깨짐 해결
·
Develop/Linux
1. locales 설치 aptgetinstalllocales2. locale -a ko_KR.utf8 이 없는 것을 확인할 수 있다. 3. 한글 패키치 다운로드 aptgetinstalllanguagepackko2koKR.utf8.4.locale locale-gen ko_KR.utf8 5. 한글 locale 설정하기 $ dpkg-reconfigure locales 엔터를 누르며 ko.KR.UTF-8 에 해당하는 number를 찾습니다 (ubuntu 18.04의 경우 298번 이였습니다.) 엔터를 누르다 Locales to be generated가 뜨면 298을 입력해주고, Default locale..
욱근욱