File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ hello
2
+ =====
3
+
4
+ Say hello to GitHub.
Original file line number Diff line number Diff line change
1
+ import Image
2
+ import os
3
+ from datetime import datetime
4
+ from datetime import timedelta
5
+
6
+
7
+ def add_commits (date , n = 1 ):
8
+ for i in xrange (n ):
9
+ os .system ('git commit -m ! --allow-empty --date="%s"' % date )
10
+
11
+
12
+ def process (im ):
13
+ assert (isinstance (im , Image .Image ))
14
+ im = im .convert ('1' )
15
+ xsize , ysize = im .size
16
+ date = datetime .now () - timedelta (xsize * ysize )
17
+ step = timedelta (1 )
18
+
19
+ for x in xrange (xsize ):
20
+ for y in xrange (ysize ):
21
+ pixel = im .getpixel ((x , y ))
22
+
23
+ if pixel == 0 :
24
+ add_commits (date .isoformat (), n = 20 )
25
+
26
+ date += step
27
+
28
+
29
+ if __name__ == '__main__' :
30
+ im = Image .open ('hello.png' )
31
+ process (im )
You can’t perform that action at this time.
0 commit comments