일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- numpy
- Package
- Python
- docker
- Laravel
- Linux
- AI
- Container
- Converting
- git
- list
- LLM
- GitLab
- pandas
- Paper
- Database
- pytorch
- DB
- Mac
- judge
- TORCH
- enV
- file
- Windows
- Flask
- format
- KAKAO
- PostgreSQL
- 책갈피
- evaluation
- Today
- Total
목록Develope/Python (32)
Daily Develope
main_test.py 에서 특정 모듈에서 선별된 기능들만 일괄 테스트 ㅇ main_test.py - suite_algorithm function에 명시된 기능만 테스트 import unittest def _function_list(class_object): return [x for x in class_object.__dict__ if type(class_object.__dict__[x]) == type(_function_list)] def suite_algorithm(): ### Algorithm - Rating from ... import AlgorithmTestcase suite = unittest.TestSuite() suite.addTest(AlgorithmTestcase('test_al_01'..

읽기 CSV Lib. 사용 ### Data sample (target.csv 파일) # word count # hello 5 # bye 3 # good 4 import csv targetFile = open(f'{target_path}/target.csv', 'r') csvData = csv.reader(targetFile) header = next(csvData) # header 정보 분리 (word, count) print(header) for word, count in csvData: print(word, count) ### Output # word count # hello 5 # ... 쓰기 openpyxl & Workbook Lib. 사용 파일/시트 생성 import..
가상환경 설정/관리생성명령어로 명시적으로 생성conda create -n {env_name} python={version}# 예) conda create -n my_python_env python=3.9.12패키지 파일로부터 생성 (default: requirements.txt)conda create -n {env_name} --file requirements.txt조회conda info --envs활성화 (사용할 가상환경 선택)conda activate {env_name}삭제conda remove -n {env_name} --all복제cf. conda 환경명을 바꾸는 명령(rename)은 없으므로, 필요하다면 복제 후 기존 환경을 삭제conda create -n {cloned_env} --clone {..