devicer.py 0.1.3__py3-none-any.whl → 0.1.5__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.
- devicer/confidence.py +2 -2
- {devicer_py-0.1.3.dist-info → devicer_py-0.1.5.dist-info}/METADATA +1 -1
- devicer_py-0.1.5.dist-info/RECORD +8 -0
- devicer_py-0.1.3.dist-info/RECORD +0 -8
- {devicer_py-0.1.3.dist-info → devicer_py-0.1.5.dist-info}/WHEEL +0 -0
- {devicer_py-0.1.3.dist-info → devicer_py-0.1.5.dist-info}/licenses/license.txt +0 -0
- {devicer_py-0.1.3.dist-info → devicer_py-0.1.5.dist-info}/top_level.txt +0 -0
devicer/confidence.py
CHANGED
@@ -17,7 +17,7 @@ def compare_dictionaries(data1: dict, data2: dict) -> tuple[int, int]:
|
|
17
17
|
for key in data1:
|
18
18
|
if key in data2:
|
19
19
|
fields += 1
|
20
|
-
if isinstance(data1[key], dict):
|
20
|
+
if isinstance(data1[key], dict) and isinstance(data2[key], dict):
|
21
21
|
sub_matches, sub_fields = compare_dictionaries(data1[key], data2[key])
|
22
22
|
matches += sub_matches
|
23
23
|
fields += sub_fields - 1 # Subtract 1 to avoid double counting the key
|
@@ -46,7 +46,7 @@ def calculate_confidence(data1: dict, data2: dict) -> float:
|
|
46
46
|
difference_score = get_hash_difference(hash1, hash2)
|
47
47
|
|
48
48
|
inverse_match_score = 1 - (matches / fields)
|
49
|
-
x =
|
49
|
+
x = difference_score * inverse_match_score
|
50
50
|
if (inverse_match_score == 0 or difference_score == 0):
|
51
51
|
return 100
|
52
52
|
confidence_score = 100 / (1 + math.e ** (-4.5 + (0.25 * x)))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: devicer.py
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.5
|
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>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
devicer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
devicer/confidence.py,sha256=0acgNkuzlVlWEQWTj5J9rJ8JySFcGas20ZRmhtvDTcU,1983
|
3
|
+
devicer/hashing.py,sha256=drqu_9YA7UbcaxgSiD3lWP5qkce6-0c-HHWmqyJi4Tg,645
|
4
|
+
devicer_py-0.1.5.dist-info/licenses/license.txt,sha256=z84l2WzrGJ9egXM0Gcgl2_G1GK_L6OtqP3SBi5aKOxg,1171
|
5
|
+
devicer_py-0.1.5.dist-info/METADATA,sha256=J1MjNOCeK9HArSkYR5BHUPH53bAkHwb2nNzJtFbzvqg,1752
|
6
|
+
devicer_py-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
devicer_py-0.1.5.dist-info/top_level.txt,sha256=U7avJlzadMpnTLycX86eYZWIZxZAffgTkOj0MmZ6VvY,8
|
8
|
+
devicer_py-0.1.5.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
devicer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
devicer/confidence.py,sha256=1pf164jxwaO7OoBzhtClucme63qu8xdXIMhDY3FPieU,1958
|
3
|
-
devicer/hashing.py,sha256=drqu_9YA7UbcaxgSiD3lWP5qkce6-0c-HHWmqyJi4Tg,645
|
4
|
-
devicer_py-0.1.3.dist-info/licenses/license.txt,sha256=z84l2WzrGJ9egXM0Gcgl2_G1GK_L6OtqP3SBi5aKOxg,1171
|
5
|
-
devicer_py-0.1.3.dist-info/METADATA,sha256=Gs_ipuPR2iLk1ZFwrLIsHQdpzs9-TMPlNs3U3Eq8GrM,1752
|
6
|
-
devicer_py-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
devicer_py-0.1.3.dist-info/top_level.txt,sha256=U7avJlzadMpnTLycX86eYZWIZxZAffgTkOj0MmZ6VvY,8
|
8
|
-
devicer_py-0.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|