This commit is contained in:
guanjihuan 2025-01-28 01:03:22 +08:00
parent 2240b25548
commit 2e181cad55
4 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
[metadata]
# replace with your username:
name = guan
version = 0.1.140
version = 0.1.141
author = guanjihuan
author_email = guanjihuan@163.com
description = An open source python package

View File

@ -1,6 +1,6 @@
Metadata-Version: 2.2
Name: guan
Version: 0.1.140
Version: 0.1.141
Summary: An open source python package
Home-page: https://py.guanjihuan.com
Author: guanjihuan

View File

@ -59,7 +59,7 @@ def chat(prompt='你好', stream=1, model=1, top_p=0.8, temperature=0.85):
print(stream_response, end='', flush=True)
except:
break
client_socket.close()
# client_socket.close()
if stream == 1:
print('\n\n--- End Chat Stream Message ---\n')
return response
@ -159,7 +159,7 @@ def run(function_name, *args, **kwargs):
else:
print('guan.run: 云端服务器计算结束。\n')
return_data = pickle.loads(base64.b64decode(return_data))
client_socket.close()
# client_socket.close()
return return_data
# 将XYZ数据转成矩阵数据说明x_array/y_array的输入和输出不一样。要求z_array数据中y对应的数据为小循环x对应的数据为大循环

View File

@ -289,6 +289,12 @@ def read_text_file(file_path='./a.txt', make_file=None):
content = f.read()
return content
def get_all_directories_in_current_directory(current_directory='./'):
import os
all_items = os.listdir(current_directory)
directories = [item for item in all_items if os.path.isdir(os.path.join(current_directory, item))]
return directories
# 获取目录中的所有文件名
def get_all_filenames_in_directory(directory='./', file_format=None, show_root_path=0, sort=1, include_subdirectory=1):
import os