devicer.py 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {devicer_py-0.1.0 → devicer_py-0.1.1}/PKG-INFO +1 -1
- {devicer_py-0.1.0 → devicer_py-0.1.1}/pyproject.toml +1 -1
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer/confidence.py +5 -2
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer.py.egg-info/PKG-INFO +1 -1
- {devicer_py-0.1.0 → devicer_py-0.1.1}/README.md +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/license.txt +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/setup.cfg +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer/__init__.py +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer/confidence_test.py +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer/data_test.py +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer/hashing.py +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer/hashing_test.py +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer.py.egg-info/SOURCES.txt +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer.py.egg-info/dependency_links.txt +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer.py.egg-info/requires.txt +0 -0
- {devicer_py-0.1.0 → devicer_py-0.1.1}/src/devicer.py.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: devicer.py
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: Open-Source Python Middleware for Digital Fingerprinting
|
5
5
|
Author: One anonymous contributor
|
6
6
|
Author-email: Samuel Roux <sam.roux.com@gmail.com>, Stephen Perso <stephenrperso@gmail.com>
|
@@ -6,7 +6,7 @@ requires = [
|
|
6
6
|
build-backend = "setuptools.build_meta"
|
7
7
|
[project]
|
8
8
|
name = "devicer.py"
|
9
|
-
version = "0.1.
|
9
|
+
version = "0.1.1"
|
10
10
|
authors = [
|
11
11
|
{name = "Samuel Roux", email = "sam.roux.com@gmail.com"},
|
12
12
|
{name = "Stephen Perso", email = "stephenrperso@gmail.com"},
|
@@ -20,7 +20,7 @@ def compare_dictionaries(data1: dict, data2: dict) -> tuple[int, int]:
|
|
20
20
|
if isinstance(data1[key], dict):
|
21
21
|
sub_matches, sub_fields = compare_dictionaries(data1[key], data2[key])
|
22
22
|
matches += sub_matches
|
23
|
-
fields += sub_fields
|
23
|
+
fields += sub_fields - 1 # Subtract 1 to avoid double counting the key
|
24
24
|
elif data1[key] == data2[key]:
|
25
25
|
matches += 1
|
26
26
|
return matches, fields
|
@@ -44,9 +44,12 @@ def calculate_confidence(data1: dict, data2: dict) -> float:
|
|
44
44
|
hash1 = get_tlsh_hash(str(data1).encode('utf-8'))
|
45
45
|
hash2 = get_tlsh_hash(str(data2).encode('utf-8'))
|
46
46
|
difference_score = get_hash_difference(hash1, hash2)
|
47
|
+
|
48
|
+
print(f"Matches: {matches}, Fields: {fields}, Difference Score: {difference_score}")
|
47
49
|
|
48
50
|
inverse_match_score = 1 - (matches / fields)
|
49
51
|
x = (difference_score / 1.5) * inverse_match_score
|
50
52
|
if (inverse_match_score == 0 or difference_score == 0):
|
51
53
|
return 100
|
52
|
-
|
54
|
+
confidence_score = 100 / (1 + math.e ** (-4.5 + (0.25 * x)))
|
55
|
+
return confidence_score
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: devicer.py
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: Open-Source Python Middleware for Digital Fingerprinting
|
5
5
|
Author: One anonymous contributor
|
6
6
|
Author-email: Samuel Roux <sam.roux.com@gmail.com>, Stephen Perso <stephenrperso@gmail.com>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|