查询训练报告接口
This commit is contained in:
19
app/util/csv_utils.py
Normal file
19
app/util/csv_utils.py
Normal file
@ -0,0 +1,19 @@
|
||||
import csv
|
||||
|
||||
|
||||
def read_csv(file_path):
|
||||
"""
|
||||
根据文件路径读取csv文件
|
||||
:param file_path:
|
||||
:return:
|
||||
"""
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
# 创建 CSV 阅读器对象
|
||||
csv_reader = csv.reader(file)
|
||||
# 跳过标题行
|
||||
next(csv_reader)
|
||||
result_row = []
|
||||
for row in csv_reader:
|
||||
result_row.append(row)
|
||||
return result_row
|
||||
return None
|
@ -2,7 +2,6 @@ import os
|
||||
import shutil
|
||||
from fastapi import UploadFile
|
||||
from PIL import Image
|
||||
"""文件处理相关的util"""
|
||||
|
||||
|
||||
def file_path(*path):
|
||||
|
@ -2,11 +2,10 @@ import psutil
|
||||
import platform
|
||||
import json
|
||||
from datetime import datetime
|
||||
# 获取服务器运行状态
|
||||
|
||||
|
||||
def get_server_info():
|
||||
|
||||
# 获取服务器运行状态
|
||||
info = {}
|
||||
|
||||
# 1. 系统基本信息
|
||||
|
Reference in New Issue
Block a user