일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Container
- pandas
- evaluation
- Python
- LLM
- file
- list
- git
- pytorch
- Laravel
- Paper
- Mac
- Database
- docker
- enV
- TORCH
- Package
- format
- KAKAO
- CUDA
- Windows
- Linux
- judge
- PostgreSQL
- numpy
- AI
- Flask
- Converting
- GitLab
- DB
- Today
- Total
목록Develope (52)
Daily Develope
읽기 문자열 import json my_json_data = f'{"data01" : "value01", "data02" : "value02"}' json_obj:dict = json.loads(my_json_data) print(json_obj.get("data01")) # output = value01 파일 import json my_json_file = "/my/json/file/path.json" json_file = open(my_json_file, "r") json_obj = json.load(json_file) 쓰기 UTF-8 인코딩 import json ### case1) 일반적인 json 출력 >> 포맷 그대로 json으로 변형하면 오류 발생 json_normal = {'my':'json..
application/json O Curl $ curl -x POST \ -h 'Content-Type: application/json' \ -h 'x-client-key: my-sample-key' ... \ -d '{"data1":"value1","data2":{"data21":"value21"},"data3":["value31","value32"]}' \ https://mydomain.com/some-api/sample O Python import requests _url = "https://mydomain.com/some-api/sample" _headers = { "Content-Type": "application/json", "x-client-key": "my-sample-key", ... }..
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..