Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
zesje
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Works on my machine
zesje
Commits
eb83ae52
Commit
eb83ae52
authored
5 years ago
by
RABijl
Browse files
Options
Downloads
Patches
Plain Diff
applies style changes mentioned in mr
parent
79c757f0
No related branches found
Branches containing commit
No related tags found
1 merge request
!28
combine precise positioning with pregrading
Pipeline
#18420
passed
5 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
zesje/api/images.py
+2
-2
2 additions, 2 deletions
zesje/api/images.py
zesje/images.py
+1
-1
1 addition, 1 deletion
zesje/images.py
with
3 additions
and
3 deletions
zesje/api/images.py
+
2
−
2
View file @
eb83ae52
...
@@ -68,8 +68,8 @@ def get(exam_id, problem_id, submission_id, full_page=False):
...
@@ -68,8 +68,8 @@ def get(exam_id, problem_id, submission_id, full_page=False):
fb
=
list
(
map
(
lambda
x
:
x
.
id
,
solution
.
feedback
))
fb
=
list
(
map
(
lambda
x
:
x
.
id
,
solution
.
feedback
))
for
option
in
problem
.
mc_options
:
for
option
in
problem
.
mc_options
:
if
option
.
feedback_id
in
fb
:
if
option
.
feedback_id
in
fb
:
x
=
int
(
(
option
.
x
)
/
72
*
dpi
)
x
=
int
(
option
.
x
/
72
*
dpi
)
y
=
int
(
(
option
.
y
)
/
72
*
dpi
)
y
=
int
(
option
.
y
/
72
*
dpi
)
box_length
=
int
(
BOX_SIZE
/
72
*
dpi
)
box_length
=
int
(
BOX_SIZE
/
72
*
dpi
)
x1
=
x
+
box_length
x1
=
x
+
box_length
y1
=
y
+
box_length
y1
=
y
+
box_length
...
...
This diff is collapsed.
Click to expand it.
zesje/images.py
+
1
−
1
View file @
eb83ae52
...
@@ -60,7 +60,7 @@ def fix_corner_markers(corner_keypoints, shape):
...
@@ -60,7 +60,7 @@ def fix_corner_markers(corner_keypoints, shape):
return
corner_keypoints
return
corner_keypoints
if
len
(
corner_keypoints
)
<
3
:
if
len
(
corner_keypoints
)
<
3
:
raise
RuntimeError
(
"
Fewer th
e
n 3 corner markers found while trying to fix corners
"
)
raise
RuntimeError
(
"
Fewer th
a
n 3 corner markers found while trying to fix corners
"
)
x_sep
=
shape
[
1
]
/
2
x_sep
=
shape
[
1
]
/
2
y_sep
=
shape
[
0
]
/
2
y_sep
=
shape
[
0
]
/
2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment