일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- format
- evaluation
- Laravel
- DB
- Python
- file
- AI
- git
- Database
- docker
- numpy
- GitLab
- 책갈피
- Container
- Package
- pandas
- PostgreSQL
- judge
- KAKAO
- Flask
- enV
- Linux
- Windows
- TORCH
- Converting
- pytorch
- list
- Paper
- Mac
- LLM
- Today
- Total
목록Develope (53)
Daily Develope
Pickle이란? Python의 객체(Object)를 binary 파일로 serializing 하거나 반대로 binray 파일로부터 de-serializing 하기 위한 프로토콜이 구현된 라이브러리. 흔히 pickling, flattening, marshalling 등으로 일컫는다. 장점? Python 객체를 바로 파일로 쓰거나 읽을 수 있다. Binary(또는 Bytes) 형태로 데이터를 다루기 때문에 읽기/쓰기 속도가 빠르다. 읽기/쓰기 예시코드 import pickle import os my_filepath = "target/file/path/filename.bin" my_data = ['target', 'data'] if os.path.isfile(my_filepath): ### 읽기 with o..
환경Python 3.9.7- modules : psycopg2Postgresql (Container, version:alpine3.18)- host : 127.0.0.1- port : 5432- database : mydb- 컨테이너 배포 샘플코드Connection Classimport psycopg2import loggingclass DBBaseController: def __init__(self, host:str="127.0.0.1", port:int=5432) -> None: self.__connect(host=host, port=port) def __connect(self, host:str="127.0.0.1", port:int=5432): try: ..
방법 1. 내장 property method 클래스의 속성값에 대한 getter, setter, destructor 동작을 method로 정의하고, 내장함수인 property를 사용해 해당하는 속성과 연결시켜 사용. 샘플코드 # Python program showing a use of property() function class Geeks: def __init__(self): self._age = 0 # function to get value of _age def get_age(self): print("getter method called") return self._age # function to set value of _age def set_age(self, a): print("setter metho..
1. 인증서 파일 확인 myssl_cert.pem : 도메인 인증서 myssl_nopass_key.pem : 개인키 인증서 (참고 : nginx의 경우 버전/경우에 따라서 인증서에 비밀번호가 설정된 경우 오류가 발생할 수 있어 비밀번호 제거 후 사용하는 것이 정신건강에 좋다.) 비밀번호 해제 방법 openssl 설치 private key 제거 # 명령 실행 후 인증서 발급시 생성/전달된 비밀번호를 입력 후 비밀번호가 없는 인증서 생성 $ openssh rsa -in myssl_password_key.pem -out myssl_nopass_key.pem 2. 인증서 복사 이후 관리를 위해 가능한 인증서를 한 곳에 모아두도록 하자. # Linux 예시 mkdir /etc/ssl/global cp *.pem ..