Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxim Onciul
pi_files
Commits
6effe290
Commit
6effe290
authored
Nov 04, 2021
by
Maxim Onciul
Browse files
verbosity to receiver
parent
1a86e69f
Changes
1
Hide whitespace changes
Inline
Side-by-side
experiment/pi_receive.py
View file @
6effe290
...
...
@@ -6,6 +6,7 @@ import run_pi
def
receive_data
():
print
(
"receiving"
)
config
:
Dict
[
str
,
Any
]
=
run_pi
.
common
()
config
[
"socket"
].
bind
(
config
[
"me"
])
...
...
@@ -19,6 +20,8 @@ def receive_data():
# clean_lines = ["/bin/sed", "-i", "/^$/d", config['cipher_file']]
# subprocess.call(clean_lines)
print
(
"received, decoding"
)
for
idx
in
range
(
config
[
"num_runs"
]):
# as pi2: add corruption, pi1: use received data
...
...
@@ -44,6 +47,8 @@ def receive_data():
subprocess
.
run
(
call
,
encoding
=
"UTF-8"
,
stdin
=
rx_stream
,
stdout
=
reconst
)
print
(
"decoded"
)
if
__name__
==
"__main__"
:
receive_data
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment