-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from greatbuger/master
0000
- Loading branch information
Showing
8 changed files
with
562 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
'''from PIL import Image,ImageFont,ImageDraw | ||
class UnreadTag: | ||
def __init__(self): | ||
self.img = None | ||
self.num = None | ||
def open(self,image_path): | ||
self.img = Image.open(image_path) | ||
return True | ||
def draw(self,tag_num = 1): | ||
tag_size = max(self.img.size[0],self.img.size[1]) / 5 | ||
tag_str = str(tag_num) if tag_num < 100 else '99+' | ||
font = ImageFont.truetype("simsun.ttc",tag_size) | ||
px = self.img.size[0]-font.getsize(tag_str)[0] | ||
draw_pen = ImageDraw.Draw(self.img) | ||
draw_pen.text((px,0), tag_str, (255,0,0), font) | ||
self.img.save('D:/python workSpace/showmethecode/0000/face' + tag_str + '.jpg') | ||
return True | ||
solver = UnreadTag() | ||
solver.open('D:/python workSpace/showmethecode/0000/face.jpg') | ||
solver.draw(25) | ||
''' | ||
|
||
|
||
from PIL import Image,ImageDraw,ImageFont | ||
|
||
class UnreadInformation: | ||
def __init__(self): | ||
self.image = None | ||
self.unread = None | ||
|
||
def open(self,image_path): | ||
self.image = Image.open(image_path) | ||
return True | ||
|
||
def draw(self,unread = 1): | ||
unread_str = str(unread) if unread < 100 else '99+' | ||
unread_size = max(self.image.size[0],self.image.size[1]) / 4 | ||
font = ImageFont.truetype("simsun.ttc",unread_size) | ||
location_x = (self.image.size[0] - font.getsize(unread_str)[0]) | ||
|
||
draw = ImageDraw.Draw(self.image) | ||
draw.text((location_x,0),unread_str,(255,0,0),font) | ||
|
||
self.image.save('D:/python workSpace/showmethecode/0000/face' + unread_str + '.jpg') | ||
return True | ||
|
||
test = UnreadInformation() | ||
test.open('D:/python workSpace/showmethecode/0000/face.jpg') | ||
test.draw(25) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
'''#-*-coding: utf-8-*- | ||
import uuid | ||
class codeGenerate: | ||
def __init__(self): | ||
self.num = 0 | ||
self.list =[] | ||
def generate(self,num): | ||
for i in range(num): | ||
self.list.append(uuid.uuid1()) | ||
def returnList(self): | ||
return self.list | ||
test = codeGenerate() | ||
test.generate(200) | ||
keys = test.returnList() | ||
with open('D:/python workSpace/showmethecode/0001/keys.txt','w') as f: | ||
f.writelines("%s\n"%item for item in keys) | ||
print(len(keys)) | ||
''' | ||
|
||
import uuid | ||
|
||
class generateKeys: | ||
def __init__(self): | ||
self.list = [] | ||
self.id_count = 0 | ||
|
||
def gengrateId(self,id_count): | ||
for i in range(id_count): | ||
self.list.append(uuid.uuid1()) | ||
|
||
def returnList(self): | ||
return self.list | ||
|
||
|
||
test = generateKeys() | ||
test.gengrateId(200) | ||
keys = test.returnList() | ||
|
||
with open('D:/python workSpace/showmethecode/0001/keys1.txt','w') as f: | ||
f.writelines("%s\n" % a for a in keys) | ||
|
||
print(len(keys)) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
ab425bc0-d481-11e4-9ab7-e0db55a8bab9 | ||
ab44a5b0-d481-11e4-9126-e0db55a8bab9 | ||
ab44a5b1-d481-11e4-b602-e0db55a8bab9 | ||
ab44a5b2-d481-11e4-8695-e0db55a8bab9 | ||
ab44a5b3-d481-11e4-94ef-e0db55a8bab9 | ||
ab44a5b4-d481-11e4-a8fc-e0db55a8bab9 | ||
ab44a5b5-d481-11e4-9308-e0db55a8bab9 | ||
ab44a5b6-d481-11e4-afe5-e0db55a8bab9 | ||
ab44a5b7-d481-11e4-bee3-e0db55a8bab9 | ||
ab44a5b8-d481-11e4-bac6-e0db55a8bab9 | ||
ab44a5b9-d481-11e4-89a2-e0db55a8bab9 | ||
ab44a5ba-d481-11e4-a2fa-e0db55a8bab9 | ||
ab44a5bb-d481-11e4-9a64-e0db55a8bab9 | ||
ab44a5bc-d481-11e4-8e2a-e0db55a8bab9 | ||
ab44a5bd-d481-11e4-ad4e-e0db55a8bab9 | ||
ab44a5be-d481-11e4-8b83-e0db55a8bab9 | ||
ab44a5bf-d481-11e4-bd5d-e0db55a8bab9 | ||
ab44a5c0-d481-11e4-93d7-e0db55a8bab9 | ||
ab44a5c1-d481-11e4-86d5-e0db55a8bab9 | ||
ab44a5c2-d481-11e4-a75a-e0db55a8bab9 | ||
ab44a5c3-d481-11e4-b30f-e0db55a8bab9 | ||
ab44a5c4-d481-11e4-8b0d-e0db55a8bab9 | ||
ab44a5c5-d481-11e4-a7d2-e0db55a8bab9 | ||
ab44a5c6-d481-11e4-ae9c-e0db55a8bab9 | ||
ab44a5c7-d481-11e4-a50c-e0db55a8bab9 | ||
ab44a5c8-d481-11e4-9a45-e0db55a8bab9 | ||
ab44a5c9-d481-11e4-9ce9-e0db55a8bab9 | ||
ab44a5ca-d481-11e4-a23f-e0db55a8bab9 | ||
ab44a5cb-d481-11e4-9a70-e0db55a8bab9 | ||
ab44a5cc-d481-11e4-967f-e0db55a8bab9 | ||
ab44a5cd-d481-11e4-b3d2-e0db55a8bab9 | ||
ab44a5ce-d481-11e4-8997-e0db55a8bab9 | ||
ab44a5cf-d481-11e4-9af4-e0db55a8bab9 | ||
ab44a5d0-d481-11e4-8a8c-e0db55a8bab9 | ||
ab44a5d1-d481-11e4-b9f5-e0db55a8bab9 | ||
ab44a5d2-d481-11e4-9f56-e0db55a8bab9 | ||
ab44a5d3-d481-11e4-ab8d-e0db55a8bab9 | ||
ab44a5d4-d481-11e4-b49d-e0db55a8bab9 | ||
ab44a5d5-d481-11e4-8b7f-e0db55a8bab9 | ||
ab44a5d6-d481-11e4-a267-e0db55a8bab9 | ||
ab44a5d7-d481-11e4-acfd-e0db55a8bab9 | ||
ab44a5d8-d481-11e4-ab02-e0db55a8bab9 | ||
ab44a5d9-d481-11e4-afb7-e0db55a8bab9 | ||
ab44a5da-d481-11e4-9cc7-e0db55a8bab9 | ||
ab44a5db-d481-11e4-a328-e0db55a8bab9 | ||
ab44a5dc-d481-11e4-b9a9-e0db55a8bab9 | ||
ab44a5dd-d481-11e4-a16f-e0db55a8bab9 | ||
ab44a5de-d481-11e4-92ab-e0db55a8bab9 | ||
ab44a5df-d481-11e4-90e7-e0db55a8bab9 | ||
ab44a5e0-d481-11e4-8993-e0db55a8bab9 | ||
ab44a5e1-d481-11e4-95d2-e0db55a8bab9 | ||
ab44a5e2-d481-11e4-99b1-e0db55a8bab9 | ||
ab44a5e3-d481-11e4-8e01-e0db55a8bab9 | ||
ab44a5e4-d481-11e4-b0f8-e0db55a8bab9 | ||
ab44a5e5-d481-11e4-8af0-e0db55a8bab9 | ||
ab44a5e6-d481-11e4-ad5c-e0db55a8bab9 | ||
ab44a5e7-d481-11e4-a1a6-e0db55a8bab9 | ||
ab44a5e8-d481-11e4-be98-e0db55a8bab9 | ||
ab44a5e9-d481-11e4-816b-e0db55a8bab9 | ||
ab44a5ea-d481-11e4-8f01-e0db55a8bab9 | ||
ab44a5eb-d481-11e4-818c-e0db55a8bab9 | ||
ab44a5ec-d481-11e4-9d8f-e0db55a8bab9 | ||
ab44a5ed-d481-11e4-9da1-e0db55a8bab9 | ||
ab44a5ee-d481-11e4-a387-e0db55a8bab9 | ||
ab44a5ef-d481-11e4-b3e5-e0db55a8bab9 | ||
ab44a5f0-d481-11e4-b52f-e0db55a8bab9 | ||
ab44a5f1-d481-11e4-b14e-e0db55a8bab9 | ||
ab44a5f2-d481-11e4-af2b-e0db55a8bab9 | ||
ab44a5f3-d481-11e4-8b7a-e0db55a8bab9 | ||
ab44a5f4-d481-11e4-b55c-e0db55a8bab9 | ||
ab44a5f5-d481-11e4-aa88-e0db55a8bab9 | ||
ab44a5f6-d481-11e4-aa7d-e0db55a8bab9 | ||
ab44a5f7-d481-11e4-bee6-e0db55a8bab9 | ||
ab44a5f8-d481-11e4-a173-e0db55a8bab9 | ||
ab44a5f9-d481-11e4-9672-e0db55a8bab9 | ||
ab44a5fa-d481-11e4-95c0-e0db55a8bab9 | ||
ab44a5fb-d481-11e4-b90a-e0db55a8bab9 | ||
ab44a5fc-d481-11e4-9e8a-e0db55a8bab9 | ||
ab44a5fd-d481-11e4-bf07-e0db55a8bab9 | ||
ab44a5fe-d481-11e4-9f56-e0db55a8bab9 | ||
ab44a5ff-d481-11e4-88bc-e0db55a8bab9 | ||
ab44a600-d481-11e4-8f25-e0db55a8bab9 | ||
ab44a601-d481-11e4-bdb7-e0db55a8bab9 | ||
ab44a602-d481-11e4-a15a-e0db55a8bab9 | ||
ab44a603-d481-11e4-b57b-e0db55a8bab9 | ||
ab44a604-d481-11e4-85d4-e0db55a8bab9 | ||
ab44a605-d481-11e4-8eed-e0db55a8bab9 | ||
ab44a606-d481-11e4-97ef-e0db55a8bab9 | ||
ab44a607-d481-11e4-90ea-e0db55a8bab9 | ||
ab44a608-d481-11e4-be43-e0db55a8bab9 | ||
ab44a609-d481-11e4-a021-e0db55a8bab9 | ||
ab44a60a-d481-11e4-ad95-e0db55a8bab9 | ||
ab44a60b-d481-11e4-a9d3-e0db55a8bab9 | ||
ab44a60c-d481-11e4-aee4-e0db55a8bab9 | ||
ab44a60d-d481-11e4-971e-e0db55a8bab9 | ||
ab44a60e-d481-11e4-bcf4-e0db55a8bab9 | ||
ab44a60f-d481-11e4-8857-e0db55a8bab9 | ||
ab44a610-d481-11e4-aae5-e0db55a8bab9 | ||
ab44a611-d481-11e4-8f82-e0db55a8bab9 | ||
ab44a612-d481-11e4-9991-e0db55a8bab9 | ||
ab44a613-d481-11e4-aae6-e0db55a8bab9 | ||
ab44a614-d481-11e4-82a3-e0db55a8bab9 | ||
ab44a615-d481-11e4-af59-e0db55a8bab9 | ||
ab44a616-d481-11e4-9ad2-e0db55a8bab9 | ||
ab44a617-d481-11e4-876b-e0db55a8bab9 | ||
ab44a618-d481-11e4-8ed1-e0db55a8bab9 | ||
ab44a619-d481-11e4-8160-e0db55a8bab9 | ||
ab44a61a-d481-11e4-a9a5-e0db55a8bab9 | ||
ab44a61b-d481-11e4-853d-e0db55a8bab9 | ||
ab44a61c-d481-11e4-8ea9-e0db55a8bab9 | ||
ab44a61d-d481-11e4-bcf8-e0db55a8bab9 | ||
ab44a61e-d481-11e4-98fb-e0db55a8bab9 | ||
ab44a61f-d481-11e4-a24e-e0db55a8bab9 | ||
ab44a620-d481-11e4-b66a-e0db55a8bab9 | ||
ab44a621-d481-11e4-83dc-e0db55a8bab9 | ||
ab44a622-d481-11e4-af55-e0db55a8bab9 | ||
ab44a623-d481-11e4-9e37-e0db55a8bab9 | ||
ab44a624-d481-11e4-9c22-e0db55a8bab9 | ||
ab44a625-d481-11e4-a92d-e0db55a8bab9 | ||
ab44a626-d481-11e4-a727-e0db55a8bab9 | ||
ab44a627-d481-11e4-9d7e-e0db55a8bab9 | ||
ab44a628-d481-11e4-8882-e0db55a8bab9 | ||
ab44a629-d481-11e4-ad08-e0db55a8bab9 | ||
ab44a62a-d481-11e4-ab33-e0db55a8bab9 | ||
ab44a62b-d481-11e4-9a7e-e0db55a8bab9 | ||
ab44a62c-d481-11e4-bbed-e0db55a8bab9 | ||
ab44a62d-d481-11e4-ad85-e0db55a8bab9 | ||
ab44a62e-d481-11e4-81c0-e0db55a8bab9 | ||
ab44a62f-d481-11e4-83a0-e0db55a8bab9 | ||
ab44a630-d481-11e4-9300-e0db55a8bab9 | ||
ab44a631-d481-11e4-bde1-e0db55a8bab9 | ||
ab44a632-d481-11e4-921a-e0db55a8bab9 | ||
ab44a633-d481-11e4-8679-e0db55a8bab9 | ||
ab44a634-d481-11e4-9448-e0db55a8bab9 | ||
ab44a635-d481-11e4-a6e1-e0db55a8bab9 | ||
ab44a636-d481-11e4-b2e5-e0db55a8bab9 | ||
ab44a637-d481-11e4-a954-e0db55a8bab9 | ||
ab44a638-d481-11e4-a349-e0db55a8bab9 | ||
ab44a639-d481-11e4-aecf-e0db55a8bab9 | ||
ab44a63a-d481-11e4-896a-e0db55a8bab9 | ||
ab44a63b-d481-11e4-82d4-e0db55a8bab9 | ||
ab44a63c-d481-11e4-a81f-e0db55a8bab9 | ||
ab44a63d-d481-11e4-b1e6-e0db55a8bab9 | ||
ab44a63e-d481-11e4-a9b5-e0db55a8bab9 | ||
ab44a63f-d481-11e4-8938-e0db55a8bab9 | ||
ab44a640-d481-11e4-8f4b-e0db55a8bab9 | ||
ab44a641-d481-11e4-9042-e0db55a8bab9 | ||
ab44a642-d481-11e4-b8b3-e0db55a8bab9 | ||
ab44a643-d481-11e4-9b17-e0db55a8bab9 | ||
ab44a644-d481-11e4-8306-e0db55a8bab9 | ||
ab44a645-d481-11e4-a1d9-e0db55a8bab9 | ||
ab44a646-d481-11e4-8ba6-e0db55a8bab9 | ||
ab44a647-d481-11e4-8361-e0db55a8bab9 | ||
ab44a648-d481-11e4-9f3c-e0db55a8bab9 | ||
ab44a649-d481-11e4-bb05-e0db55a8bab9 | ||
ab44a64a-d481-11e4-ac62-e0db55a8bab9 | ||
ab44a64b-d481-11e4-8967-e0db55a8bab9 | ||
ab44a64c-d481-11e4-9858-e0db55a8bab9 | ||
ab44a64d-d481-11e4-a2e8-e0db55a8bab9 | ||
ab44a64e-d481-11e4-81bd-e0db55a8bab9 | ||
ab44a64f-d481-11e4-b79c-e0db55a8bab9 | ||
ab44a650-d481-11e4-aa75-e0db55a8bab9 | ||
ab44a651-d481-11e4-b6aa-e0db55a8bab9 | ||
ab44a652-d481-11e4-aabb-e0db55a8bab9 | ||
ab44a653-d481-11e4-bfb6-e0db55a8bab9 | ||
ab44a654-d481-11e4-a131-e0db55a8bab9 | ||
ab44a655-d481-11e4-9ba6-e0db55a8bab9 | ||
ab44a656-d481-11e4-a42b-e0db55a8bab9 | ||
ab44a657-d481-11e4-9607-e0db55a8bab9 | ||
ab44a658-d481-11e4-9479-e0db55a8bab9 | ||
ab44a659-d481-11e4-b6de-e0db55a8bab9 | ||
ab44a65a-d481-11e4-a4e8-e0db55a8bab9 | ||
ab44a65b-d481-11e4-8d60-e0db55a8bab9 | ||
ab44a65c-d481-11e4-9e83-e0db55a8bab9 | ||
ab44a65d-d481-11e4-8be7-e0db55a8bab9 | ||
ab44a65e-d481-11e4-891c-e0db55a8bab9 | ||
ab44a65f-d481-11e4-9818-e0db55a8bab9 | ||
ab44a660-d481-11e4-a70e-e0db55a8bab9 | ||
ab44a661-d481-11e4-bab0-e0db55a8bab9 | ||
ab44a662-d481-11e4-b879-e0db55a8bab9 | ||
ab44a663-d481-11e4-8807-e0db55a8bab9 | ||
ab44a664-d481-11e4-bf55-e0db55a8bab9 | ||
ab44a665-d481-11e4-85e4-e0db55a8bab9 | ||
ab44a666-d481-11e4-ba78-e0db55a8bab9 | ||
ab44a667-d481-11e4-adf0-e0db55a8bab9 | ||
ab44a668-d481-11e4-947d-e0db55a8bab9 | ||
ab44a669-d481-11e4-b156-e0db55a8bab9 | ||
ab44a66a-d481-11e4-b7a9-e0db55a8bab9 | ||
ab44a66b-d481-11e4-b1b7-e0db55a8bab9 | ||
ab44a66c-d481-11e4-b45d-e0db55a8bab9 | ||
ab44a66d-d481-11e4-89d8-e0db55a8bab9 | ||
ab44a66e-d481-11e4-97ec-e0db55a8bab9 | ||
ab44a66f-d481-11e4-9087-e0db55a8bab9 | ||
ab44a670-d481-11e4-9c11-e0db55a8bab9 | ||
ab44a671-d481-11e4-91d8-e0db55a8bab9 | ||
ab44a672-d481-11e4-a950-e0db55a8bab9 | ||
ab44a673-d481-11e4-934a-e0db55a8bab9 | ||
ab44a674-d481-11e4-98d4-e0db55a8bab9 | ||
ab44a675-d481-11e4-a16d-e0db55a8bab9 | ||
ab44a676-d481-11e4-8bb6-e0db55a8bab9 |
Oops, something went wrong.