oafuncs 0.0.82__py2.py3-none-any.whl → 0.0.84__py2.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/data_store/OAFuncs.png +0 -0
- oafuncs/oa_cmap.py +1 -0
- oafuncs/oa_down/__init__.py +5 -4
- oafuncs/oa_down/hycom_3hourly.py +1 -1
- oafuncs/oa_down/user_agent.py +34 -0
- oafuncs/oa_draw.py +80 -70
- oafuncs/oa_file.py +6 -4
- oafuncs/oa_help.py +19 -16
- oafuncs-0.0.84.dist-info/METADATA +93 -0
- {oafuncs-0.0.82.dist-info → oafuncs-0.0.84.dist-info}/RECORD +13 -11
- oafuncs-0.0.82.dist-info/METADATA +0 -918
- {oafuncs-0.0.82.dist-info → oafuncs-0.0.84.dist-info}/LICENSE.txt +0 -0
- {oafuncs-0.0.82.dist-info → oafuncs-0.0.84.dist-info}/WHEEL +0 -0
- {oafuncs-0.0.82.dist-info → oafuncs-0.0.84.dist-info}/top_level.txt +0 -0
Binary file
|
oafuncs/oa_cmap.py
CHANGED
@@ -100,6 +100,7 @@ def create_cmap_rgbtxt(rgbtxt_file,split_mark=','): # 根据RGB的txt文档制
|
|
100
100
|
return icmap
|
101
101
|
|
102
102
|
|
103
|
+
# ** 选择cmap
|
103
104
|
def choose_cmap(cmap_name=None, query=False):
|
104
105
|
"""
|
105
106
|
description: Choosing a colormap from the list of available colormaps or a custom colormap
|
oafuncs/oa_down/__init__.py
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
# coding=utf-8
|
3
|
-
|
3
|
+
"""
|
4
4
|
Author: Liu Kun && 16031215@qq.com
|
5
5
|
Date: 2024-09-17 16:09:20
|
6
6
|
LastEditors: Liu Kun && 16031215@qq.com
|
7
|
-
LastEditTime: 2024-12-
|
7
|
+
LastEditTime: 2024-12-26 08:09:01
|
8
8
|
FilePath: \\Python\\My_Funcs\\OAFuncs\\oafuncs\\oa_down\\__init__.py
|
9
|
-
Description:
|
9
|
+
Description:
|
10
10
|
EditPlatform: vscode
|
11
11
|
ComputerInfo: XPS 15 9510
|
12
12
|
SystemInfo: Windows 11
|
13
13
|
Python Version: 3.11
|
14
|
-
|
14
|
+
"""
|
15
15
|
|
16
16
|
# from .love_ocean import sign as love_ocean
|
17
17
|
# from .meteorological_home import sign as meteorological_home
|
18
18
|
|
19
19
|
from .hycom_3hourly import *
|
20
20
|
from .literature import *
|
21
|
+
from .user_agent import *
|
oafuncs/oa_down/hycom_3hourly.py
CHANGED
@@ -34,7 +34,7 @@ import glob
|
|
34
34
|
|
35
35
|
warnings.filterwarnings("ignore", category=RuntimeWarning, message="Engine '.*' loading failed:.*")
|
36
36
|
|
37
|
-
__all__ = ["draw_time_range", "download", "how_to_use", "get_time_list"
|
37
|
+
__all__ = ["draw_time_range", "download", "how_to_use", "get_time_list"]
|
38
38
|
|
39
39
|
# time resolution
|
40
40
|
data_info = {"yearly": {}, "monthly": {}, "daily": {}, "hourly": {}}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# coding=utf-8
|
3
|
+
"""
|
4
|
+
Author: Liu Kun && 16031215@qq.com
|
5
|
+
Date: 2024-12-26 08:06:34
|
6
|
+
LastEditors: Liu Kun && 16031215@qq.com
|
7
|
+
LastEditTime: 2024-12-26 08:06:34
|
8
|
+
FilePath: \\Python\\My_Funcs\\OAFuncs\\oafuncs\\oa_down\\user_agent.py
|
9
|
+
Description:
|
10
|
+
EditPlatform: vscode
|
11
|
+
ComputerInfo: XPS 15 9510
|
12
|
+
SystemInfo: Windows 11
|
13
|
+
Python Version: 3.12
|
14
|
+
"""
|
15
|
+
import os
|
16
|
+
import random
|
17
|
+
|
18
|
+
|
19
|
+
__all__ = ["get_ua"]
|
20
|
+
|
21
|
+
|
22
|
+
def get_ua():
|
23
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
24
|
+
ua_file_txt = os.path.join(current_dir, "User_Agent-list.txt")
|
25
|
+
|
26
|
+
with open(ua_file_txt, "r") as f:
|
27
|
+
ua_list = f.readlines()
|
28
|
+
# 去掉换行符和空行
|
29
|
+
ua_list = [line.strip() for line in ua_list if line.strip()]
|
30
|
+
|
31
|
+
# if current_platform == 'Linux':
|
32
|
+
# ua_list = [line for line in ua_list if 'Linux' in line]
|
33
|
+
|
34
|
+
return random.choice(ua_list)
|
oafuncs/oa_draw.py
CHANGED
@@ -25,7 +25,7 @@ import xarray as xr
|
|
25
25
|
from cartopy.mpl.ticker import LatitudeFormatter, LongitudeFormatter
|
26
26
|
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
27
27
|
|
28
|
-
__all__ = ["fig_minus", "create_gif", "add_cartopy", "add_gridlines", 'MidpointNormalize', "
|
28
|
+
__all__ = ["fig_minus", "create_gif", "add_cartopy", "add_gridlines", 'MidpointNormalize', "add_lonlat_unit", "plot_contourf", "plot_contourf_lonlat", "plot_quiver", "plot_contourf_cartopy"]
|
29
29
|
|
30
30
|
warnings.filterwarnings("ignore")
|
31
31
|
|
@@ -97,16 +97,16 @@ def create_gif(image_list: list, gif_name: str, duration=0.2): # 制作动图
|
|
97
97
|
|
98
98
|
|
99
99
|
# ** 转化经/纬度刻度
|
100
|
-
def
|
100
|
+
def add_lonlat_unit(lon=None, lat=None, decimal=2):
|
101
101
|
"""
|
102
|
-
param {*}
|
103
|
-
param {*}
|
102
|
+
param {*} lon : 经度列表
|
103
|
+
param {*} lat : 纬度列表
|
104
104
|
param {*} decimal : 小数位数
|
105
105
|
return {*} 转化后的经/纬度列表
|
106
|
-
example :
|
106
|
+
example : add_lonlat_unit(lon=lon, lat=lat, decimal=2)
|
107
107
|
"""
|
108
108
|
|
109
|
-
def
|
109
|
+
def _format_longitude(x_list):
|
110
110
|
out_list = []
|
111
111
|
for x in x_list:
|
112
112
|
if x > 180:
|
@@ -117,7 +117,7 @@ def xy2lonlat(xy, lonlat="lon", decimal=2):
|
|
117
117
|
out_list.append(f"{degrees:.{decimal}f}°{direction}" if x != 0 and x != 180 else f"{degrees}°")
|
118
118
|
return out_list if len(out_list) > 1 else out_list[0]
|
119
119
|
|
120
|
-
def
|
120
|
+
def _format_latitude(y_list):
|
121
121
|
out_list = []
|
122
122
|
for y in y_list:
|
123
123
|
if y > 90:
|
@@ -128,10 +128,78 @@ def xy2lonlat(xy, lonlat="lon", decimal=2):
|
|
128
128
|
out_list.append(f"{degrees:.{decimal}f}°{direction}" if y != 0 else f"{degrees}°")
|
129
129
|
return out_list if len(out_list) > 1 else out_list[0]
|
130
130
|
|
131
|
-
if
|
132
|
-
return
|
133
|
-
elif
|
134
|
-
return
|
131
|
+
if lon and lat:
|
132
|
+
return _format_longitude(lon), _format_latitude(lat)
|
133
|
+
elif lon:
|
134
|
+
return _format_longitude(lon)
|
135
|
+
elif lat:
|
136
|
+
return _format_latitude(lat)
|
137
|
+
|
138
|
+
|
139
|
+
# ** 添加网格线
|
140
|
+
def add_gridlines(ax, projection=ccrs.PlateCarree(), color="k", alpha=0.5, linestyle="--", linewidth=0.5):
|
141
|
+
# add gridlines
|
142
|
+
gl = ax.gridlines(crs=projection, draw_labels=True, linewidth=linewidth, color=color, alpha=alpha, linestyle=linestyle)
|
143
|
+
gl.right_labels = False
|
144
|
+
gl.top_labels = False
|
145
|
+
gl.xformatter = LongitudeFormatter(zero_direction_label=False)
|
146
|
+
gl.yformatter = LatitudeFormatter()
|
147
|
+
|
148
|
+
return ax, gl
|
149
|
+
|
150
|
+
|
151
|
+
# ** 添加地图
|
152
|
+
def add_cartopy(ax, lon=None, lat=None, projection=ccrs.PlateCarree(), gridlines=True, landcolor="lightgrey", oceancolor="lightblue", cartopy_linewidth=0.5):
|
153
|
+
|
154
|
+
# add coastlines
|
155
|
+
ax.add_feature(cfeature.LAND, facecolor=landcolor)
|
156
|
+
ax.add_feature(cfeature.OCEAN, facecolor=oceancolor)
|
157
|
+
ax.add_feature(cfeature.COASTLINE, linewidth=cartopy_linewidth)
|
158
|
+
ax.add_feature(cfeature.BORDERS, linewidth=cartopy_linewidth, linestyle=":")
|
159
|
+
|
160
|
+
# add gridlines
|
161
|
+
if gridlines:
|
162
|
+
ax, gl = add_gridlines(ax, projection)
|
163
|
+
|
164
|
+
# set longitude and latitude format
|
165
|
+
lon_formatter = LongitudeFormatter(zero_direction_label=False)
|
166
|
+
lat_formatter = LatitudeFormatter()
|
167
|
+
ax.xaxis.set_major_formatter(lon_formatter)
|
168
|
+
ax.yaxis.set_major_formatter(lat_formatter)
|
169
|
+
|
170
|
+
# set extent
|
171
|
+
if lon is not None and lat is not None:
|
172
|
+
lon_min, lon_max = lon.min(), lon.max()
|
173
|
+
lat_min, lat_max = lat.min(), lat.max()
|
174
|
+
ax.set_extent([lon_min, lon_max, lat_min, lat_max], crs=projection)
|
175
|
+
|
176
|
+
|
177
|
+
# ** 自定义归一化类,使得0值处为中心点
|
178
|
+
class MidpointNormalize(mpl.colors.Normalize):
|
179
|
+
"""
|
180
|
+
Description: 自定义归一化类,使得0值处为中心点
|
181
|
+
|
182
|
+
param {*} mpl.colors.Normalize : 继承Normalize类
|
183
|
+
return {*}
|
184
|
+
|
185
|
+
Example:
|
186
|
+
nrom = MidpointNormalize(vmin=-2, vmax=1, vcenter=0)
|
187
|
+
"""
|
188
|
+
|
189
|
+
def __init__(self, vmin=None, vmax=None, vcenter=None, clip=False):
|
190
|
+
self.vcenter = vcenter
|
191
|
+
super().__init__(vmin, vmax, clip)
|
192
|
+
|
193
|
+
def __call__(self, value, clip=None):
|
194
|
+
x, y = [self.vmin, self.vcenter, self.vmax], [0, 0.5, 1.0]
|
195
|
+
return np.ma.masked_array(np.interp(value, x, y, left=-np.inf, right=np.inf))
|
196
|
+
|
197
|
+
def inverse(self, value):
|
198
|
+
y, x = [self.vmin, self.vcenter, self.vmax], [0, 0.5, 1]
|
199
|
+
return np.interp(value, x, y, left=-np.inf, right=np.inf)
|
200
|
+
|
201
|
+
|
202
|
+
# -----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
135
203
|
|
136
204
|
|
137
205
|
# ** 设置colorbar格式
|
@@ -324,6 +392,7 @@ def plot_quiver(u, v, lon, lat, picname=None, cmap="coolwarm", scale=0.25, width
|
|
324
392
|
plt.close()
|
325
393
|
|
326
394
|
|
395
|
+
# ** 绘制填色图(带经纬度)
|
327
396
|
def plot_contourf_cartopy(data, lon, lat, picname=None, cmap="rainbow", cn_fill_num=20, fig_size=(12, 9), title="Cartopy", land_color="green", ocean_color="lightgrey"):
|
328
397
|
"""
|
329
398
|
param {*} data : 二维数据
|
@@ -419,65 +488,6 @@ def plot_contourf_cartopy(data, lon, lat, picname=None, cmap="rainbow", cn_fill_
|
|
419
488
|
plt.close()
|
420
489
|
|
421
490
|
|
422
|
-
def add_gridlines(ax, projection=ccrs.PlateCarree(), color="k", alpha=0.5, linestyle="--", linewidth=0.5):
|
423
|
-
# add gridlines
|
424
|
-
gl = ax.gridlines(crs=projection, draw_labels=True, linewidth=linewidth, color=color, alpha=alpha, linestyle=linestyle)
|
425
|
-
gl.right_labels = False
|
426
|
-
gl.top_labels = False
|
427
|
-
gl.xformatter = LongitudeFormatter(zero_direction_label=False)
|
428
|
-
gl.yformatter = LatitudeFormatter()
|
429
|
-
|
430
|
-
return ax, gl
|
431
|
-
|
432
|
-
|
433
|
-
def add_cartopy(ax,lon=None,lat=None,projection=ccrs.PlateCarree(), gridlines=True,landcolor="lightgrey",oceancolor="lightblue", cartopy_linewidth=0.5):
|
434
|
-
# Set the projection for the axes
|
435
|
-
ax.set_projection(projection)
|
436
|
-
|
437
|
-
# add coastlines
|
438
|
-
ax.add_feature(cfeature.LAND, facecolor=landcolor)
|
439
|
-
ax.add_feature(cfeature.OCEAN, facecolor=oceancolor)
|
440
|
-
ax.add_feature(cfeature.COASTLINE, linewidth=cartopy_linewidth)
|
441
|
-
ax.add_feature(cfeature.BORDERS, linewidth=cartopy_linewidth, linestyle=":")
|
442
|
-
|
443
|
-
# add gridlines
|
444
|
-
if gridlines:
|
445
|
-
ax, gl = add_gridlines(ax, projection)
|
446
|
-
|
447
|
-
# set longitude and latitude format
|
448
|
-
lon_formatter = LongitudeFormatter(zero_direction_label=False)
|
449
|
-
lat_formatter = LatitudeFormatter()
|
450
|
-
ax.xaxis.set_major_formatter(lon_formatter)
|
451
|
-
ax.yaxis.set_major_formatter(lat_formatter)
|
452
|
-
|
453
|
-
# set extent
|
454
|
-
if lon is not None and lat is not None:
|
455
|
-
lon_min, lon_max = lon.min(), lon.max()
|
456
|
-
lat_min, lat_max = lat.min(), lat.max()
|
457
|
-
ax.set_extent([lon_min, lon_max, lat_min, lat_max], crs=projection)
|
458
|
-
|
459
|
-
|
460
|
-
class MidpointNormalize(mpl.colors.Normalize):
|
461
|
-
'''
|
462
|
-
Description: 自定义归一化类,使得0值处为中心点
|
463
|
-
|
464
|
-
param {*} mpl.colors.Normalize : 继承Normalize类
|
465
|
-
return {*}
|
466
|
-
|
467
|
-
Example:
|
468
|
-
nrom = MidpointNormalize(vmin=-2, vmax=1, vcenter=0)
|
469
|
-
'''
|
470
|
-
def __init__(self, vmin=None, vmax=None, vcenter=None, clip=False):
|
471
|
-
self.vcenter = vcenter
|
472
|
-
super().__init__(vmin, vmax, clip)
|
473
|
-
|
474
|
-
def __call__(self, value, clip=None):
|
475
|
-
x, y = [self.vmin, self.vcenter, self.vmax], [0, 0.5, 1.]
|
476
|
-
return np.ma.masked_array(np.interp(value, x, y, left=-np.inf, right=np.inf))
|
477
|
-
|
478
|
-
def inverse(self, value):
|
479
|
-
y, x = [self.vmin, self.vcenter, self.vmax], [0, 0.5, 1]
|
480
|
-
return np.interp(value, x, y, left=-np.inf, right=np.inf)
|
481
491
|
|
482
492
|
if __name__ == "__main__":
|
483
493
|
# ** 绘制填色图
|
oafuncs/oa_file.py
CHANGED
@@ -18,7 +18,7 @@ import os
|
|
18
18
|
import re
|
19
19
|
import shutil
|
20
20
|
|
21
|
-
__all__ = ["find_file", "link_file", "copy_file", "rename_file", "make_folder", "clear_folder", "
|
21
|
+
__all__ = ["find_file", "link_file", "copy_file", "rename_file", "make_folder", "clear_folder", "remove_empty_folder", "remove", "file_size"]
|
22
22
|
|
23
23
|
|
24
24
|
# ** 查找文件,支持通配符
|
@@ -190,7 +190,7 @@ def rename_file(directory, old_str, new_str):
|
|
190
190
|
|
191
191
|
|
192
192
|
# ** 创建子文件夹(可选清空)
|
193
|
-
def make_folder(rootpath
|
193
|
+
def make_folder(rootpath=None, folder_name=None, clear=0) -> str:
|
194
194
|
"""
|
195
195
|
# 描述:创建子文件夹(可选清空)
|
196
196
|
# 使用示例
|
@@ -200,6 +200,8 @@ def make_folder(rootpath: str, folder_name: str, clear=0) -> str:
|
|
200
200
|
param {*} rootpath # 根目录
|
201
201
|
param {*} folder_name # 文件夹名称
|
202
202
|
"""
|
203
|
+
if rootpath is None:
|
204
|
+
rootpath = os.getcwd()
|
203
205
|
folder_path = os.path.join(str(rootpath), str(folder_name))
|
204
206
|
if clear:
|
205
207
|
shutil.rmtree(folder_path, ignore_errors=True)
|
@@ -233,11 +235,11 @@ def clear_folder(folder_path):
|
|
233
235
|
|
234
236
|
|
235
237
|
# ** 清理空文件夹
|
236
|
-
def
|
238
|
+
def remove_empty_folder(path, print_info=1):
|
237
239
|
"""
|
238
240
|
# 描述:清理空文件夹
|
239
241
|
# 使用示例
|
240
|
-
|
242
|
+
remove_empty_folder(r'E:\Data\2024\09\17', print_info=1)
|
241
243
|
param {*} path # 文件夹路径
|
242
244
|
param {*} print_info # 是否打印信息
|
243
245
|
"""
|
oafuncs/oa_help.py
CHANGED
@@ -1,39 +1,42 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
# coding=utf-8
|
3
|
-
|
3
|
+
"""
|
4
4
|
Author: Liu Kun && 16031215@qq.com
|
5
5
|
Date: 2024-10-06 19:25:29
|
6
6
|
LastEditors: Liu Kun && 16031215@qq.com
|
7
|
-
LastEditTime: 2024-
|
7
|
+
LastEditTime: 2024-12-26 10:43:40
|
8
8
|
FilePath: \\Python\\My_Funcs\\OAFuncs\\oafuncs\\oa_help.py
|
9
|
-
Description:
|
9
|
+
Description:
|
10
10
|
EditPlatform: vscode
|
11
11
|
ComputerInfo: XPS 15 9510
|
12
12
|
SystemInfo: Windows 11
|
13
|
-
Python Version: 3.
|
14
|
-
|
13
|
+
Python Version: 3.12
|
14
|
+
"""
|
15
15
|
|
16
16
|
import oafuncs
|
17
17
|
|
18
|
+
__all__ = ["query", "use"]
|
19
|
+
|
20
|
+
|
18
21
|
def query():
|
19
|
-
|
20
|
-
description: 查看
|
22
|
+
"""
|
23
|
+
description: 查看oafuncs模块的函数列表
|
21
24
|
example: query()
|
22
|
-
|
25
|
+
"""
|
23
26
|
funcs = [func for func in dir(oafuncs) if callable(getattr(oafuncs, func))]
|
24
|
-
print(
|
27
|
+
print("函数数量:")
|
25
28
|
print(len(funcs))
|
26
|
-
print(
|
29
|
+
print("函数列表:")
|
27
30
|
print(funcs)
|
28
31
|
|
29
32
|
|
30
|
-
def use(func=
|
31
|
-
|
33
|
+
def use(func="get_var"):
|
34
|
+
"""
|
32
35
|
description: 查看函数的模块全路径和函数提示
|
33
36
|
param {func} : 函数名
|
34
37
|
example: use('get_var')
|
35
|
-
|
36
|
-
print(
|
37
|
-
print(getattr(oafuncs, func).__module__+
|
38
|
-
print(
|
38
|
+
"""
|
39
|
+
print("模块全路径:")
|
40
|
+
print(getattr(oafuncs, func).__module__ + "." + func)
|
41
|
+
print("函数提示:")
|
39
42
|
print(getattr(oafuncs, func).__doc__)
|
@@ -0,0 +1,93 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: oafuncs
|
3
|
+
Version: 0.0.84
|
4
|
+
Summary: My short description for my project.
|
5
|
+
Home-page: https://github.com/Industry-Pays/OAFuncs
|
6
|
+
Author: Kun Liu
|
7
|
+
Author-email: liukun0312@stu.ouc.edu.cn
|
8
|
+
License: MIT
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Programming Language :: Python
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
17
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
18
|
+
Requires-Python: >=3.9.0
|
19
|
+
Description-Content-Type: text/markdown
|
20
|
+
License-File: LICENSE.txt
|
21
|
+
Requires-Dist: matplotlib
|
22
|
+
Requires-Dist: numpy
|
23
|
+
Requires-Dist: scipy
|
24
|
+
Requires-Dist: xarray
|
25
|
+
Requires-Dist: Cartopy
|
26
|
+
Requires-Dist: netCDF4
|
27
|
+
Requires-Dist: requests
|
28
|
+
Requires-Dist: bs4
|
29
|
+
Requires-Dist: rich
|
30
|
+
Requires-Dist: pathlib
|
31
|
+
Requires-Dist: pandas
|
32
|
+
|
33
|
+
|
34
|
+
# oafuncs
|
35
|
+
|
36
|
+
## Description
|
37
|
+
|
38
|
+
**Python Function**
|
39
|
+
|
40
|
+
```text
|
41
|
+
In the field of geoscience, some commonly used and universal operations!
|
42
|
+
|
43
|
+
Just for the convenience of daily use, some complex operations are integrated into general functions.
|
44
|
+
|
45
|
+
The code will be optimized and updated from time to time, with additions, deletions, or modifications…
|
46
|
+
|
47
|
+
Existing functions will not be completely removed, they might just have a different function name, or the parameter passing might have been optimized…
|
48
|
+
|
49
|
+
Note: If there are any requirements, you can email to liukun0312@stu.ouc.edu.cn. Within my capabilities, I can consider implementing them.
|
50
|
+
```
|
51
|
+
|
52
|
+
## PyPI
|
53
|
+
|
54
|
+
```html
|
55
|
+
https://pypi.org/project/oafuncs
|
56
|
+
```
|
57
|
+
|
58
|
+
## Github
|
59
|
+
|
60
|
+
```html
|
61
|
+
https://github.com/Industry-Pays/OAFuncs
|
62
|
+
```
|
63
|
+
|
64
|
+
## Example
|
65
|
+
|
66
|
+
```python
|
67
|
+
import oafuncs
|
68
|
+
|
69
|
+
# 查询当前所有可用函数
|
70
|
+
oafuncs.oa_help.query()
|
71
|
+
# 根据函数名获取使用方法
|
72
|
+
oafuncs.oa_help.use('query')
|
73
|
+
```
|
74
|
+
|
75
|
+
```shell
|
76
|
+
# 此小板块于2024/12/26更新,仅为示例,不代表最新情况
|
77
|
+
函数数量:
|
78
|
+
49
|
79
|
+
函数列表:
|
80
|
+
['MidpointNormalize', 'add_cartopy', 'add_gridlines', 'add_lonlat_unit', 'check_ncfile', 'choose_cmap', 'clear_folder', 'cmap2colors', 'convert_longitude', 'copy_file', 'create_cmap', 'create_cmap_rgbtxt', 'create_gif', 'download', 'download5doi', 'draw_time_range', 'extract5nc', 'fig_minus', 'file_size', 'find_file', 'get_time_list', 'get_ua', 'get_var', 'how_to_use', 'install_lib', 'interp_2d', 'link_file', 'make_folder', 'merge5nc', 'modify_var_attr', 'modify_var_value', 'nc_isel', 'plot_contourf', 'plot_contourf_cartopy', 'plot_contourf_lonlat', 'plot_quiver', 'query', 'remove', 'remove_empty_folder', 'rename_file', 'rename_var_or_dim', 'send', 'show', 'sign_in_love_ocean', 'sign_in_meteorological_home', 'sign_in_scientific_research', 'upgrade_lib', 'use', 'write2nc']
|
81
|
+
模块全路径:
|
82
|
+
oafuncs.oa_help.query
|
83
|
+
函数提示:
|
84
|
+
|
85
|
+
description: 查看oafuncs模块的函数列表
|
86
|
+
example: query()
|
87
|
+
```
|
88
|
+
|
89
|
+
## Structure
|
90
|
+
|
91
|
+
<img title="" src="./oafuncs/data_store/OAFuncs.png" alt="">
|
92
|
+
|
93
|
+
<img title="OAFuncs" src="https://raw.githubusercontent.com/Industry-Pays/OAFuncs/main/oafuncs/data_store/OAFuncs.png" alt="OAFuncs">
|
@@ -1,24 +1,26 @@
|
|
1
1
|
oafuncs/__init__.py,sha256=glcIlhQ9xSK4WtL58dq7Od2S3JPqsuEyhUQ-VWO8hOc,1426
|
2
|
-
oafuncs/oa_cmap.py,sha256=
|
2
|
+
oafuncs/oa_cmap.py,sha256=rURQujDWzydNVtXOanDtChD248_bapubNsO2dX3Nb-E,6466
|
3
3
|
oafuncs/oa_data.py,sha256=DUKc--EyQfIcxAwy2Rv_oDMuE5uw9CVrt0bMAfVog98,12482
|
4
|
-
oafuncs/oa_draw.py,sha256=
|
5
|
-
oafuncs/oa_file.py,sha256
|
6
|
-
oafuncs/oa_help.py,sha256=
|
4
|
+
oafuncs/oa_draw.py,sha256=cZG4XfHEk2IoyBEQqkWat2CWbuyI7utFU9X4NGFEhuA,21250
|
5
|
+
oafuncs/oa_file.py,sha256=-AdRnFEtRTpIMXr5geYe5fEhyiMOFad5ethi_lF-Ogo,12277
|
6
|
+
oafuncs/oa_help.py,sha256=BFLoOyD5uVeOc8qQ3yAyzIR1q3JAj4GhqQfetd3KML4,1034
|
7
7
|
oafuncs/oa_nc.py,sha256=Gj0xLfqgQI3hNnr9SED1WFj2JU4GsJj2on_8EVdSk20,15595
|
8
8
|
oafuncs/oa_python.py,sha256=XPTP3o7zTFzfJR_YhsKfQksa3bSYwXsne9YxlJplCEA,3994
|
9
|
+
oafuncs/data_store/OAFuncs.png,sha256=C6_1718zWoEvs3QRSt8eWhRedDV4QIhQUKk3LWb1Z6Y,3298028
|
9
10
|
oafuncs/oa_down/User_Agent-list.txt,sha256=pazxSip8_lphEBOPHG902zmIBUg8sBKXgmqp_g6j_E4,661062
|
10
|
-
oafuncs/oa_down/__init__.py,sha256=
|
11
|
-
oafuncs/oa_down/hycom_3hourly.py,sha256=
|
11
|
+
oafuncs/oa_down/__init__.py,sha256=pKPqxD0z09NEXWCemuemfgTct7Kcu3APPJqqB1FPXRM,565
|
12
|
+
oafuncs/oa_down/hycom_3hourly.py,sha256=wYOZrV5mZVSTfx6a5QLay8Jg2sL2x3sWKWmxwidRzMo,62928
|
12
13
|
oafuncs/oa_down/literature.py,sha256=dT3-7-beEzQ9mTP8LNV9Gf3q5Z1Pqqjc6FOS010HZeQ,17833
|
13
14
|
oafuncs/oa_down/test_ua.py,sha256=0IQq3NjqfNr7KkyjS_U-a4mYu-r-E7gzawwo4IfEa6Y,10851
|
15
|
+
oafuncs/oa_down/user_agent.py,sha256=NSJjB2LAqPKS0hErvN5FfwsQeb58XjlOc68emiAK66c,893
|
14
16
|
oafuncs/oa_sign/__init__.py,sha256=QKqTFrJDFK40C5uvk48GlRRbGFzO40rgkYwu6dYxatM,563
|
15
17
|
oafuncs/oa_sign/meteorological.py,sha256=mLbupsZSq427HTfVbZMvIlFzDHwSzQAbK3X19o8anFY,6525
|
16
18
|
oafuncs/oa_sign/ocean.py,sha256=xrW-rWD7xBWsB5PuCyEwQ1Q_RDKq2KCLz-LOONHgldU,5932
|
17
19
|
oafuncs/oa_sign/scientific.py,sha256=a4JxOBgm9vzNZKpJ_GQIQf7cokkraV5nh23HGbmTYKw,5064
|
18
20
|
oafuncs/oa_tool/__init__.py,sha256=IKOlqpWlb4cMDCtq2VKR_RTxQHDNqR_vfqqsOsp_lKQ,466
|
19
21
|
oafuncs/oa_tool/email.py,sha256=4lJxV_KUzhxgLYfVwYTqp0qxRugD7fvsZkXDe5WkUKo,3052
|
20
|
-
oafuncs-0.0.
|
21
|
-
oafuncs-0.0.
|
22
|
-
oafuncs-0.0.
|
23
|
-
oafuncs-0.0.
|
24
|
-
oafuncs-0.0.
|
22
|
+
oafuncs-0.0.84.dist-info/LICENSE.txt,sha256=rMtLpVg8sKiSlwClfR9w_Dd_5WubTQgoOzE2PDFxzs4,1074
|
23
|
+
oafuncs-0.0.84.dist-info/METADATA,sha256=2RgGeH47uDoGAB9Ql0I8CT7AzG3DoMb6xDPDp7NxyCE,3303
|
24
|
+
oafuncs-0.0.84.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
|
25
|
+
oafuncs-0.0.84.dist-info/top_level.txt,sha256=bgC35QkXbN4EmPHEveg_xGIZ5i9NNPYWqtJqaKqTPsQ,8
|
26
|
+
oafuncs-0.0.84.dist-info/RECORD,,
|