Skip to content

Commit b720e26

Browse files
committed
* 新增计算文件大小函数
1 parent 305b4c6 commit b720e26

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
### 更新日志
22

33

4-
#### JadeV2.1.3 - 2024-01-10
5-
* 根据字符窜长度随机生成字符串
4+
#### JadeV2.1.4 - 2024-01-10
5+
* 新增计算文件大小函数
66
---
77

88
<details onclose>
99
<summary>查看更多更新日志</summary>
1010

11+
#### JadeV2.1.3 - 2024-01-10
12+
* 根据字符窜长度随机生成字符串
13+
---
14+
1115
#### JadeV2.1.2 - 2023-11-20
1216
* zip_package Linux生成文件名修改
1317
---

jade/jade_tools.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,10 @@ def generate_random_string(length):
484484

485485
# 从字符集合中随机选取指定长度的字符并组合起来形成随机字符串
486486
return ''.join([random.choice(characters) for _ in range(length)])
487+
def get_file_size(filename):
488+
size = os.path.getsize(filename)
489+
return size
490+
487491
if __name__ == '__main__':
488492
key = "HgEWN6tv_HeVqbh7M_Q-XT6NCVETFeIspgE17Xh30Co="
489493
#encryption_model("container_det_768-576_slim.onnx","HgEWN6tv_HeVqbh7M_Q-XT6NCVETFeIspgE17Xh30Co=")

0 commit comments

Comments
 (0)