Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added llluiop/0000/DejaVuSansMono-Bold.ttf
Binary file not shown.
Binary file added llluiop/0000/DejaVuSansMono-BoldOblique.ttf
Binary file not shown.
Binary file added llluiop/0000/DejaVuSansMono-Oblique.ttf
Binary file not shown.
Binary file added llluiop/0000/DejaVuSansMono.ttf
Binary file not shown.
25 changes: 25 additions & 0 deletions llluiop/0000/addNumOnPic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python


import os
import Image
import ImageDraw
import ImageFont

def drawFont(img):
font = ImageFont.truetype("DejaVuSansMono.ttf", 20)
draw = ImageDraw.Draw(img)
draw.ink = 255
draw.text((img.size[0] - 20, 5), "2", font=font)


def main():
img = Image.open("avatar.jpg")
drawFont(img)
img.save("avatar_num.jpg")




if __name__ == '__main__':
main()
Binary file added llluiop/0000/avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added llluiop/0000/avatar_num.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions llluiop/0001/InvitationCode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python

import string
from random import *

def basecode():
return string.ascii_uppercase + string.digits

def codes(basecodes):
while True:
yield "".join(choice(basecodes) for x in range(20))


def main():
sets = set()
for code in codes(basecode()):
if len(sets) < 200:
sets.add(code)
else:
break

for s in sets:
print s



if __name__ == "__main__":
main()
36 changes: 36 additions & 0 deletions llluiop/0006/MostWords.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python

import os


def DiaryFiles(path):
if os.path.exists(path):
for file in os.listdir(path):
if 'diary' in file:
yield os.path.join(path, file)

def CalcWords(file, dict1):
f = open(file)
for line in f.readlines():
for word in line.split():
if word in dict1.keys():
dict1[word] += 1
else:
dict1[word] = 1

def Words(path):
dict1 = {}
for file in DiaryFiles(path):
CalcWords(file, dict1)

maxvalue = max(dict1.values())

for key in dict1:
if dict1[key] == maxvalue:
print key,':', maxvalue



if __name__ == '__main__':
Words('diary')

38 changes: 38 additions & 0 deletions llluiop/0006/diary/diary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Shape of my heart

He deals the cards as a meditation
And those he plays never suspect
He doesn't play for the money he wins
He doesn't play for respect
He deals the crads to find the answer
The sacred geometry of chance
The hidden loaw of a probable outcome
The numbers lead a dance

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart
He may play the jack of diamonds
He may lay the queen of spades
He may conceal a king in his hand
While the memory of it fades

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart

And if I told you that I loved you
You'd maybe think there's something wrong
I'm not a man of too many faces
The mask I wear is one
Those who speak know nothing
And find out to their cost
Like those who curse their luck in too many places
And those who fear are lost

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart
3 changes: 3 additions & 0 deletions llluiop/0006/diary/diary1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Shape of my heart


11 changes: 11 additions & 0 deletions llluiop/0006/diary/diary2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Shape of my heart

He deals the cards as a meditation
And those he plays never suspect
He doesn't play for the money he wins
He doesn't play for respect
He deals the crads to find the answer
The sacred geometry of chance
The hidden loaw of a probable outcome
The numbers lead a dance

20 changes: 20 additions & 0 deletions llluiop/0006/diary/diary3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Shape of my heart

He deals the cards as a meditation
And those he plays never suspect
He doesn't play for the money he wins
He doesn't play for respect
He deals the crads to find the answer
The sacred geometry of chance
The hidden loaw of a probable outcome
The numbers lead a dance

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart
He may play the jack of diamonds
He may lay the queen of spades
He may conceal a king in his hand
While the memory of it fades

34 changes: 34 additions & 0 deletions llluiop/0006/diary/diary4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Shape of my heart

He deals the cards as a meditation
And those he plays never suspect
He doesn't play for the money he wins
He doesn't play for respect
He deals the crads to find the answer
The sacred geometry of chance
The hidden loaw of a probable outcome
The numbers lead a dance

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart
He may play the jack of diamonds
He may lay the queen of spades
He may conceal a king in his hand
While the memory of it fades

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart

And if I told you that I loved you
You'd maybe think there's something wrong
I'm not a man of too many faces
The mask I wear is one
Those who speak know nothing
And find out to their cost
Like those who curse their luck in too many places
And those who fear are lost

38 changes: 38 additions & 0 deletions llluiop/0006/diary/diary5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Shape of my heart

He deals the cards as a meditation
And those he plays never suspect
He doesn't play for the money he wins
He doesn't play for respect
He deals the crads to find the answer
The sacred geometry of chance
The hidden loaw of a probable outcome
The numbers lead a dance

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart
He may play the jack of diamonds
He may lay the queen of spades
He may conceal a king in his hand
While the memory of it fades

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart

And if I told you that I loved you
You'd maybe think there's something wrong
I'm not a man of too many faces
The mask I wear is one
Those who speak know nothing
And find out to their cost
Like those who curse their luck in too many places
And those who fear are lost

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart