Skip to content

Commit

Permalink
new file: Check_MCUS.py
Browse files Browse the repository at this point in the history
	modified:   Model_T&T.ipynb
  • Loading branch information
Aydinhamedi committed Jan 10, 2024
1 parent ec3cee0 commit 5ef2c05
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 18 deletions.
24 changes: 24 additions & 0 deletions Check_MCUS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import hashlib
import sys

def calculate_hash(file_path):
with open(file_path, 'rb') as file:
bytes = file.read()
readable_hash = hashlib.sha256(bytes).hexdigest()
return readable_hash

def compare_files(file1, file2):
file1_hash = calculate_hash(file1)
file2_hash = calculate_hash(file2)

if file1_hash == file2_hash:
print(f"The files {file1} and {file2} are identical.")
else:
print(f"The files {file1} and {file2} are different.")
sys.exit(1)

# Replace with your file paths
file1 = "Model_T&T.ipynb"
file2 = "BETA_E_Model_T&T.ipynb"

compare_files(file1, file2)
35 changes: 17 additions & 18 deletions Model_T&T.ipynb

Large diffs are not rendered by default.

0 comments on commit 5ef2c05

Please sign in to comment.