Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit33697d8

Browse files
go on
1 parent1146a94 commit33697d8

File tree

6 files changed

+70
-12
lines changed

6 files changed

+70
-12
lines changed

‎31.py

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,29 @@ def main():
88

99

1010
deffirst_step(input):
11-
im=Image.open(input)
12-
print(im.size)
13-
counter=0
14-
forframeinImageSequence.Iterator(im):
15-
counter+=1
16-
print(counter)
17-
width=640
18-
height=480
19-
forxinrange(width):
20-
foryinrange(height):
21-
print(im.getpixel((x,y)),end=" ")
22-
print()
11+
imgbase=Image.open('ufo/mandelbrot.gif')
12+
img=imgbase.copy()
13+
left=0.34
14+
top=0.57+0.027
15+
width=0.036
16+
height=0.027
17+
max=128
18+
diff= []
19+
forjinrange(imgbase.size[1]):
20+
foriinrange(imgbase.size[0]):
21+
point0=complex(left+i*width/imgbase.size[0],top- (1+j)*height/imgbase.size[1])
22+
point=0+0j
23+
forkinrange(max):
24+
point=point**2+point0
25+
ifpoint.imag**2+point.real**2>4:
26+
break
27+
img.putpixel((i,j),k)
28+
ifk!=imgbase.getpixel((i,j)):
29+
diff.append(k-imgbase.getpixel((i,j)))
30+
img.save('ufo/out31.png')
31+
img2=Image.new('1', (23,73))
32+
img2.putdata([i<0foriindiff])
33+
img2.save('ufo/out31_2.png')
2334

2435

2536
if__name__=="__main__":

‎32.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
defmain():
2+
first_step()
3+
4+
5+
deffirst_step():
6+
pass
7+
8+
9+
if__name__=="__main__":
10+
main()

‎README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#pythonchallenge
22
Solve Problems inhttp://www.pythonchallenge.com
33

4+
####32
5+
#####use wget to download a file provider username and password
6+
1. user:password@domain url
7+
1. --user=${username} --password=${password}
8+
- wgethttp://kohsamui:thailand@www.pythonchallenge.com/pc/rock/warmup.txt
9+
- wget --user=kohsamui --password=thailandwww.pythonchallenge.com/pc/rock/warmup.txt
10+
411
####31
12+
result :http://www.pythonchallenge.com/pc/rock/arecibo.html
13+
- the picture lead to->http://www.pythonchallenge.com/pc/rock/grandpa.html
514
- use firefox visit the url get the hint: island:country
615
- username:kohsamui password:thailand
716

‎ufo/out31.png

73.2 KB
Loading

‎ufo/out31_2.png

282 Bytes
Loading

‎warmup/warmup.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Dimensions
2+
9 9
3+
4+
# Horizontal
5+
2 1 2
6+
1 3 1
7+
5
8+
9+
7
10+
9
11+
3
12+
13+
2 3 2
14+
2 3 2
15+
2 3 2
16+
17+
# Vertical
18+
2 1 3
19+
1 2 3
20+
3
21+
22+
8
23+
9
24+
8
25+
26+
3
27+
1 2 3
28+
2 1 3

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp