deeplotx 0.9.10__py3-none-any.whl → 0.9.11__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.
- deeplotx/util/__init__.py +2 -2
- {deeplotx-0.9.10.dist-info → deeplotx-0.9.11.dist-info}/METADATA +2 -2
- {deeplotx-0.9.10.dist-info → deeplotx-0.9.11.dist-info}/RECORD +6 -8
- deeplotx/util/hash.py +0 -29
- deeplotx/util/read_file.py +0 -32
- {deeplotx-0.9.10.dist-info → deeplotx-0.9.11.dist-info}/WHEEL +0 -0
- {deeplotx-0.9.10.dist-info → deeplotx-0.9.11.dist-info}/licenses/LICENSE +0 -0
- {deeplotx-0.9.10.dist-info → deeplotx-0.9.11.dist-info}/top_level.txt +0 -0
deeplotx/util/__init__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
from .hash import
|
2
|
-
from .
|
1
|
+
from vortezwohl.crypt.hash import *
|
2
|
+
from vortezwohl.io import *
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: deeplotx
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.11
|
4
4
|
Summary: An out-of-the-box long-text NLP framework.
|
5
5
|
Requires-Python: >=3.10
|
6
6
|
Description-Content-Type: text/markdown
|
@@ -15,7 +15,7 @@ Requires-Dist: tiktoken
|
|
15
15
|
Requires-Dist: torch
|
16
16
|
Requires-Dist: transformers
|
17
17
|
Requires-Dist: typing-extensions
|
18
|
-
Requires-Dist: vortezwohl>=0.0.
|
18
|
+
Requires-Dist: vortezwohl>=0.0.10
|
19
19
|
Requires-Dist: name4py>=0.1.4
|
20
20
|
Dynamic: license-file
|
21
21
|
|
@@ -27,11 +27,9 @@ deeplotx/similarity/__init__.py,sha256=s3u-KSgxjnMcWpIItKgXNltFMPQ7YY3CqsqHI-5F1
|
|
27
27
|
deeplotx/similarity/distribution.py,sha256=wQGouuuW531pZeBRKBujXsdsoz4fDnPw7_GW81jwepc,1066
|
28
28
|
deeplotx/similarity/set.py,sha256=zhGFxtSIXlWqvipBYzoiPahp4g0boAIoUiMfG0wl07A,686
|
29
29
|
deeplotx/similarity/vector.py,sha256=WVbDHqykt-fvuILVrhUCtIFAOEjY_zvttrXGM9eylG0,1125
|
30
|
-
deeplotx/util/__init__.py,sha256=
|
31
|
-
deeplotx/
|
32
|
-
deeplotx/
|
33
|
-
deeplotx-0.9.
|
34
|
-
deeplotx-0.9.
|
35
|
-
deeplotx-0.9.
|
36
|
-
deeplotx-0.9.10.dist-info/top_level.txt,sha256=hKg4pVDXZ-WWxkRfJFczRIll1Sv7VyfKCmzHLXbuh1U,9
|
37
|
-
deeplotx-0.9.10.dist-info/RECORD,,
|
30
|
+
deeplotx/util/__init__.py,sha256=d1qelOGVTLSsHp1R_gsP_FSMAtAxUxWMwiPrTS58RSg,66
|
31
|
+
deeplotx-0.9.11.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
32
|
+
deeplotx-0.9.11.dist-info/METADATA,sha256=yw4xLxeBE-LP-6QO9WvG2B5npZN0qvy0QmtGHrwxdJw,14444
|
33
|
+
deeplotx-0.9.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
34
|
+
deeplotx-0.9.11.dist-info/top_level.txt,sha256=hKg4pVDXZ-WWxkRfJFczRIll1Sv7VyfKCmzHLXbuh1U,9
|
35
|
+
deeplotx-0.9.11.dist-info/RECORD,,
|
deeplotx/util/hash.py
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
import hashlib
|
2
|
-
|
3
|
-
|
4
|
-
def md5(text: str) -> str:
|
5
|
-
_hash = hashlib.md5()
|
6
|
-
text_bytes = text.encode('utf-8')
|
7
|
-
_hash.update(text_bytes)
|
8
|
-
return _hash.hexdigest()
|
9
|
-
|
10
|
-
|
11
|
-
def sha1(text: str) -> str:
|
12
|
-
_hash = hashlib.sha1()
|
13
|
-
text_bytes = text.encode('utf-8')
|
14
|
-
_hash.update(text_bytes)
|
15
|
-
return _hash.hexdigest()
|
16
|
-
|
17
|
-
|
18
|
-
def sha256(text: str) -> str:
|
19
|
-
_hash = hashlib.sha256()
|
20
|
-
text_bytes = text.encode('utf-8')
|
21
|
-
_hash.update(text_bytes)
|
22
|
-
return _hash.hexdigest()
|
23
|
-
|
24
|
-
|
25
|
-
def sha512(text: str) -> str:
|
26
|
-
_hash = hashlib.sha512()
|
27
|
-
text_bytes = text.encode('utf-8')
|
28
|
-
_hash.update(text_bytes)
|
29
|
-
return _hash.hexdigest()
|
deeplotx/util/read_file.py
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
|
3
|
-
|
4
|
-
def read_file(path: str, encoding: str = 'utf-8') -> str:
|
5
|
-
try:
|
6
|
-
with open(path, mode='r', encoding=encoding) as f:
|
7
|
-
return f.read()
|
8
|
-
except UnicodeDecodeError:
|
9
|
-
try:
|
10
|
-
with open(path, mode='r', encoding='gbk') as f:
|
11
|
-
return f.read()
|
12
|
-
except UnicodeDecodeError:
|
13
|
-
pass
|
14
|
-
|
15
|
-
|
16
|
-
def write_file(content: str | bytes, path: str, encoding: str = 'utf-8') -> str:
|
17
|
-
os.makedirs(os.path.dirname(path), exist_ok=True)
|
18
|
-
if isinstance(content, bytes):
|
19
|
-
with open(path, mode='wb') as f:
|
20
|
-
f.write(content)
|
21
|
-
return path
|
22
|
-
with open(path, mode='w', encoding=encoding) as f:
|
23
|
-
f.write(content)
|
24
|
-
return path
|
25
|
-
|
26
|
-
|
27
|
-
def get_files(path: str) -> list:
|
28
|
-
if os.path.exists(path):
|
29
|
-
entries = os.listdir(path)
|
30
|
-
return [os.path.join(path, entry) for entry in entries if os.path.isfile(os.path.join(path, entry))]
|
31
|
-
else:
|
32
|
-
return []
|
File without changes
|
File without changes
|
File without changes
|