-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
β¨ new ml plugin π update mappings for upside down chars π§ͺ tests added/updated
- Loading branch information
Showing
4 changed files
with
83 additions
and
76 deletions.
There are no files selected for viewing
Submodule chepy_plugins
updated
9 files
+1 β0 | README.md | |
+89 β0 | chepy_ml.py | |
+6 β0 | chepy_ml.pyi | |
+ β | data/ml_detect_encoding.pth | |
+1 β0 | data/ml_labels.json | |
+36 β0 | data/ml_train/fake.py | |
+136 β0 | data/ml_train/train.py | |
+5 β0 | docs/plugins/ml.rst | |
+3 β1 | requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from chepy import Chepy | ||
|
||
|
||
def test_ml_detect(): | ||
data = "04224d184070df280000806147567362473867643239796247516761534268625342684948526c633351675a47463059513d3d00000000" | ||
assert ( | ||
Chepy("https%3A%2F%2Fwww.pennington.com%2Fcategories%2Fwp-content") | ||
.ml_detect() | ||
.o.get("to_url_encode") | ||
!= None | ||
) | ||
assert Chepy(data).ml_detect().o.get("to_hex") != None | ||
assert Chepy(data).from_hex().ml_detect().o.get("lz4_compress") != None | ||
assert ( | ||
Chepy(data).from_hex().lz4_decompress().ml_detect().o.get("to_base64") != None | ||
) | ||
assert ( | ||
Chepy(data).from_hex().lz4_decompress().from_base64().o | ||
== b"hello world i am a test data" | ||
) |