Skip to content

Commit

Permalink
update hash
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonfrailey committed Sep 10, 2021
1 parent 2817fbc commit e87460f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ __pycache__/

# IRS-SOI PUF and related CPS matching data files
puf*.csv
*puf.csv
puf.csv*
cps-matched-puf.csv
StatMatch/Matching/puf2011.csv
cpsmar2016.csv
Expand Down
10 changes: 5 additions & 5 deletions datahashes.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"puf": {
"data": "3a46fe2fa8dfc3588fbfb5b7ada2aeca505f923b525a4f3c99e9e298c63c3629",
"solver": "8d6a334370f9a4b82d79c0e71075473036ae92949275cfe75e20f86e6cbc002e",
"data": "a24282577b3291ea0ddd5377ddfecf3ce656160238df289c641ec93bd6e7bc38",
"solver": "435ab7f39d4b7dd8b12c19f43978c026c39a5fc5af9dd4a88b925287feecc6e9",
"dataprep": "85a9e87a9c978f1e4d558ddc4ecd19a7fe7ffc82883b7306f6857a48a8b6eb00",
"stage2": "1d5a32260fc7410c04a3f6f40a7720ad98a06eb4aa97d99c9ce8c374ba2bde2a"
"stage2": "4e7dff40ab434ae30a6349d769d33695007b08eb120ea784661c646a62a6bfaa"
},
"cps": {
"data": "492ead49db94fc4bb4109c33a6c9679aa32c41042e715333cc84df1fe49e578d",
"solver": "e6ab2d58c285cd7b6002579d1dd312bbcea6a90b5d18001b2c0d2146c7e5af20",
"solver": "0d36a53fbec8850c29b109c309e41648d0737a80643def944efc59d9c804034b",
"dataprep": "a95922179111b9a78f91dc7bc2aeb28a3312900f518d63b47be28910a9b8b2b6",
"stage2": "0fc91b3df816a60c62aee6ff2e4de49d129777c27bd07be7bf2a35133194adb4"
"stage2": "6de103898e065b0847e6fdd2012196bbf194132d62d0ed05f9e5d64fcb4f26a4"
}
}
4 changes: 2 additions & 2 deletions inithash.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create_hashes(_file):
hashes = {}
with open(Path(CUR_PATH, "data", _file), "rb") as f:
hashes["data"] = hashlib.sha256(f.read()).hexdigest()
if _file == "puf.csv":
if _file == "cps-matched-puf.csv":
basepath = Path(CUR_PATH, "puf_stage2")
else:
basepath = Path(CUR_PATH, "cps_stage2")
Expand All @@ -28,7 +28,7 @@ def create_hashes(_file):


finalhashes = {}
finalhashes["puf"] = create_hashes("puf.csv")
finalhashes["puf"] = create_hashes("cps-matched-puf.csv")
finalhashes["cps"] = create_hashes("cps.csv.gz")
with open(Path(CUR_PATH, "datahashes.json"), "w") as f:
json.dump(finalhashes, f, indent=4)
Binary file modified puf_stage2/puf_weights.csv.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions puf_stage2/stage2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# compare hashes of all files used in stage 2 to ensure they didn't change
file_paths = [
Path(CUR_PATH, "..", "data", "puf.csv"),
Path(CUR_PATH, "..", "data", "cps-matched-puf.csv"),
Path(CUR_PATH, "solver.jl"),
Path(CUR_PATH, "dataprep.py"),
Path(CUR_PATH, "stage2.py"),
Expand All @@ -28,7 +28,7 @@
file_hash = hashlib.sha256(f.read()).hexdigest()
files_match = HASHES[key] == file_hash
if not files_match:
print("fail", key)
print(f"{key} has changed")
break

# Read current factors and targets
Expand Down
40 changes: 20 additions & 20 deletions puf_stage3/puf_ratios.csv
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
agi_bin,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
INT2011,1.0259,0.5597,0.9448,0.9681,0.9728,0.9464,0.8390,0.8997,0.9713,0.9239,0.9342,0.9413,0.9497,0.9510,0.9693,0.9702,0.9569,1.0123,1.7014
INT2012,0.7778,0.9454,0.8433,0.8157,0.7153,0.8101,0.7961,0.7940,0.8481,0.9063,0.9130,0.9182,1.0343,1.0435,1.0129,1.1436,1.0975,1.2339,1.3445
INT2013,1.1325,0.7670,0.7821,0.7778,0.8935,0.8699,0.9558,0.9045,0.8342,0.8596,0.9746,1.0271,1.0498,1.0505,1.0891,0.9632,1.0448,0.9690,1.1441
INT2014,0.9106,0.8669,0.8492,0.7737,0.8431,0.8802,0.9729,0.8840,0.8368,1.0108,0.8443,1.0534,1.0274,0.9291,1.0609,1.1524,1.0626,1.0728,1.0862
INT2015,0.9813,0.9511,0.9323,0.9470,0.9543,0.9246,0.9367,0.9315,0.9463,0.9699,0.9891,1.0163,0.9966,0.9906,1.0241,0.9827,1.0221,1.1437,1.1672
INT2016,0.9843,1.0086,1.0453,1.0314,1.0447,1.0342,1.0116,1.0025,1.0025,1.0175,0.9484,0.9531,0.9752,1.0131,1.0723,1.0130,1.0804,1.0810,0.9935
INT2017,0.9902,0.9159,0.8944,0.8905,0.8914,0.9132,0.9153,0.9405,0.9609,0.9758,1.0199,1.0690,1.0327,0.9884,0.9403,0.9756,0.9565,1.0534,1.1945
INT2018,0.9997,0.9757,0.9708,0.9653,0.9791,0.9715,0.9796,0.9768,0.9766,1.0001,0.9899,1.0051,1.0121,1.0064,1.0184,0.9898,1.0194,1.0874,0.9982
INT2019,1.0001,0.9767,0.9756,0.9931,0.9771,0.9816,0.9782,0.9847,0.9803,0.9945,0.9890,1.0094,1.0044,1.0078,0.9978,1.0025,1.0260,1.0297,1.0198
INT2020,1.0022,0.9773,0.9770,0.9762,0.9868,0.9857,0.9862,0.9866,0.9918,0.9976,0.9973,1.0084,1.0047,1.0048,1.0078,0.9979,1.0141,1.0096,1.0108
INT2021,0.9974,0.9816,0.9749,0.9772,0.9776,0.9876,0.9858,0.9862,0.9979,0.9966,1.0013,1.0008,1.0058,1.0118,1.0051,1.0041,1.0299,1.0092,1.0024
INT2022,0.9966,0.9819,0.9788,0.9787,0.9778,0.9821,0.9837,0.9894,0.9900,1.0072,1.0045,1.0043,1.0036,1.0076,1.0058,1.0055,1.0133,0.9977,1.0111
INT2023,1.0094,0.9821,0.9797,0.9789,0.9814,0.9858,0.9865,1.0104,0.9984,0.9934,1.0035,0.9999,1.0034,1.0052,1.0004,1.0089,1.0220,1.0034,0.9943
INT2024,0.9960,0.9845,0.9810,0.9768,0.9760,0.9803,0.9888,1.0139,0.9888,0.9978,0.9995,0.9983,1.0046,1.0064,1.0117,1.0086,1.0240,1.0139,1.0077
INT2025,1.0107,0.9924,0.9761,0.9770,0.9868,0.9850,0.9887,0.9906,0.9921,1.0014,0.9996,0.9956,1.0068,1.0092,1.0148,1.0196,1.0250,0.9948,0.9916
INT2026,1.0110,0.9838,0.9778,0.9810,0.9828,0.9863,1.0079,0.9978,0.9935,0.9969,0.9880,0.9944,1.0043,1.0151,1.0366,1.0221,1.0202,0.9979,0.9936
INT2027,1.0091,0.9907,0.9844,0.9778,0.9897,0.9954,0.9843,0.9907,0.9929,0.9909,1.0018,0.9929,1.0072,1.0188,1.0181,1.0274,1.0248,0.9936,0.9945
INT2028,1.0079,0.9970,0.9744,0.9839,0.9853,0.9853,1.0230,0.9950,0.9898,0.9948,0.9898,0.9918,1.0076,1.0175,1.0251,1.0282,1.0242,0.9953,0.9918
INT2029,1.0113,0.9942,0.9815,0.9826,0.9851,0.9863,0.9932,0.9843,0.9939,0.9902,0.9911,0.9920,1.0065,1.0311,1.0321,1.0462,1.0225,1.0024,0.9923
INT2030,1.0344,1.0017,0.9833,0.9863,0.9805,0.9878,0.9826,0.9802,0.9817,0.9925,0.9851,0.9918,1.0029,1.0350,1.0391,1.0440,1.0297,0.9941,0.9922
INT2031,1.0248,1.0238,0.9865,0.9887,0.9857,0.9938,0.9843,0.9870,0.9871,0.9889,0.9781,0.9875,0.9936,1.0485,1.0491,1.0768,1.0302,1.0057,0.9933
INT2012,0.7778,0.9454,0.8433,0.8152,0.7153,0.8101,0.7961,0.7940,0.8481,0.9063,0.9130,0.9183,1.0343,1.0435,1.0129,1.1436,1.0975,1.2339,1.3445
INT2013,1.1325,0.7670,0.7821,0.7778,0.8935,0.8699,0.9558,0.9049,0.8342,0.8595,0.9745,1.0282,1.0499,1.0505,1.0891,0.9632,1.0451,0.9690,1.1408
INT2014,0.9106,0.8668,0.8492,0.7738,0.8431,0.8802,0.9729,0.8835,0.8368,1.0110,0.8443,1.0522,1.0274,0.9291,1.0609,1.1524,1.0624,1.0732,1.0893
INT2015,0.9813,0.9511,0.9322,0.9470,0.9543,0.9246,0.9367,0.9315,0.9463,0.9698,0.9893,1.0163,0.9966,0.9906,1.0241,0.9827,1.0220,1.1433,1.1671
INT2016,0.9843,1.0087,1.0453,1.0319,1.0447,1.0342,1.0109,1.0031,1.0025,1.0178,0.9482,0.9531,0.9752,1.0131,1.0723,1.0130,1.0804,1.0810,0.9929
INT2017,0.9901,0.9159,0.8944,0.8905,0.8914,0.9132,0.9159,0.9399,0.9609,0.9756,1.0199,1.0692,1.0325,0.9884,0.9403,0.9756,0.9565,1.0534,1.1952
INT2018,0.9998,0.9757,0.9707,0.9653,0.9792,0.9715,0.9796,0.9768,0.9766,1.0002,0.9898,1.0049,1.0123,1.0064,1.0184,0.9898,1.0194,1.0875,0.9982
INT2019,1.0001,0.9766,0.9756,0.9930,0.9770,0.9816,0.9782,0.9847,0.9803,0.9944,0.9892,1.0094,1.0044,1.0078,0.9978,1.0023,1.0260,1.0296,1.0198
INT2020,1.0022,0.9773,0.9770,0.9762,0.9869,0.9857,0.9862,0.9865,0.9918,0.9976,0.9971,1.0084,1.0048,1.0048,1.0078,0.9981,1.0141,1.0096,1.0108
INT2021,0.9974,0.9816,0.9749,0.9772,0.9776,0.9876,0.9858,0.9864,0.9980,0.9966,1.0013,1.0007,1.0058,1.0118,1.0051,1.0041,1.0299,1.0092,1.0024
INT2022,0.9966,0.9818,0.9788,0.9787,0.9778,0.9821,0.9837,0.9894,0.9893,1.0072,1.0048,1.0043,1.0036,1.0076,1.0058,1.0055,1.0133,0.9977,1.0111
INT2023,1.0094,0.9821,0.9797,0.9789,0.9814,0.9858,0.9865,1.0104,0.9989,0.9934,1.0032,1.0000,1.0034,1.0052,1.0004,1.0089,1.0220,1.0034,0.9943
INT2024,0.9960,0.9845,0.9810,0.9769,0.9760,0.9803,0.9889,1.0139,0.9889,0.9978,0.9996,0.9983,1.0046,1.0064,1.0117,1.0086,1.0239,1.0139,1.0077
INT2025,1.0107,0.9924,0.9761,0.9770,0.9868,0.9850,0.9886,0.9907,0.9921,1.0014,0.9994,0.9957,1.0068,1.0092,1.0148,1.0195,1.0251,0.9948,0.9916
INT2026,1.0110,0.9838,0.9778,0.9810,0.9828,0.9877,1.0081,0.9978,0.9935,0.9966,0.9881,0.9944,1.0043,1.0151,1.0367,1.0212,1.0202,0.9979,0.9936
INT2027,1.0091,0.9907,0.9844,0.9778,0.9897,0.9940,0.9843,0.9907,0.9929,0.9912,1.0018,0.9928,1.0072,1.0189,1.0181,1.0283,1.0248,0.9936,0.9945
INT2028,1.0079,0.9970,0.9745,0.9847,0.9853,0.9853,1.0230,0.9950,0.9900,0.9948,0.9898,0.9918,1.0076,1.0172,1.0251,1.0282,1.0238,0.9953,0.9918
INT2029,1.0113,0.9942,0.9814,0.9817,0.9851,0.9862,0.9932,0.9843,0.9938,0.9902,0.9911,0.9920,1.0065,1.0314,1.0321,1.0463,1.0229,1.0024,0.9923
INT2030,1.0344,1.0017,0.9833,0.9863,0.9805,0.9874,0.9826,0.9802,0.9817,0.9925,0.9851,0.9919,1.0029,1.0350,1.0391,1.0439,1.0297,0.9941,0.9922
INT2031,1.0248,1.0237,0.9865,0.9887,0.9857,0.9942,0.9843,0.9870,0.9871,0.9888,0.9780,0.9875,0.9937,1.0485,1.0491,1.0768,1.0302,1.0057,0.9933

0 comments on commit e87460f

Please sign in to comment.