[Linux] 폴더 용량 크기 순서대로 확인하기
du -sh * | sort -h du -sh * | sort -h
2020.03.09
[Python] Anaconda 가상환경에서 spyder 실행하기 (Windows)
Windows 환경에서 Anaconda 가상환경을 생성하고, 가상환경 내부에서 spyder 를 실행하는 방법은 아래와 같다. 1. python 3.6 버전의 아나콘다 가상환경 생성 $ conda create -n myenv python=3.6 2. 가상환경 실행 $ activate myenv 3. 가상환경에 spyder 설치 $ conda install spyder 4. spyder 실행 $ spyder 5. Spyder 에서 python 동작 환경 확인하기 import sys print(sys.executable) 결과는 아래와 같다. print(sys.executable) C:\Users\name\Anaconda3\envs\myenv\pythonw.exe 6. Anaconda spyder 를 설치하였..
2020.02.07
[CMake] Ubuntu에 CMake 설치하기
1. apt 를 이용한 설치 (구버전이 설치됨) $ sudo apt install cmake 2. 직접 최신버전 설치 2.1 홈페이지에서 다운로드 https://cmake.org/download Download | CMake Current development distribution Each night binaries are created as part of the testing process. Other than passing all of the tests in CMake, this version of CMake should not be expected to work in a production environment. It is being produced so that us cmake.org 2.2 w..
2020.01.23
no image
[Linux] Ubuntu에 Nvidia Driver 설치하기
Ubuntu 가 설치되어있는 상태에서 NVIDIA DRIVER 설치하기 1. 그래픽 카드 종류 확인하기 $ sudo lspci -vnn |grep VGA 2. 필요한 컴파일러 및 32bit 라이브러리 설치하기 $ sudo dpkg --add-architecture i386 $ sudo apt update $ sudo apt install build-essential libc6:i386 3. nouveau 드라이버 비활성화 하기 (블랙리스트 추가) $ sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf" $ sudo bash -c "echo options nouveau modeset=0 >> /etc/mod..
2020.01.22
[Linux] nohup 로그 이름 설정
원래 기본 nohup 명령어는 nohup.out 이라는 이름으로 로그 파일이 생성되는데, 로그 파일 이름을 새로이 지정하고 싶다면 아래와 같이 설정한다. nohup ./test.sh & > log.txt 참고자료 : https://jhproject.tistory.com/137 Linux 백그라운드로 프로세스 실행하기 nohup 실행문 & eg. nohup ./dev_appserver.py --host 192.168.10.99 app.yaml & 이럴경우 nohup.out 이라는 로그 파일이 생성되는데 파일 이름을 다른걸로 바꾸고 싶을 때는 nohup 실행문 > 파일명 & eg. nohup ... jhproject.tistory.com
2020.01.22
no image
[git] git push 안될 때
Windows 환경에서 git push 를 사용할 때 >git push -u origin master Counting objects: 28, done. Delta compression using up to 8 threads. Compressing objects: 100% (27/27), done. error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403 Forbidden fatal: The remote end hung up unexpectedly Writing objects: 100% (28/28), 426.36 MiB | 11.58 MiB/s, done. Total 28 (delta 2), reused 0 (delta 0) fa..
2020.01.17
[Python] 파일 존재 유무 검사
import os.path file = 'test.txt' if os.path.isfile(file): print("Yes. it is a file") esif os.path.isdir(file): print("Yes. it is a directory") esif os.path.exists(file): print("Something exist") else : print("Nothing") 참고자료 : https://wikidocs.net/14304 불러오는 중입니다...
2020.01.08
[Python] 필요 패키지 목록 requirements.txt 만들고, 설치하기
필요한 패키지 목록 만들기 (현재 환경에 깔려있는 패키지들을 모두 출력해줌) $ pip freeze > requirements.txt 필요한 패키지 설치하기 $ pip install -r requirements.txt
2019.12.30
[Linux] Unzip 명령어 실행 시 bad zipfile offset 에러
~$ zip -F file.zip --out file-large.zip ~$ unzip file-large.zip 참고자료 https://stackoverflow.com/questions/36807921/unzipping-the-multipart-file-bad-zipfile-offset-local-header-sig-4 Unzipping the multipart file - bad zipfile offset (local header sig): 4 I have a file with 13 GB, which has been split equally using martipart feature in the Winzip(Windows 7). I uploaded the files to the Linux server..
2019.09.18
[Python] Python -m 의 의미
파이썬에서 모듈을 실행한다는 뜻 보통 아래와 같이 pip 를 python3 또는 python2 에서 적절하게 실행하고자 할 때 사용함 python2 -m pip install pycrypto python3 -m pip install pycrypto 참고자료 1 : 파이썬 모듈 설치하기 https://docs.python.org/ko/3/installing/index.html 파이썬 모듈 설치하기 — Python 3.7.4 문서 파이썬 모듈 설치하기 이메일 distutils-sig@python.org 널리 사용되는 공개 소스 개발 프로젝트로서, 파이썬에는 적극적으로 지원하는 기여자와 사용자의 커뮤니티가 있어, 자신들의 소프트웨어를 공개 소스 라이센스 계약에 따라 다른 파이썬 개발자가 사용할 수 있도록 합니..
2019.08.04
[Python] 구글 이미지 크롤링 하기
인스타그램으로 크롤링 하기 이외에도 구글 이미지를 크롤링 할 수 있다. 개인적으로 해시태그를 통해서 크롤링 하는 방법은 네거티브 이미지가 너무 많이 포함되어있기 때문에 비추, 구글 이미지는 자신이 원하는 검색어의 조합을 통해 크롤링 하기 때문에 마음에 드는 이미지가 다수 포함될 수 있다는 장점이 있다. 하지만 한번에 100개 까지 밖에 수집이 안되는 듯 하다. 1. 설치하기 https://google-images-download.readthedocs.io/en/latest/installation.html $ pip install google_images_download $ git clone https://github.com/hardikvasa/google-images-download.git $ cd go..
2019.08.02
[JSON] JSON 파일 뷰어
http://jsonviewer.stack.hu/ Online JSON Viewer jsonviewer.stack.hu 이 페이지에 마우스로 json 파일을 잡아다 끌면 내용이 보인다. 그리고 참고로 jq 라는 것을 이용하여 json 의 내용을 다음과 같이 줄바꿈 하여 편집 할 수 있다. $ jq . person_keypoints_val2017.json > person_keypoints_val2017_jq.json https://stedolan.github.io/jq/ jq jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that se..
2019.08.02