From 59d9261ab855e087546f37dcc3f7586bcec73680 Mon Sep 17 00:00:00 2001 From: zj3D Date: Thu, 14 Mar 2024 21:23:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工程化/类型申明/tf-24.py | 1 + 计算设备/数据库/ORM/processData.py | 1 - 语言特性/异步/82.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/工程化/类型申明/tf-24.py b/工程化/类型申明/tf-24.py index c70f62e..1c060bb 100644 --- a/工程化/类型申明/tf-24.py +++ b/工程化/类型申明/tf-24.py @@ -25,6 +25,7 @@ def frequencies_(word_list): def sort_(word_freq): return word_freq.most_common() + if __name__ == '__main__': word_freqs = sort_(frequencies_(extract_words_( testfilepath ))) print_word_freqs(word_freqs) \ No newline at end of file diff --git a/计算设备/数据库/ORM/processData.py b/计算设备/数据库/ORM/processData.py index dc5fae6..3faab06 100644 --- a/计算设备/数据库/ORM/processData.py +++ b/计算设备/数据库/ORM/processData.py @@ -43,7 +43,6 @@ def process_textfile(filepath): session.close() - if __name__ == '__main__': process_textfile(testfilepath) \ No newline at end of file diff --git a/语言特性/异步/82.py b/语言特性/异步/82.py index f0caa61..5a47fbc 100644 --- a/语言特性/异步/82.py +++ b/语言特性/异步/82.py @@ -23,5 +23,6 @@ async def main(): for word, count in wordfreqs.most_common(10): print(f"{word}: {count//10}") + # 运行异步主函数 asyncio.run(main()) \ No newline at end of file