pip install pydeep
python
import pydeep
file1 = "/path/to/file1"
file2 = "/path/to/file2"
score = pydeep.compare_files(file1, file2)
print(f"The similarity score between the two files is: {score}")
python
import pydeep
string1 = "This is a sample string"
string2 = "This is another sample string"
score = pydeep.compare_strings(string1, string2)
print(f"The similarity score between the two strings is: {score}")
python
import pydeep
file1 = "/path/to/file1"
file2 = "/path/to/file2"
pydeep.set_hashing_algorithm(pydeep.HashingAlgorithm.SSDEEP)
pydeep.set_block_size(2048)
pydeep.set_similarity_threshold(66)
pydeep.set_buffer_size(8192)
score = pydeep.compare_files(file1, file2)
print(f"The similarity score between the two files is: {score}")