일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- Docker
- 핑거스타일
- SSH
- Numpy
- 기타 연주
- YOLO
- nvidia-smi
- error
- Selenium
- pandas
- 컨테이너
- C++
- C
- mysql
- JSON
- Python
- Visual Studio
- label
- VS Code
- OpenCV
- 오류
- Linux
- pip
- 채보
- 프로그래머스
- C#
- windows forms
- paramiko
- pytorch
- ubuntu
- Today
- Total
목록전체 글 (328)
기계는 거짓말하지 않는다
Python에서 파일을 열 때 사용하는 open 함수의 mode 매개변수에 관한 간략한 설명이다.mode 매개변수는 파일을 어떤 방식으로 열지 결정하고, 이에 따라 파일 읽기, 쓰기, 추가를 할 수 있다.텍스트 모드, 바이너리 모드를 선택할 수 있다.기본 모드는 t(text mode), 텍스트 모드이다.모드 종류, 요약r / r+: 읽기 전용 / 읽기 및 쓰기 w / w+: 쓰기 전용 (기존 내용 삭제) / 쓰기 및 읽기 (기존 내용 삭제) a / a+: 추가 모드 / 추가 및 읽기 모드 b: 바이너리 모드 (위 모드와 결합 가능) x: 배타적 생성 모드 (파일이 존재하지 않을 때만 생성)모드 설명r (읽기 전용)파일을 읽기 전용으로 연다.파일이 존재하지 않으면 FileNotFoundError 예외가 발..
Ubuntu에서 그래픽카드를 확인할 때 간단하게 사용할 수 있는 명령어이다.lspci | grep -i VGAsudo lshw -C display NVIDIA 그래픽카드와 드라이버가 설치되어 있다면 nvidia-smi 명령어를 사용하면 된다.nvidia-smi

직접 듣고 채보한 동무들아 기타 악보입니다. (무단 배포 금합니다.) 악보전체 연주 (Capo 2 Fret)
Docker 이미지를 저장하는 기본 위치는 /var/lib/docker 디렉터리이다.이 기본 위치를 변경하는 방법이다.Docker 서비스 중지sudo systemctl stop docker(선택사항) 기존 Docker 디렉터리 데이터 이전기존 이미지 데이터가 존재할 경우 이전시키고 싶을 경우/data/docker 디렉터리로 이전한다고 가정sudo mv /var/lib/docker /data/dockerDocker 데몬 설정 파일 수정Docker 데몬의 기본 위치는 /etc/docker/daemon.json이다.파일이 없다면 새로 생성하고 아래 내용을 추가한다.{ "data-root": "/data/docker"}Docker 서비스 재시작sudo systemctl start docker설정 확인# Doc..
Python의 paramiko 모듈을 이용하여 원격 서버에 SSH 접속 후,passwd와 같이 명령어를 여러 번 주고받아야 할 경우에 간단하게 사용할 수 있는 방법이다.import paramikoimport timedef instance_change_password(function_args: dict): ''' args server_ip, user_name, server_password, new_password ''' client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(function_args['server_ip'],..
JSON 데이터가 포함된 문자열 또는 출력에서 JSON 데이터만 파싱(parsing) 하는 간단한 예제이다.jsoncpp 라이브러리가 필요하다.Ubuntu에서 jsoncpp 라이브러리 설치sudo apt-get install libjsoncpp-devln -s /usr/include/jsoncpp/json/ /usr/include/json예제 코드#include #include #include #include // JSON 문자열 파싱std::vector extract_json_strings(const std::string& input_string) { std::vector json_strings; int start_brace_index = -1; int end_brace_index = ..
Job for mysql.service failed because the control process exited with error code.See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.MySQL ubuntu 설치 후 service 시작 시 위와 같은 메시지를 출력했다.MariaDB와 겹친 경우였는데 모두 삭제하고 다시 설치했다.sudo apt autoremove --purge mysql-server\* mariadb-server\*sudo rm -rf /var/lib/mysqlsudo rm -rf /etc/mysql/sudo mkdir -p /etc/mysql/conf.dsudo apt inst..
Creating a tensor from a list of numpy.ndarrays is extremely slow.Please consider converting the list to a single numpy.ndarray with numpy.array()before converting to a tensor.PyTorch에서 List에 다수의 numpy.ndarray가 있을 경우 torch.tensor로 변환하는 경우 발생한다.이렇게 하면 성능이 저하될 수 있고, List를 단일 numpy.ndarray로 변환 후 tensor로 다시 변환하여야 한다.import numpy as npimport torchdef convert_to_tensor(list_of_arrays): # 리스트를 numpy..