Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2018-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
adc2018
adc2018-system
Commits
3712e72e
Commit
3712e72e
authored
Aug 14, 2018
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove software resolver in host
parent
cf46e101
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
12 deletions
+0
-12
main.py
comm/server/main.py
+0
-12
No files found.
comm/server/main.py
View file @
3712e72e
...
...
@@ -152,7 +152,6 @@ def post():
pattern
=
r"judge += +\[(.+?), ([0-9.]+)\]"
m
=
re
.
match
(
pattern
,
nlcheck
)
print
(
nlcheck
,
m
)
if
m
and
(
m
.
group
(
1
)
==
"True"
):
dat
[
"nlcheck"
]
=
float
(
m
.
group
(
2
))
else
:
...
...
@@ -195,22 +194,11 @@ def start():
qstr
=
"
\n
"
.
join
(
_q_lines
)
qnumber
=
_question_name
.
replace
(
".txt"
,
""
)
.
replace
(
"NL_Q"
,
""
)
probpath
=
"{}/{}"
.
format
(
app_args
[
"question"
],
_question_name
)
tmppath
=
"{}/T03_A{}_tmp.txt"
.
format
(
app_args
[
"out"
],
qnumber
)
outpath
=
"{}/T03_A{}.txt"
.
format
(
app_args
[
"out"
],
qnumber
)
res
=
{}
if
line_num
>=
0
:
# LINE_NUMが閾値未満のとき,PYNQに問題を配信して問題を解かせる
res
=
solve_questions
(
_question_name
,
qstr
)
# 整形ルーティング (再配線) する
#cmd = "/home/pi/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
cmd
=
"/home/pi/adc2017/pynq-router/resolver/solver --reroute --output {} {} {}"
.
format
(
outpath
,
probpath
,
tmppath
)
print
(
"`{}`"
.
format
(
cmd
))
subprocess
.
call
(
cmd
.
strip
()
.
split
(
" "
))
# 最終結果だけを保存
questions
[
_question_name
][
"status"
]
=
res
[
"status"
]
...
...
Write
Preview
Markdown
is supported
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