oafuncs 0.0.97.14__py3-none-any.whl → 0.0.97.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oafuncs/_script/cprogressbar.py +42 -20
- oafuncs/_script/netcdf_merge.py +1 -1
- oafuncs/_script/netcdf_modify.py +106 -0
- oafuncs/_script/netcdf_write.py +125 -0
- oafuncs/oa_cmap.py +59 -112
- oafuncs/oa_date.py +30 -16
- oafuncs/oa_down/hycom_3hourly.py +5 -54
- oafuncs/oa_draw.py +11 -132
- oafuncs/oa_file.py +1 -23
- oafuncs/oa_nc.py +51 -270
- oafuncs/oa_python.py +77 -87
- oafuncs/oa_sign/meteorological.py +3 -3
- oafuncs/oa_tool.py +31 -34
- {oafuncs-0.0.97.14.dist-info → oafuncs-0.0.97.16.dist-info}/METADATA +1 -1
- {oafuncs-0.0.97.14.dist-info → oafuncs-0.0.97.16.dist-info}/RECORD +18 -16
- {oafuncs-0.0.97.14.dist-info → oafuncs-0.0.97.16.dist-info}/WHEEL +0 -0
- {oafuncs-0.0.97.14.dist-info → oafuncs-0.0.97.16.dist-info}/licenses/LICENSE.txt +0 -0
- {oafuncs-0.0.97.14.dist-info → oafuncs-0.0.97.16.dist-info}/top_level.txt +0 -0
oafuncs/oa_tool.py
CHANGED
@@ -1,21 +1,8 @@
|
|
1
|
-
|
2
|
-
# coding=utf-8
|
3
|
-
"""
|
4
|
-
Author: Liu Kun && 16031215@qq.com
|
5
|
-
Date: 2025-04-04 20:17:42
|
6
|
-
LastEditors: Liu Kun && 16031215@qq.com
|
7
|
-
LastEditTime: 2025-04-04 20:17:45
|
8
|
-
FilePath: \\Python\\My_Funcs\\OAFuncs\\oafuncs\\oa_tool.py
|
9
|
-
Description:
|
10
|
-
EditPlatform: vscode
|
11
|
-
ComputerInfo: XPS 15 9510
|
12
|
-
SystemInfo: Windows 11
|
13
|
-
Python Version: 3.12
|
14
|
-
"""
|
15
|
-
from typing import Iterable
|
1
|
+
from typing import Any, Iterable, List, Optional, Union
|
16
2
|
|
17
3
|
__all__ = ["PEx", "email", "pbar"]
|
18
4
|
|
5
|
+
|
19
6
|
class PEx:
|
20
7
|
"""
|
21
8
|
PEx 封装了 ParallelExecutor,
|
@@ -37,7 +24,7 @@ class PEx:
|
|
37
24
|
|
38
25
|
def __init__(self, *args, **kwargs):
|
39
26
|
"""
|
40
|
-
初始化 PEx 实例,内部创建一个 ParallelExecutor
|
27
|
+
初始化 PEx 实例,内部创建一个 ParallelExecutor 实例
|
41
28
|
|
42
29
|
参数:
|
43
30
|
*args: 传递给 ParallelExecutor 的位置参数。
|
@@ -47,7 +34,7 @@ class PEx:
|
|
47
34
|
|
48
35
|
def __getattr__(self, attr):
|
49
36
|
"""
|
50
|
-
将所有未定义的属性访问委托给内部的 ParallelExecutor
|
37
|
+
将所有未定义的属性访问委托给内部的 ParallelExecutor 实例
|
51
38
|
|
52
39
|
参数:
|
53
40
|
attr (str): 要访问的属性名称。
|
@@ -58,26 +45,36 @@ class PEx:
|
|
58
45
|
return getattr(self.executor, attr)
|
59
46
|
|
60
47
|
|
61
|
-
def email(title="Title", content=None, send_to="
|
48
|
+
def email(title="Title", content=None, send_to="10001@qq.com"):
|
62
49
|
from ._script.email import send
|
50
|
+
|
63
51
|
send(title, content, send_to)
|
64
52
|
|
65
53
|
|
66
|
-
def pbar(
|
67
|
-
|
68
|
-
|
69
|
-
:
|
70
|
-
:
|
71
|
-
|
72
|
-
|
73
|
-
:
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
for i in pbar(range(100), prefix="Processing", color="green", cmap="viridis"):
|
79
|
-
sleep(0.1)
|
80
|
-
"""
|
54
|
+
def pbar(
|
55
|
+
iterable: Iterable=range(100),
|
56
|
+
description: str = "Working...",
|
57
|
+
total: Optional[float] = None,
|
58
|
+
completed: float = 0,
|
59
|
+
color: Any = "cyan",
|
60
|
+
cmap: Union[str, List[str], None] = None,
|
61
|
+
update_interval: float = 0.1,
|
62
|
+
bar_length: Optional[int] = None,
|
63
|
+
speed_estimate_period: float = 30.0,
|
64
|
+
next_line: bool = False,
|
65
|
+
):
|
81
66
|
from ._script.cprogressbar import ColorProgressBar
|
82
67
|
|
83
|
-
|
68
|
+
"""便捷函数,返回 ColorProgressBar 对象"""
|
69
|
+
return ColorProgressBar(
|
70
|
+
iterable=iterable,
|
71
|
+
description=description,
|
72
|
+
total=total,
|
73
|
+
completed=completed,
|
74
|
+
color=color,
|
75
|
+
cmap=cmap,
|
76
|
+
update_interval=update_interval,
|
77
|
+
bar_length=bar_length,
|
78
|
+
speed_estimate_period=speed_estimate_period,
|
79
|
+
next_line=next_line,
|
80
|
+
)
|
@@ -1,25 +1,27 @@
|
|
1
1
|
oafuncs/__init__.py,sha256=T_-VtnWWllV3Q91twT5Yt2sUapeA051QbPNnBxmg9nw,1456
|
2
|
-
oafuncs/oa_cmap.py,sha256=
|
2
|
+
oafuncs/oa_cmap.py,sha256=6ggMt0ilzG_qTayIGzR57gQmViXXWYEM6S0jr1PWzNQ,6565
|
3
3
|
oafuncs/oa_data.py,sha256=j_z4dOgugqyxc9STMTMZ0hKA46RyWgNtJeVWFaC8LPc,12141
|
4
|
-
oafuncs/oa_date.py,sha256=
|
5
|
-
oafuncs/oa_draw.py,sha256=
|
6
|
-
oafuncs/oa_file.py,sha256=
|
4
|
+
oafuncs/oa_date.py,sha256=MP-8eP_ASQFpHQjmB_MTSBjg46JQ1_UeLn_Ub6RSPLU,4464
|
5
|
+
oafuncs/oa_draw.py,sha256=Lk0wMTyhPBgVNMWkbOLJFjajhYRB0Be4l7jx9ti3qUQ,8794
|
6
|
+
oafuncs/oa_file.py,sha256=HqbB0kumd--71tMQZJUTBruNNtsGOotg77w-C7yBa0k,16524
|
7
7
|
oafuncs/oa_help.py,sha256=loyzTbjU_0VpSIBvAEUA_tqxG8MVsO0xFE_2hgQ3zMw,4188
|
8
|
-
oafuncs/oa_nc.py,sha256=
|
9
|
-
oafuncs/oa_python.py,sha256=
|
10
|
-
oafuncs/oa_tool.py,sha256=
|
8
|
+
oafuncs/oa_nc.py,sha256=1TIH892HmBbZKOjoW7XtP60T3lL0Tjhyq5yOWd12C1U,10423
|
9
|
+
oafuncs/oa_python.py,sha256=tSRSFeTm4TicSzZeyUhlMWUy8rSrKGTRv4CqbrwfF64,4141
|
10
|
+
oafuncs/oa_tool.py,sha256=xkwJMiTu5dVCYmHNuGmW7526JHTaE7TnFlqvWl1cfD8,2438
|
11
11
|
oafuncs/_data/OAFuncs.png,sha256=y1_x-mUP3gFjcy6m8FqfvQO_HgjzPhQKfXjnSHjslZE,3436152
|
12
12
|
oafuncs/_data/hycom_3hourly.png,sha256=azt_uPcXtl_8CSKRLLPCIf5pPrcxMiOzvoFQnwb0zUo,12411415
|
13
|
-
oafuncs/_script/cprogressbar.py,sha256=
|
13
|
+
oafuncs/_script/cprogressbar.py,sha256=wRU3SFPFtMI7ER26tTzg223kVKNo5RDWE9CzdIgUsuE,15771
|
14
14
|
oafuncs/_script/email.py,sha256=lL4HGKrr524-g0xLlgs-4u7x4-u7DtgNoD9AL8XJKj4,3058
|
15
|
-
oafuncs/_script/netcdf_merge.py,sha256=
|
15
|
+
oafuncs/_script/netcdf_merge.py,sha256=_EPF9Xj4HOVC9sZpi1lt62-Aq6pMlgsgwaajEBLhW6g,5092
|
16
|
+
oafuncs/_script/netcdf_modify.py,sha256=kjdAOb1iy57u8nDN-eEFTti149vfhGMY-36v-b2FtII,4224
|
17
|
+
oafuncs/_script/netcdf_write.py,sha256=KZ0ui2nvTujAciLKx4bwQHLEkH1R3P8hCzd7BysJ0D4,5288
|
16
18
|
oafuncs/_script/parallel.py,sha256=FS9FgaByq2yb9j6nL-Y0xP1VLvp4USMLBFMRsJDoqeQ,21848
|
17
19
|
oafuncs/_script/parallel_example_usage.py,sha256=uLvE7iwkMn9Cyq6-wk5_RpbQk7PXM9d16-26lTknW9s,2646
|
18
20
|
oafuncs/_script/plot_dataset.py,sha256=zkSEnO_-biyagorwWXPoihts_cwuvripzEt-l9bHJ2E,13989
|
19
21
|
oafuncs/_script/replace_file_concent.py,sha256=eCFZjnZcwyRvy6b4mmIfBna-kylSZTyJRfgXd6DdCjk,5982
|
20
22
|
oafuncs/oa_down/User_Agent-list.txt,sha256=pazxSip8_lphEBOPHG902zmIBUg8sBKXgmqp_g6j_E4,661062
|
21
23
|
oafuncs/oa_down/__init__.py,sha256=kRX5eTUCbAiz3zTaQM1501paOYS_3fizDN4Pa0mtNUA,585
|
22
|
-
oafuncs/oa_down/hycom_3hourly.py,sha256=
|
24
|
+
oafuncs/oa_down/hycom_3hourly.py,sha256=YL6zcKdyz4Hkv8703z5mAqgtQ8c8g3oHivcsrc8uISQ,64471
|
23
25
|
oafuncs/oa_down/idm.py,sha256=6eKsbGZ91_187_jJawUc6lqKRdUTse6EfUJnlaSl5mo,1903
|
24
26
|
oafuncs/oa_down/literature.py,sha256=2bF9gSKQbzcci9LcKE81j8JEjIJwON7jbwQB3gDDA3E,11331
|
25
27
|
oafuncs/oa_down/test_ua.py,sha256=0IQq3NjqfNr7KkyjS_U-a4mYu-r-E7gzawwo4IfEa6Y,10851
|
@@ -30,11 +32,11 @@ oafuncs/oa_model/roms/test.py,sha256=j3xiZdf3YtQQbNoT3Op_-GxI_zjKYtS3Hk6CTcnoBmA
|
|
30
32
|
oafuncs/oa_model/wrf/__init__.py,sha256=_2qUijimSlu7fsqlZunkZ4NF_FXSENwU5YmlJ9BZ6fM,473
|
31
33
|
oafuncs/oa_model/wrf/little_r.py,sha256=wx9vzfGznVuaa4T6m_4N89I1a57KZSLQ382EA5iu2Io,7458
|
32
34
|
oafuncs/oa_sign/__init__.py,sha256=QKqTFrJDFK40C5uvk48GlRRbGFzO40rgkYwu6dYxatM,563
|
33
|
-
oafuncs/oa_sign/meteorological.py,sha256=
|
35
|
+
oafuncs/oa_sign/meteorological.py,sha256=8091SHo2L8kl4dCFmmSH5NGVHDku5i5lSiLEG5DLnOQ,6489
|
34
36
|
oafuncs/oa_sign/ocean.py,sha256=xrW-rWD7xBWsB5PuCyEwQ1Q_RDKq2KCLz-LOONHgldU,5932
|
35
37
|
oafuncs/oa_sign/scientific.py,sha256=a4JxOBgm9vzNZKpJ_GQIQf7cokkraV5nh23HGbmTYKw,5064
|
36
|
-
oafuncs-0.0.97.
|
37
|
-
oafuncs-0.0.97.
|
38
|
-
oafuncs-0.0.97.
|
39
|
-
oafuncs-0.0.97.
|
40
|
-
oafuncs-0.0.97.
|
38
|
+
oafuncs-0.0.97.16.dist-info/licenses/LICENSE.txt,sha256=rMtLpVg8sKiSlwClfR9w_Dd_5WubTQgoOzE2PDFxzs4,1074
|
39
|
+
oafuncs-0.0.97.16.dist-info/METADATA,sha256=TYq3D0b7ZU9AzUZnQ9HEg3bdQI_cV-4e5wIoWXXwzuY,4226
|
40
|
+
oafuncs-0.0.97.16.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
41
|
+
oafuncs-0.0.97.16.dist-info/top_level.txt,sha256=bgC35QkXbN4EmPHEveg_xGIZ5i9NNPYWqtJqaKqTPsQ,8
|
42
|
+
oafuncs-0.0.97.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|