diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 2040e1a..dcfcf39 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -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 diff --git a/PyPI/src/guan.egg-info/PKG-INFO b/PyPI/src/guan.egg-info/PKG-INFO index aa2e796..9cb9f82 100644 --- a/PyPI/src/guan.egg-info/PKG-INFO +++ b/PyPI/src/guan.egg-info/PKG-INFO @@ -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 diff --git a/PyPI/src/guan/data_processing.py b/PyPI/src/guan/data_processing.py index 672b12b..9f52f24 100644 --- a/PyPI/src/guan/data_processing.py +++ b/PyPI/src/guan/data_processing.py @@ -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对应的数据为大循环) diff --git a/PyPI/src/guan/file_reading_and_writing.py b/PyPI/src/guan/file_reading_and_writing.py index 63c411b..26151a8 100644 --- a/PyPI/src/guan/file_reading_and_writing.py +++ b/PyPI/src/guan/file_reading_and_writing.py @@ -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