Commit f2fe8b13 authored by Maxim Onciul's avatar Maxim Onciul
Browse files

correct call

parent 421e9f77
......@@ -9,9 +9,6 @@ def receive_data():
config: Dict[str, Any] = run_pi.common()
# cipher_file: str = '/home/pi/pi_files/exps/' + config['exp'] + "/cipher"
# reconst_file: str = '/home/pi/pi_files/exps/' + config['exp'] + "/reconst"
for idx in range(config["num_runs"]):
config["socket"].bind(config["me"])
with open(config["cipher_file"][idx], "w") as f:
......@@ -22,9 +19,11 @@ def receive_data():
# clean_lines = ["/bin/sed", "-i", "/^$/d", config['cipher_file']]
# subprocess.call(clean_lines)
for idx in range(config["num_runs"]):
# as pi2: add corruption, pi1: use received data
rx_file = run_pi.map_pi(
lambda _, __: config["cipher_file"][idx], lambda _, __: run_pi.create_errs(config)
lambda _, __: config["cipher_file"][idx], lambda _, __: run_pi.create_errs(config, idx)
)
call: List[str] = [config["code"]] + [
......
......@@ -30,6 +30,7 @@ def send_data():
subprocess.run(call, encoding="UTF-8", stdin=plain_data, stdout=outfile)
for idx in range(config["num_runs"]):
# as pi2: add corruption, pi1: use encoded data
tx_file = run_pi.map_pi(
lambda _, __: config["cipher_file"][idx],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment