ACCC1380 commited on
Commit
551af33
1 Parent(s): c0fa936

Upload 1.ipynb with huggingface_hub

Browse files
Files changed (1) hide show
  1. 1.ipynb +59 -0
1.ipynb ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "id": "933a0a3c-9628-42c7-895b-2f64215829ee",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import rarfile\n",
11
+ "\n",
12
+ "# 指定 .rar 文件的路径\n",
13
+ "rar_path = '/teamspace/studios/this_studio/models0719必装模型.rar'\n",
14
+ "password = 'wx:aix0069' # 设置密码\n",
15
+ "\n",
16
+ "# 打开 .rar 文件\n",
17
+ "with rarfile.RarFile(rar_path) as rf:\n",
18
+ " # 设置密码\n",
19
+ " rf.setpassword(password)\n",
20
+ " \n",
21
+ " # 获取所有文件名列表\n",
22
+ " file_list = rf.namelist()\n",
23
+ " \n",
24
+ " # 打印文件名\n",
25
+ " for file in file_list:\n",
26
+ " print(file)\n"
27
+ ]
28
+ },
29
+ {
30
+ "cell_type": "code",
31
+ "execution_count": null,
32
+ "id": "9a832015-426f-42a2-b651-7f5912fd54f2",
33
+ "metadata": {},
34
+ "outputs": [],
35
+ "source": []
36
+ }
37
+ ],
38
+ "metadata": {
39
+ "kernelspec": {
40
+ "display_name": "Python 3",
41
+ "language": "python",
42
+ "name": "python3"
43
+ },
44
+ "language_info": {
45
+ "codemirror_mode": {
46
+ "name": "ipython",
47
+ "version": 3
48
+ },
49
+ "file_extension": ".py",
50
+ "mimetype": "text/x-python",
51
+ "name": "python",
52
+ "nbconvert_exporter": "python",
53
+ "pygments_lexer": "ipython3",
54
+ "version": "3.10.10"
55
+ }
56
+ },
57
+ "nbformat": 4,
58
+ "nbformat_minor": 5
59
+ }