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
aa23f7d2
Commit
aa23f7d2
authored
Dec 01, 2018
by
Grégoire PETIT
Browse files
pb fixed
parent
b2a13f7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Challenge3/code/challenge3.py
View file @
aa23f7d2
...
...
@@ -112,8 +112,8 @@ def neighbors(node, size):
return
my_neighbors
print
(
"alt = "
,
altCaseXY
((
1560
,
1590
)))
print
(
"pop = "
,
popCaseXY
((
1560
,
1590
)))
print
(
"alt = "
,
altCaseXY
((
1560
//
15
,
1590
//
15
)))
print
(
"pop = "
,
popCaseXY
((
1560
//
15
,
1590
//
15
)))
y
=
1591
...
...
@@ -127,7 +127,7 @@ plt.show()
newWidth
=
4830
//
15
newHeigth
=
3510
//
15
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
)]
graphe
=
[[[
popCaseXY
((
i
,
j
)),
altCaseXY
((
i
,
j
)),[
0
for
_
in
range
(
15
)]]
for
i
in
range
(
newWidth
)]
for
j
in
range
(
newHeigth
)]
...
...
@@ -140,7 +140,7 @@ pixelOutOfRize.append([[4434,j] for j in range(2105,2110)])
pixelOutOfRize
.
append
([[
4435
,
j
]
for
j
in
range
(
2104
,
2110
)])
test
=
0
for
i
in
range
(
4422
,
4436
):
#pixels de rize
for
j
in
range
(
2103
,
2218
):
if
[
i
,
j
]
not
in
pixelOutOfRize
:
...
...
@@ -149,7 +149,8 @@ for i in range(4422,4436): #pixels de rize
graphe
[
j
//
15
][
i
//
15
][
0
]
=
0
if
graphe
[
j
//
15
][
i
//
15
][
0
]
!=
0
:
print
([
i
,
j
],
graphe
[
j
//
15
][
i
//
15
][
0
],
'pop'
)
test
+=
graphe
[
j
//
15
][
i
//
15
][
0
]
print
(
"pop totale de Rize = "
,
test
)
...
...
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