Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Grégoire PETIT
DataScience
Commits
3cb481cd
Commit
3cb481cd
authored
Nov 24, 2018
by
Grégoire PETIT
Browse files
init
parent
5c10447b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Challenge3/code/challenge3.py
View file @
3cb481cd
...
...
@@ -84,5 +84,18 @@ print("alt = ",altCaseXY((1560,1590)))
newWidth
=
4830
//
15
newHeigth
=
3510
//
15
graphe
=
[[[
popCaseXY
((
i
*
15
,
j
*
15
)),
altCaseXY
((
i
*
15
,
j
*
15
))]
for
i
in
range
(
newWidth
)]
for
j
in
range
(
newHeigth
)]
graphe
=
[[[
popCaseXY
((
i
*
15
,
j
*
15
)),
altCaseXY
((
i
*
15
,
j
*
15
)),[
0
for
_
in
range
(
15
)]]
for
i
in
range
(
newWidth
)]
for
j
in
range
(
newHeigth
)]
#### initialization of the graph ####
pixelOutOfRize
=
[[
4422
,
2108
],[
4422
,
2109
],[
4422
,
2110
],[
4422
,
2111
],[
4423
,
2109
],[
4423
,
2110
],[
4423
,
2111
],[
4424
,
2110
],[
4425
,
2111
]]
pixelOutOfRize
.
append
([[
i
,
2111
]
for
i
in
range
(
4429
,
4436
)])
pixelOutOfRize
.
append
([[
i
,
2110
]
for
i
in
range
(
4430
,
4436
)])
pixelOutOfRize
.
append
([
4433
,
2109
])
pixelOutOfRize
.
append
([[
4434
,
j
]
for
j
in
range
(
2105
,
2110
)])
pixelOutOfRize
.
append
([[
4435
,
j
]
for
j
in
range
(
2104
,
2110
)])
for
i
in
range
(
4422
,
4436
):
#pixels de rize
for
j
in
range
(
2103
,
2218
):
if
[
i
,
j
]
not
in
pixelOutOfRize
:
graphe
[
i
//
15
][
j
//
15
][
1
]
+=
(
-
getPopXY
(
i
,
j
))
graphe
[
i
//
15
][
j
//
15
][
2
][
0
]
+=
getPopXY
(
i
,
j
)
\ No newline at end of file
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