第 0024 题: 使用 Python 的 Web 框架,做一个 Web 版本 TodoList 应用。
+
+
+
+
+
+
第 0025 题: 使用 Python 实现:对着电脑吼一声,自动打开浏览器中的默认网站。
+
+
例如,对着笔记本电脑吼一声“百度”,浏览器自动打开百度首页。
+
+关键字:Speech to Text
+
+
+
参考思路:
+1:获取电脑录音-->WAV文件
+ python record wav
+
+
2:录音文件-->文本
+
+
STT: Speech to Text
+
+STT API Google API
+
+
+
3:文本-->电脑命令
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Something went wrong with that request. Please try again.
+
+
+
+
+
+
+
+
+
+ You signed in with another tab or window. Reload to refresh your session.
+ You signed out in another tab or window. Reload to refresh your session.
+
第 0024 题: 使用 Python 的 Web 框架,做一个 Web 版本 TodoList 应用。
+
+
+
+
+
+
第 0025 题: 使用 Python 实现:对着电脑吼一声,自动打开浏览器中的默认网站。
+
+
例如,对着笔记本电脑吼一声“百度”,浏览器自动打开百度首页。
+
+关键字:Speech to Text
+
+
+
参考思路:
+1:获取电脑录音-->WAV文件
+ python record wav
+
+
2:录音文件-->文本
+
+
STT: Speech to Text
+
+STT API Google API
+
+
+
3:文本-->电脑命令
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Something went wrong with that request. Please try again.
+
+
+
+
+
+
+
+
+
+ You signed in with another tab or window. Reload to refresh your session.
+ You signed out in another tab or window. Reload to refresh your session.
+
+
+
+
+
\ No newline at end of file
diff --git a/Jaccorot/0010/0010.py b/Jaccorot/0010/0010.py
new file mode 100644
index 00000000..21b9a422
--- /dev/null
+++ b/Jaccorot/0010/0010.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python
+#coding=utf-8
+
+"""
+
+第 0010 题:使用 Python 生成字母验证码图片
+
+"""
+
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+import random
+
+IMAGE_MODE = 'RGB'
+IMAGE_BG_COLOR = (255,255,255)
+Image_Font = 'arial.ttf'
+text = ''.join(random.sample('abcdefghijklmnopqrstuvwxyz\
+ABCDEFGHIJKLMNOPQRSTUVWXYZ',4))
+
+def colorRandom():
+ return (random.randint(32,127),random.randint(32,127),random.randint(32,127))
+
+
+#change 噪点频率(%)
+def create_identifying_code(strs, width=400, height=200, chance=2):
+ im = Image.new(IMAGE_MODE, (width, height), IMAGE_BG_COLOR)
+ draw = ImageDraw.Draw(im)
+ #绘制背景噪点
+ for w in xrange(width):
+ for h in xrange(height):
+ if chance < random.randint(1, 100):
+ draw.point((w, h), fill=colorRandom())
+
+ font = ImageFont.truetype(Image_Font, 80)
+ font_width, font_height = font.getsize(strs)
+ strs_len = len(strs)
+ x = (width - font_width)/2
+ y = (height - font_height)/2
+ #逐个绘制文字
+ for i in strs:
+ draw.text((x,y), i, colorRandom(), font)
+ x += font_width/strs_len
+ #模糊
+ im = im.filter(ImageFilter.BLUR)
+ im.save('identifying_code_pic.jpg')
+
+
+if __name__ == '__main__':
+ create_identifying_code(text)
diff --git a/Jaccorot/0010/arial.ttf b/Jaccorot/0010/arial.ttf
new file mode 100644
index 00000000..2107596f
Binary files /dev/null and b/Jaccorot/0010/arial.ttf differ
diff --git a/Jaccorot/0010/identifying_code_pic.jpg b/Jaccorot/0010/identifying_code_pic.jpg
new file mode 100644
index 00000000..61a33564
Binary files /dev/null and b/Jaccorot/0010/identifying_code_pic.jpg differ
diff --git a/Jaccorot/0011/0011.py b/Jaccorot/0011/0011.py
new file mode 100644
index 00000000..0d9d3bca
--- /dev/null
+++ b/Jaccorot/0011/0011.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0011 题: 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,
+否则打印出 Human Rights。
+"""
+
+
+def trans_to_words():
+ type_in = raw_input(">")
+ judge_flag = False
+ with open('filtered_words.txt') as f:
+ text = f.read().decode('utf-8').encode('gbk')
+
+ for i in text.split("\n"):
+ if i in type_in:
+ judge_flag = True
+
+ if judge_flag:
+ print "Freedom"
+ else:
+ print "Human Rights"
+
+
+if __name__ == "__main__":
+ while True:
+ trans_to_words()
diff --git a/Jimmy66/0011/filtered_words.txt b/Jaccorot/0011/filtered_words.txt
similarity index 100%
rename from Jimmy66/0011/filtered_words.txt
rename to Jaccorot/0011/filtered_words.txt
diff --git a/Jaccorot/0012/0012.py b/Jaccorot/0012/0012.py
new file mode 100644
index 00000000..dae4d5e9
--- /dev/null
+++ b/Jaccorot/0012/0012.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0012 题: 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,
+当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+"""
+
+
+def trans_to_words():
+ type_in = raw_input(">")
+ with open('filtered_words.txt') as f:
+ text = f.read().decode('utf-8').encode('gbk')
+ print text.split("\n")
+ for i in text.split("\n"):
+ if i in type_in:
+ type_in = type_in.replace(i, '**')
+ print type_in
+
+if __name__ == "__main__":
+ while True:
+ trans_to_words()
diff --git a/Jimmy66/0012/filtered_words.txt b/Jaccorot/0012/filtered_words.txt
similarity index 100%
rename from Jimmy66/0012/filtered_words.txt
rename to Jaccorot/0012/filtered_words.txt
diff --git a/Jaccorot/0013/0013.py b/Jaccorot/0013/0013.py
new file mode 100644
index 00000000..ad340a09
--- /dev/null
+++ b/Jaccorot/0013/0013.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0013 题: 用 Python 写一个爬图片的程序,爬 这个链接里的日本妹子图片 :-)
+"""
+
+import os
+import urllib
+from bs4 import BeautifulSoup
+from urlparse import urlsplit
+
+
+def catch_tieba_pics(url):
+ content = urllib.urlopen(url)
+ bs = BeautifulSoup(content, 'lxml')
+ for i in bs.find_all('img', {"class": "BDE_Image"}):
+ download_pic(i['src'])
+
+
+def download_pic(url):
+ image_content = urllib.urlopen(url).read()
+ file_name = os.path.basename(urlsplit(url)[2])
+ output = open(file_name, 'wb')
+ output.write(image_content)
+ output.close()
+
+
+if __name__ == '__main__':
+ catch_tieba_pics('http://tieba.baidu.com/p/2166231880')
diff --git a/Jaccorot/0014/0014.py b/Jaccorot/0014/0014.py
new file mode 100644
index 00000000..5eaa5b05
--- /dev/null
+++ b/Jaccorot/0014/0014.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示,
+请将上述内容写到 student.xls 文件中,如下图所示:
+"""
+
+import os
+import json
+import xlwt
+
+def read_txt(path):
+ with open(path, 'r') as f:
+ text = f.read().decode('utf-8')
+ text_json = json.loads(text)
+ return text_json
+
+
+def save_into_excel(content_dict, excel_name):
+ wb = xlwt.Workbook()
+ ws = wb.add_sheet("student", cell_overwrite_ok=True)
+ row = 0
+ col = 0
+
+ for k, v in sorted(content_dict.items(),key=lambda d:d[0]):
+ ws.write(row, col, k)
+ for i in v:
+ col += 1
+ ws.write(row, col, i)
+
+ row += 1
+ col = 0
+
+ wb.save(excel_name)
+
+
+if __name__ == "__main__":
+ read_content = read_txt(os.path.join(os.path.split(__file__)[0], 'student.txt'))
+ save_into_excel(read_content, 'student.xls')
+
+
diff --git a/JiYouMCC/0014/student.txt b/Jaccorot/0014/student.txt
similarity index 100%
rename from JiYouMCC/0014/student.txt
rename to Jaccorot/0014/student.txt
diff --git a/Jaccorot/0015/0015.py b/Jaccorot/0015/0015.py
new file mode 100644
index 00000000..113927c3
--- /dev/null
+++ b/Jaccorot/0015/0015.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+请将上述内容写到 city.xls 文件中,如下图所示:
+"""
+
+import os
+import json
+import xlwt
+
+def read_txt(path):
+ with open(path, 'r') as f:
+ text = f.read().decode('utf-8')
+ text_json = json.loads(text)
+ return text_json
+
+
+def save_into_excel(content_dict, excel_name):
+ wb = xlwt.Workbook()
+ ws = wb.add_sheet("city", cell_overwrite_ok=True)
+ row = 0
+ col = 0
+
+ for k, v in sorted(content_dict.items(),key=lambda d:d[0]):
+ ws.write(row, col, k)
+ col += 1
+ ws.write(row, col, v)
+
+ row += 1
+ col = 0
+
+ wb.save(excel_name)
+
+
+if __name__ == "__main__":
+ read_content = read_txt(os.path.join(os.path.split(__file__)[0], 'city.txt'))
+ save_into_excel(read_content, 'city.xls')
diff --git a/JiYouMCC/0015/city.txt b/Jaccorot/0015/city.txt
similarity index 100%
rename from JiYouMCC/0015/city.txt
rename to Jaccorot/0015/city.txt
diff --git a/Jaccorot/0016/0016.py b/Jaccorot/0016/0016.py
new file mode 100644
index 00000000..c0fe6620
--- /dev/null
+++ b/Jaccorot/0016/0016.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+ 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+"""
+
+import os
+import json
+import xlwt
+
+def read_txt(path):
+ with open(path, 'r') as f:
+ text = f.read().decode('utf-8')
+ text_json = json.loads(text)
+ return text_json
+
+
+def save_into_excel(content_dict, excel_name):
+ wb = xlwt.Workbook()
+ ws = wb.add_sheet("numbers", cell_overwrite_ok=True)
+ row = 0
+ col = 0
+ for i in content_dict:
+ for k in i:
+ ws.write(row, col, k)
+ col += 1
+ row += 1
+ col = 0
+
+ wb.save(excel_name)
+
+
+if __name__ == "__main__":
+ read_content = read_txt(os.path.join(os.path.split(__file__)[0], 'numbers.txt'))
+ save_into_excel(read_content, 'numbers.xls')
diff --git a/Jaccorot/0016/numbers.txt b/Jaccorot/0016/numbers.txt
new file mode 100644
index 00000000..c43c0378
--- /dev/null
+++ b/Jaccorot/0016/numbers.txt
@@ -0,0 +1,5 @@
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
\ No newline at end of file
diff --git a/Jaccorot/0017/0017.py b/Jaccorot/0017/0017.py
new file mode 100644
index 00000000..335c94bc
--- /dev/null
+++ b/Jaccorot/0017/0017.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0017 题: 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+
+
+
+
+{
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+}
+
+
+"""
+
+import xlrd
+import json
+from lxml import etree
+
+
+def read_exl(file_name):
+ exl = xlrd.open_workbook(file_name)
+ exl_sheet = exl.sheet_by_name('student')
+ data = {}
+ for i in range(exl_sheet.nrows):
+ data[exl_sheet.row_values(i)[0]] = exl_sheet.row_values(i)[1:]
+ return json.dumps(data, encoding='utf-8')
+
+def save_to_xml(data, new_file_name):
+ root = etree.Element('root')
+ students = etree.SubElement(root, 'students')
+ students.append(etree.Comment(u"""学生信息表 "id" : [名字, 数学, 语文, 英文]"""))
+ students.text = data
+
+ student_xml = etree.ElementTree(root)
+ student_xml.write(new_file_name, pretty_print=True, xml_declaration=True, encoding='utf-8')
+
+
+if __name__ == '__main__':
+ content = read_exl('student.xls')
+ save_to_xml(content, 'student.xml')
diff --git a/Jaccorot/0017/student.xls b/Jaccorot/0017/student.xls
new file mode 100644
index 00000000..7d5717d8
Binary files /dev/null and b/Jaccorot/0017/student.xls differ
diff --git a/Jaccorot/0017/student.xml b/Jaccorot/0017/student.xml
new file mode 100644
index 00000000..afc2e49e
--- /dev/null
+++ b/Jaccorot/0017/student.xml
@@ -0,0 +1,4 @@
+
+
+ {"1": ["\u5f20\u4e09", 150.0, 120.0, 100.0], "3": ["\u738b\u4e94", 60.0, 66.0, 68.0], "2": ["\u674e\u56db", 90.0, 99.0, 95.0]}
+
diff --git a/Jaccorot/0018/0018.py b/Jaccorot/0018/0018.py
new file mode 100644
index 00000000..bbdaddd2
--- /dev/null
+++ b/Jaccorot/0018/0018.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0018 题: 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+
+
+
+
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+
+
+"""
+
+import xlrd
+import json
+from lxml import etree
+
+
+def read_exl(file_name):
+ exl = xlrd.open_workbook(file_name)
+ exl_sheet = exl.sheet_by_name('city')
+ data = {}
+ for i in range(exl_sheet.nrows):
+ data[exl_sheet.row_values(i)[0]] = exl_sheet.row_values(i)[1]
+ return json.dumps(data, encoding='utf-8')
+
+def save_to_xml(data, new_file_name):
+ root = etree.Element('root')
+ students = etree.SubElement(root, 'citys')
+ students.append(etree.Comment(u"""城市信息"""))
+ students.text = data
+
+ student_xml = etree.ElementTree(root)
+ student_xml.write(new_file_name, pretty_print=True, xml_declaration=True, encoding='utf-8')
+
+
+if __name__ == '__main__':
+ content = read_exl('city.xls')
+ save_to_xml(content, 'city.xml')
diff --git a/Jaccorot/0018/city.xls b/Jaccorot/0018/city.xls
new file mode 100644
index 00000000..ef48fed2
Binary files /dev/null and b/Jaccorot/0018/city.xls differ
diff --git a/Jaccorot/0018/city.xml b/Jaccorot/0018/city.xml
new file mode 100644
index 00000000..14186a8c
--- /dev/null
+++ b/Jaccorot/0018/city.xml
@@ -0,0 +1,4 @@
+
+
+ {"1": "\u4e0a\u6d77", "3": "\u6210\u90fd", "2": "\u5317\u4eac"}
+
diff --git a/Jaccorot/0019/0019.py b/Jaccorot/0019/0019.py
new file mode 100644
index 00000000..4112b3ad
--- /dev/null
+++ b/Jaccorot/0019/0019.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0019 题: 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+
+所示:
+
+
+
+
+
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+
+
+"""
+
+import xlrd
+import json
+from lxml import etree
+
+
+def read_exl(file_name):
+ exl = xlrd.open_workbook(file_name)
+ exl_sheet = exl.sheet_by_name('numbers')
+ data = []
+ for i in range(exl_sheet.nrows):
+ temp = [int(x) for x in exl_sheet.row_values(i) ]
+ data.append(temp)
+ return json.dumps(data, encoding='utf-8')
+
+def save_to_xml(data, new_file_name):
+ root = etree.Element('root')
+ students = etree.SubElement(root, 'numbers')
+ students.append(etree.Comment(u"""数字信息"""))
+ students.text = data
+
+ student_xml = etree.ElementTree(root)
+ student_xml.write(new_file_name, pretty_print=True, xml_declaration=True, encoding='utf-8')
+
+
+if __name__ == '__main__':
+ content = read_exl('numbers.xls')
+ save_to_xml(content, 'numbers.xml')
diff --git a/Jaccorot/0019/numbers.xls b/Jaccorot/0019/numbers.xls
new file mode 100644
index 00000000..769bb4a1
Binary files /dev/null and b/Jaccorot/0019/numbers.xls differ
diff --git a/Jaccorot/0019/numbers.xml b/Jaccorot/0019/numbers.xml
new file mode 100644
index 00000000..1ba54401
--- /dev/null
+++ b/Jaccorot/0019/numbers.xml
@@ -0,0 +1,4 @@
+
+
+ [[1, 82, 65535], [20, 90, 13], [26, 809, 1024]]
+
diff --git a/Jaccorot/0020/0020.py b/Jaccorot/0020/0020.py
new file mode 100644
index 00000000..336126eb
--- /dev/null
+++ b/Jaccorot/0020/0020.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0020 题: 登陆中国联通网上营业厅 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,
+点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日
+通话详单.xls 文件。写代码,对每月通话时间做个统计。
+"""
+
+import xlrd
+
+def count_the_dail_time(filename):
+ excel = xlrd.open_workbook(filename)
+ sheet = excel.sheet_by_index(0)
+ row_nums = sheet.nrows
+ col_nums = sheet.ncols
+ total_time = 0
+ for i in range(1,row_nums):
+ total_time += int(sheet.cell_value(i, 3))
+ return total_time
+
+
+if __name__ == "__main__":
+ total_len = count_the_dail_time("src.xls")
+ print "本月通话时长为" + total_len + "秒"
diff --git a/Jaccorot/0020/src.xls b/Jaccorot/0020/src.xls
new file mode 100644
index 00000000..3eb2fb39
Binary files /dev/null and b/Jaccorot/0020/src.xls differ
diff --git a/Jaccorot/0021/0021.python b/Jaccorot/0021/0021.python
new file mode 100644
index 00000000..ed78b95c
--- /dev/null
+++ b/Jaccorot/0021/0021.python
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+# coding=utf-8
+__author__ = 'Jaccorot'
+
+import os
+from hashlib import sha256
+from hmac import HMAC
+
+def encrypt_password(password, salt=None):
+ if salt is None:
+ salt = os.urandom(8)
+ assert 8 == len(salt)
+ assert isinstance(salt, str)
+
+ if isinstance(password, unicode):
+ password = password.encode('utf-8')
+ assert isinstance(password, str)
+
+ for i in range(10):
+ encrypted = HMAC(password, salt, sha256).digest()
+ return salt + encrypted
+
+
+def validate_password(hashed, password):
+ return hashed == encrypt_password(password, hashed[:8])
+
+
+if __name__ == "__main__":
+ password_new = raw_input("Set your password\n")
+ password_saved = encrypt_password(password_new)
+ password_again = raw_input("Now,type in your password\n")
+ print "Yes,you got it." if validate_password(password_saved, password_again) else "No,it's wrong."
diff --git a/Jaccorot/0022/0.jpg b/Jaccorot/0022/0.jpg
new file mode 100644
index 00000000..82d17e99
Binary files /dev/null and b/Jaccorot/0022/0.jpg differ
diff --git a/Jaccorot/0022/0022.py b/Jaccorot/0022/0022.py
new file mode 100644
index 00000000..f817057b
--- /dev/null
+++ b/Jaccorot/0022/0022.py
@@ -0,0 +1,40 @@
+#!/usr/local/bin/python
+#coding=utf-8
+
+"""
+第 0022 题: iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。
+"""
+import os
+from PIL import Image
+
+PHONE = {'iPhone5':(1136,640), 'iPhone6':(1134,750), 'iPhone6P':(2208,1242)}
+
+
+def resize_pic(path, new_path, phone_type):
+ im = Image.open(path)
+ w,h = im.size
+
+ width,height = PHONE[phone_type]
+
+ if w > width:
+ h = width * h // w
+ w = width
+ if h > height:
+ w = height * w // h
+ h = height
+
+ im_resized = im.resize((w,h), Image.ANTIALIAS)
+ im_resized.save(new_path)
+
+
+def walk_dir_and_resize(path, phone_type):
+ for root, dirs, files in os.walk(path):
+ for f_name in files:
+ if f_name.lower().endswith('jpg'):
+ path_dst = os.path.join(root,f_name)
+ f_new_name = phone_type + '_' + f_name
+ resize_pic(path=path_dst, new_path=f_new_name , phone_type=phone_type)
+
+
+if __name__ == '__main__':
+ walk_dir_and_resize('./', 'iPhone6')
diff --git a/Jaccorot/0023/guestbook.db b/Jaccorot/0023/guestbook.db
new file mode 100644
index 00000000..a693ad0b
Binary files /dev/null and b/Jaccorot/0023/guestbook.db differ
diff --git a/Jaccorot/0023/guestbook.py b/Jaccorot/0023/guestbook.py
new file mode 100644
index 00000000..be75c839
--- /dev/null
+++ b/Jaccorot/0023/guestbook.py
@@ -0,0 +1,75 @@
+import sqlite3
+from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
+from contextlib import closing
+import time
+
+DATABASE = 'guestbook.db'
+DEBUG = True
+SECRET_KEY = 'development key'
+
+app = Flask(__name__)
+app.config.from_object(__name__)
+
+def connect_db():
+ return sqlite3.connect(app.config['DATABASE'])
+
+def init_db():
+ with closing(connect_db()) as db:
+ with app.open_resource('schema.sql', mode='r') as f:
+ db.cursor().executescript(f.read())
+ db.commit()
+
+@app.before_request
+def before_request():
+ g.db = connect_db()
+
+@app.teardown_request
+def teardown_request(exception):
+ db = getattr(g, 'db', None)
+ if db is not None:
+ db.close()
+ g.db.close()
+
+
+@app.route('/')
+def show_entires():
+ cur = g.db.execute('select name,text,time from entries order by id desc')
+ entries = [dict(name=row[0], text=row[1], time=row[2]) for row in cur.fetchall()]
+ for i in entries:
+ print i
+ return render_template('show_entries.html', entries=entries)
+
+@app.route('/add', methods=['POST'])
+def add_entry():
+ if not session.get('logged_in'):
+ abort(401)
+ current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
+ g.db.execute('insert into entries (name, text, time) values (?, ?, ?)',
+ [request.form['name'], request.form['text'], current_time])
+ g.db.commit()
+ flash('New entry was successfully posted')
+ return redirect(url_for('show_entires'))
+
+@app.route('/login', methods=['GET', 'POST'])
+def login():
+ error = None
+ if request.method == 'POST':
+ if request.form['username'] is None:
+ error = "Invalid username"
+ else:
+ session['logged_in'] = True
+ session['name'] = request.form['username']
+ flash('You were logged in')
+ return redirect(url_for('show_entires'))
+ return render_template('login.html', error=error)
+
+@app.route('/logout')
+def logout():
+ session.pop('logged_in', None)
+ flash('You were logged out')
+ return redirect(url_for('show_entires'))
+
+
+
+if __name__ == "__main__":
+ app.run()
diff --git a/Jaccorot/0023/schema.sql b/Jaccorot/0023/schema.sql
new file mode 100644
index 00000000..37d58baa
--- /dev/null
+++ b/Jaccorot/0023/schema.sql
@@ -0,0 +1,7 @@
+DROP TABLE if EXISTS entries;
+CREATE TABLE entries(
+ id INTEGER PRIMARY KEY autoincrement,
+ name text NOT NULL ,
+ text text NOT NULL,
+ time datetime NOT NULL
+);
\ No newline at end of file
diff --git a/Jaccorot/0023/static/style.css b/Jaccorot/0023/static/style.css
new file mode 100644
index 00000000..dbdb6f65
--- /dev/null
+++ b/Jaccorot/0023/static/style.css
@@ -0,0 +1,19 @@
+body { font-family: sans-serif; background: #eee; }
+a, h1, h2 { color: #377ba8; }
+h1, h2 { font-family: 'Georgia', serif; margin: 0; }
+h1 { border-bottom: 2px solid #eee; }
+h2 { font-size: 1.2em; }
+
+.page { margin: 2em auto; width: 35em; border: 5px solid #ccc;
+ padding: 0.8em; background: white; }
+.entries { list-style: none; margin: 0; padding: 0; }
+.entries li { margin: 0.8em 1.2em; }
+.entries li h2 { margin-left: -1em; }
+.add-entry { font-size: 0.9em; border-bottom: 1px solid #ccc; }
+.add-entry dl { font-weight: bold; }
+.metanav { text-align: right; font-size: 0.8em; padding: 0.3em;
+ margin-bottom: 1em; background: #fafafa; }
+.flash { background: #cee5F5; padding: 0.5em;
+ border: 1px solid #aacbe2; }
+.error { background: #f0d6d6; padding: 0.5em; }
+.time { text-align:right; }
\ No newline at end of file
diff --git a/Jaccorot/0023/templates/layout.html b/Jaccorot/0023/templates/layout.html
new file mode 100644
index 00000000..94cfdc84
--- /dev/null
+++ b/Jaccorot/0023/templates/layout.html
@@ -0,0 +1,25 @@
+
+
+
+
+ Guestbook
+
+
+
+
+
Guestbook
+
+ {% if not session.logged_in %}
+ log in
+ {% else %}
+
+
+
\ No newline at end of file
diff --git a/Lyndon1994/0024/__init__.py b/Lyndon1994/0024/__init__.py
new file mode 100644
index 00000000..40a96afc
--- /dev/null
+++ b/Lyndon1994/0024/__init__.py
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-
diff --git a/Lyndon1994/0024/todo.py b/Lyndon1994/0024/todo.py
new file mode 100644
index 00000000..40a96afc
--- /dev/null
+++ b/Lyndon1994/0024/todo.py
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-
diff --git a/Lyndon1994/README.md b/Lyndon1994/README.md
new file mode 100644
index 00000000..7f9b1ae1
--- /dev/null
+++ b/Lyndon1994/README.md
@@ -0,0 +1,2 @@
+# Show-Me-the-Code
+Show Me the Code Python version. https://github.com/Show-Me-the-Code/python
diff --git a/Lyndon1994/source/0004-text.txt b/Lyndon1994/source/0004-text.txt
new file mode 100644
index 00000000..906dc1c9
--- /dev/null
+++ b/Lyndon1994/source/0004-text.txt
@@ -0,0 +1,7 @@
+Architects look at thousands of buildings during their training, and study critiques of those buildings written by masters. In contrast, most software developers only ever get to know a handful of large programs well—usually programs they wrote themselves—and never study the great programs of history. As a result, they repeat one another's mistakes rather than building on one another's successes.
+
+Our goal is to change that. In these two books, the authors of four dozen open source applications explain how their software is structured, and why. What are each program's major components? How do they interact? And what did their builders learn during their development? In answering these questions, the contributors to these books provide unique insights into how they think.
+
+If you are a junior developer, and want to learn how your more experienced colleagues think, these books are the place to start. If you are an intermediate or senior developer, and want to see how your peers have solved hard design problems, these books can help you too.
+
+Follow us on our blog at http://aosabook.org/blog/ or on Twitter at @aosabook and using the #aosa hashtag.
\ No newline at end of file
diff --git a/Lyndon1994/source/0005/pics/17fb7c2dc017eef4d839b311c35a09df18ff6861.jpg b/Lyndon1994/source/0005/pics/17fb7c2dc017eef4d839b311c35a09df18ff6861.jpg
new file mode 100644
index 00000000..c2239b3e
Binary files /dev/null and b/Lyndon1994/source/0005/pics/17fb7c2dc017eef4d839b311c35a09df18ff6861.jpg differ
diff --git a/Lyndon1994/source/0005/pics/1caf792fb6fe974a521128071ef41ef53881c99c.jpg b/Lyndon1994/source/0005/pics/1caf792fb6fe974a521128071ef41ef53881c99c.jpg
new file mode 100644
index 00000000..07934944
Binary files /dev/null and b/Lyndon1994/source/0005/pics/1caf792fb6fe974a521128071ef41ef53881c99c.jpg differ
diff --git a/Lyndon1994/source/0005/pics/21232fa7298b4bdfe4778c25ef24258f6cfb6327.jpg b/Lyndon1994/source/0005/pics/21232fa7298b4bdfe4778c25ef24258f6cfb6327.jpg
new file mode 100644
index 00000000..9e84c32b
Binary files /dev/null and b/Lyndon1994/source/0005/pics/21232fa7298b4bdfe4778c25ef24258f6cfb6327.jpg differ
diff --git a/Lyndon1994/source/0005/pics/348dd2ae5ff6deb6ef7b6bf9ab23e43cf8d8d2c5.jpg b/Lyndon1994/source/0005/pics/348dd2ae5ff6deb6ef7b6bf9ab23e43cf8d8d2c5.jpg
new file mode 100644
index 00000000..f69c3dec
Binary files /dev/null and b/Lyndon1994/source/0005/pics/348dd2ae5ff6deb6ef7b6bf9ab23e43cf8d8d2c5.jpg differ
diff --git a/Lyndon1994/source/0005/pics/46673332eec7befebb70e54652f68423dd15ffbb.jpg b/Lyndon1994/source/0005/pics/46673332eec7befebb70e54652f68423dd15ffbb.jpg
new file mode 100644
index 00000000..c6b9d2da
Binary files /dev/null and b/Lyndon1994/source/0005/pics/46673332eec7befebb70e54652f68423dd15ffbb.jpg differ
diff --git a/Lyndon1994/source/0005/pics/50c0ebe8f13d8c4889faaba4daec14c298fd78a7.jpg b/Lyndon1994/source/0005/pics/50c0ebe8f13d8c4889faaba4daec14c298fd78a7.jpg
new file mode 100644
index 00000000..2ae2800e
Binary files /dev/null and b/Lyndon1994/source/0005/pics/50c0ebe8f13d8c4889faaba4daec14c298fd78a7.jpg differ
diff --git a/Lyndon1994/source/0005/pics/5865440118a1550d8d27c4fdd9d28f6e9efaa99a.jpg b/Lyndon1994/source/0005/pics/5865440118a1550d8d27c4fdd9d28f6e9efaa99a.jpg
new file mode 100644
index 00000000..ffcfbda0
Binary files /dev/null and b/Lyndon1994/source/0005/pics/5865440118a1550d8d27c4fdd9d28f6e9efaa99a.jpg differ
diff --git a/Lyndon1994/source/0005/pics/7bf24be69bee676e503efc0b09caf484db5dd2b9.jpg b/Lyndon1994/source/0005/pics/7bf24be69bee676e503efc0b09caf484db5dd2b9.jpg
new file mode 100644
index 00000000..4e28f702
Binary files /dev/null and b/Lyndon1994/source/0005/pics/7bf24be69bee676e503efc0b09caf484db5dd2b9.jpg differ
diff --git a/Lyndon1994/source/0005/pics/8d1076bccf118eb0145495e3f1babbe1c3b30180.jpg b/Lyndon1994/source/0005/pics/8d1076bccf118eb0145495e3f1babbe1c3b30180.jpg
new file mode 100644
index 00000000..52b00d6f
Binary files /dev/null and b/Lyndon1994/source/0005/pics/8d1076bccf118eb0145495e3f1babbe1c3b30180.jpg differ
diff --git a/Lyndon1994/source/0005/pics/afe35fd64c190588d8bf4a657d02c52ceea875b6.jpg b/Lyndon1994/source/0005/pics/afe35fd64c190588d8bf4a657d02c52ceea875b6.jpg
new file mode 100644
index 00000000..85d18172
Binary files /dev/null and b/Lyndon1994/source/0005/pics/afe35fd64c190588d8bf4a657d02c52ceea875b6.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_17fb7c2dc017eef4d839b311c35a09df18ff6861.jpg b/Lyndon1994/source/0005/result/finish_17fb7c2dc017eef4d839b311c35a09df18ff6861.jpg
new file mode 100644
index 00000000..c2943bf5
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_17fb7c2dc017eef4d839b311c35a09df18ff6861.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_1caf792fb6fe974a521128071ef41ef53881c99c.jpg b/Lyndon1994/source/0005/result/finish_1caf792fb6fe974a521128071ef41ef53881c99c.jpg
new file mode 100644
index 00000000..482ee574
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_1caf792fb6fe974a521128071ef41ef53881c99c.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_21232fa7298b4bdfe4778c25ef24258f6cfb6327.jpg b/Lyndon1994/source/0005/result/finish_21232fa7298b4bdfe4778c25ef24258f6cfb6327.jpg
new file mode 100644
index 00000000..95ea9f45
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_21232fa7298b4bdfe4778c25ef24258f6cfb6327.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_348dd2ae5ff6deb6ef7b6bf9ab23e43cf8d8d2c5.jpg b/Lyndon1994/source/0005/result/finish_348dd2ae5ff6deb6ef7b6bf9ab23e43cf8d8d2c5.jpg
new file mode 100644
index 00000000..946153f6
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_348dd2ae5ff6deb6ef7b6bf9ab23e43cf8d8d2c5.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_46673332eec7befebb70e54652f68423dd15ffbb.jpg b/Lyndon1994/source/0005/result/finish_46673332eec7befebb70e54652f68423dd15ffbb.jpg
new file mode 100644
index 00000000..dcd407f8
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_46673332eec7befebb70e54652f68423dd15ffbb.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_50c0ebe8f13d8c4889faaba4daec14c298fd78a7.jpg b/Lyndon1994/source/0005/result/finish_50c0ebe8f13d8c4889faaba4daec14c298fd78a7.jpg
new file mode 100644
index 00000000..40347a93
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_50c0ebe8f13d8c4889faaba4daec14c298fd78a7.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_5865440118a1550d8d27c4fdd9d28f6e9efaa99a.jpg b/Lyndon1994/source/0005/result/finish_5865440118a1550d8d27c4fdd9d28f6e9efaa99a.jpg
new file mode 100644
index 00000000..78a1ff40
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_5865440118a1550d8d27c4fdd9d28f6e9efaa99a.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_7bf24be69bee676e503efc0b09caf484db5dd2b9.jpg b/Lyndon1994/source/0005/result/finish_7bf24be69bee676e503efc0b09caf484db5dd2b9.jpg
new file mode 100644
index 00000000..73f0e40f
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_7bf24be69bee676e503efc0b09caf484db5dd2b9.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_8d1076bccf118eb0145495e3f1babbe1c3b30180.jpg b/Lyndon1994/source/0005/result/finish_8d1076bccf118eb0145495e3f1babbe1c3b30180.jpg
new file mode 100644
index 00000000..8f0caec6
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_8d1076bccf118eb0145495e3f1babbe1c3b30180.jpg differ
diff --git a/Lyndon1994/source/0005/result/finish_afe35fd64c190588d8bf4a657d02c52ceea875b6.jpg b/Lyndon1994/source/0005/result/finish_afe35fd64c190588d8bf4a657d02c52ceea875b6.jpg
new file mode 100644
index 00000000..7cdf1f2a
Binary files /dev/null and b/Lyndon1994/source/0005/result/finish_afe35fd64c190588d8bf4a657d02c52ceea875b6.jpg differ
diff --git a/Lyndon1994/source/0006/1.txt b/Lyndon1994/source/0006/1.txt
new file mode 100644
index 00000000..254a2332
--- /dev/null
+++ b/Lyndon1994/source/0006/1.txt
@@ -0,0 +1,7 @@
+Dethe is a geek dad, aesthetic programmer, mentor, and creator of the Waterbear visual programming tool. He co-hosts the Vancouver Maker Education Salons and wants to fill the world with robotic origami rabbits.
+
+In block-based programming languages, you write programs by dragging and connecting blocks that represent parts of the program. Block-based languages differ from conventional programming languages, in which you type words and symbols.
+
+Learning a programming language can be difficult because they are extremely sensitive to even the slightest of typos. Most programming languages are case-sensitive, have obscure syntax, and will refuse to run if you get so much as a semicolon in the wrong place—or worse, leave one out. Further, most programming languages in use today are based on English and their syntax cannot be localized.
+
+In contrast, a well-done block language can eliminate syntax errors completely. You can still create a program which does the wrong thing, but you cannot create one with the wrong syntax: the blocks just won't fit that way. Block languages are more discoverable: you can see all the constructs and libraries of the language right in the list of blocks. Further, blocks can be localized into any human language without changing the meaning of the programming language.
\ No newline at end of file
diff --git a/Lyndon1994/source/0006/2.txt b/Lyndon1994/source/0006/2.txt
new file mode 100644
index 00000000..f1fc4500
--- /dev/null
+++ b/Lyndon1994/source/0006/2.txt
@@ -0,0 +1,7 @@
+Block-based languages have a long history, with some of the prominent ones being Lego Mindstorms, Alice3D, StarLogo, and especially Scratch. There are several tools for block-based programming on the web as well: Blockly, AppInventor, Tynker, and many more.
+
+The code in this chapter is loosely based on the open-source project Waterbear, which is not a language but a tool for wrapping existing languages with a block-based syntax. Advantages of such a wrapper include the ones noted above: eliminating syntax errors, visual display of available components, ease of localization. Additionally, visual code can sometimes be easier to read and debug, and blocks can be used by pre-typing children. (We could even go further and put icons on the blocks, either in conjunction with the text names or instead of them, to allow pre-literate children to write programs, but we don't go that far in this example.)
+
+The choice of turtle graphics for this language goes back to the Logo language, which was created specifically to teach programming to children. Several of the block-based languages above include turtle graphics, and it is a small enough domain to be able to capture in a tightly constrained project such as this.
+
+If you would like to get a feel for what a block-based-language is like, you can experiment with the program that is built in this chapter from author's GitHub repository.
\ No newline at end of file
diff --git a/Lyndon1994/source/0006/3.txt b/Lyndon1994/source/0006/3.txt
new file mode 100644
index 00000000..f477eaad
--- /dev/null
+++ b/Lyndon1994/source/0006/3.txt
@@ -0,0 +1,6 @@
+Goals and Structure
+I want to accomplish a couple of things with this code. First and foremost, I want to implement a block language for turtle graphics, with which you can write code to create images through simple dragging-and-dropping of blocks, using as simple a structure of HTML, CSS, and JavaScript as possible. Second, but still important, I want to show how the blocks themselves can serve as a framework for other languages besides our mini turtle language.
+
+To do this, we encapsulate everything that is specific to the turtle language into one file (turtle.js) that we can easily swap with another file. Nothing else should be specific to the turtle language; the rest should just be about handling the blocks (blocks.js and menu.js) or be generally useful web utilities (util.js, drag.js, file.js). That is the goal, although to maintain the small size of the project, some of those utilities are less general-purpose and more specific to their use with the blocks.
+
+One thing that struck me when writing a block language was that the language is its own IDE. You can't just code up blocks in your favourite text editor; the IDE has to be designed and developed in parallel with the block language. This has some pros and cons. On the plus side, everyone will use a consistent environment and there is no room for religious wars about what editor to use. On the downside, it can be a huge distraction from building the block language itself.
\ No newline at end of file
diff --git a/Lyndon1994/source/0011/filtered_words.txt b/Lyndon1994/source/0011/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/Lyndon1994/source/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/Lyndon1994/source/0014/student.txt b/Lyndon1994/source/0014/student.txt
new file mode 100644
index 00000000..f06a601f
--- /dev/null
+++ b/Lyndon1994/source/0014/student.txt
@@ -0,0 +1,5 @@
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
\ No newline at end of file
diff --git a/Lyndon1994/source/0014/student.xls b/Lyndon1994/source/0014/student.xls
new file mode 100644
index 00000000..c8a41564
Binary files /dev/null and b/Lyndon1994/source/0014/student.xls differ
diff --git a/Lyndon1994/source/0014/student.xml b/Lyndon1994/source/0014/student.xml
new file mode 100644
index 00000000..9f7d7661
--- /dev/null
+++ b/Lyndon1994/source/0014/student.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ {
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
+
+
+
\ No newline at end of file
diff --git a/Jimmy66/0015/city.txt b/Lyndon1994/source/0015/city.txt
similarity index 100%
rename from Jimmy66/0015/city.txt
rename to Lyndon1994/source/0015/city.txt
diff --git a/Lyndon1994/source/0015/city.xls b/Lyndon1994/source/0015/city.xls
new file mode 100644
index 00000000..1809fe86
Binary files /dev/null and b/Lyndon1994/source/0015/city.xls differ
diff --git "a/Lyndon1994/source/0020/2017\345\271\26403\346\234\210\350\257\255\351\237\263\351\200\232\344\277\241.xls" "b/Lyndon1994/source/0020/2017\345\271\26403\346\234\210\350\257\255\351\237\263\351\200\232\344\277\241.xls"
new file mode 100644
index 00000000..6f77a985
Binary files /dev/null and "b/Lyndon1994/source/0020/2017\345\271\26403\346\234\210\350\257\255\351\237\263\351\200\232\344\277\241.xls" differ
diff --git a/NKUCodingCat/0024/0024.sql b/NKUCodingCat/0024/0024.sql
deleted file mode 100644
index a07fa402..00000000
--- a/NKUCodingCat/0024/0024.sql
+++ /dev/null
@@ -1,67 +0,0 @@
-# SQL-Front 5.1 (Build 4.16)
-
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */;
-/*!40101 SET SQL_MODE='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */;
-/*!40103 SET SQL_NOTES='ON' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS */;
-/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
-
-
-# Host: localhost Database: 0024
-# ------------------------------------------------------
-# Server version 5.5.38
-
-DROP DATABASE IF EXISTS `0024`;
-CREATE DATABASE `0024` /*!40100 DEFAULT CHARACTER SET utf8 */;
-USE `0024`;
-
-#
-# Source for table code
-#
-
-DROP TABLE IF EXISTS `code`;
-CREATE TABLE `code` (
- `id` int(20) NOT NULL DEFAULT '0',
- `to` text NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-#
-# Dumping data for table code
-#
-
-LOCK TABLES `code` WRITE;
-/*!40000 ALTER TABLE `code` DISABLE KEYS */;
-INSERT INTO `code` VALUES (13,'haiohpd');
-INSERT INTO `code` VALUES (14,'daduwwg');
-INSERT INTO `code` VALUES (9,'7');
-INSERT INTO `code` VALUES (11,'9');
-/*!40000 ALTER TABLE `code` ENABLE KEYS */;
-UNLOCK TABLES;
-
-#
-# Source for table max
-#
-
-DROP TABLE IF EXISTS `max`;
-CREATE TABLE `max` (
- `pro` varchar(255) DEFAULT NULL,
- `max` int(11) NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-#
-# Dumping data for table max
-#
-
-LOCK TABLES `max` WRITE;
-/*!40000 ALTER TABLE `max` DISABLE KEYS */;
-INSERT INTO `max` VALUES ('max',15);
-/*!40000 ALTER TABLE `max` ENABLE KEYS */;
-UNLOCK TABLES;
-
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
diff --git a/NKUCodingCat/0024/SQLIO.py b/NKUCodingCat/0024/SQLIO.py
deleted file mode 100644
index 910189d9..00000000
--- a/NKUCodingCat/0024/SQLIO.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#coding=utf-8
-import time, os, json, MySQLdb, HTMLParser, cgi
-def SQL_init():
- db = MySQLdb.connect("127.0.0.1","root","root","0024" )
- return db.cursor()
-def SQL_max(new=None):
- cursor = SQL_init()
- if new != None:
- sql="""UPDATE `max` SET `max`=%d WHERE `pro`='max'"""%new
- cursor.execute(sql)
- return True
- else:
- sql="""SELECT * FROM `max` WHERE `pro`='max'"""
- cursor.execute(sql)
- max = cursor.fetchall()[0][1]
- SQL_max(max+1)
- return max
-def SQL_in(task):
- max = SQL_max()
- cursor = SQL_init()
- sql = """INSERT INTO `code` SET `id`=%d,`to`='%s';"""%(max, task)
- cursor.execute(sql)
- return True
-def SQL_out():
- cursor = SQL_init()
- sql = """SELECT * FROM `code`"""
- cursor.execute(sql)
- return cursor.fetchall()
-def SQL_del(id):
- cursor = SQL_init()
- sql = """DELETE FROM `code` WHERE `id`=%d"""%id
- cursor.execute(sql)
- return json.dumps(cursor.fetchall())
-#-----------
-Temp = """
-
-
%s
-
-
-
-
-
-"""
-
-
-def PageMake():
- Data = SQL_out()
- All = ""
- Data = sorted(Data,key=lambda a:a[0] )
- for i in Data:
- #print i
- All+=Temp%(str(i[1]),int(i[0]))
- return All
\ No newline at end of file
diff --git a/NKUCodingCat/0024/main.py b/NKUCodingCat/0024/main.py
deleted file mode 100644
index ba03e834..00000000
--- a/NKUCodingCat/0024/main.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#coding=utf-8
-const = """
-
-
-
-
-
-
-
-
-
TodoList应用演示
-
-
-
-
-
-
-"""
-
-
-from bottle import static_file,route, run, post, request, redirect, error
-import os, urllib,re,json,time
-Root = os.path.split(os.path.realpath(__file__))[0]+"/static/"
-import SQLIO
-
-@route('/todo')
-def index():
- return const.format(SQLIO.PageMake(),)
-@post('/todo')
-def Accept():
- Req = request.body.read()
- L = re.split("&",Req)
- M = {}
- for i in L:
- A = re.split("=",i)
- M[A[0]] = urllib.unquote(A[1])
- for j in M.keys():
- if re.findall("id-",j):
- SQLIO.SQL_del(int(j[3:]))
- redirect('/todo', 302)
- try:
- type = M["new"]
- newtask = M["newtask"]
- except:
- redirect('/error', 404)
- if newtask != "":
- SQLIO.SQL_in(newtask)
- redirect('/todo', 302)
- else:
- return "=.=所以你想添加什么任务呀"
-
-@route('/error')
-def err():
- return "虽然不知道你在干什么但是触发了服务器错误呢"
-@route('/static/')
-def server_static(filename):
- return static_file(filename, root=Root)
-run(host='localhost',port=8080)
\ No newline at end of file
diff --git a/NKUCodingCat/0024/static/css.css b/NKUCodingCat/0024/static/css.css
deleted file mode 100644
index da2076eb..00000000
--- a/NKUCodingCat/0024/static/css.css
+++ /dev/null
@@ -1 +0,0 @@
-h1{color:green;}table,th,td{border:1px solid blue;}table{border-collapse:collapse;width:100%;}th{height:50px;}td.task{width:70%;}input#delete{font-size:15px;color:blue;background-color:#FFFFFF;border-width:0;cursor:pointer;}textarea{vertical-align:middle;width:500px;height:100px;}input#submit{width:107px;height:42px;border-width:0;font-size:17px;font-weight:500;border-radius:6px;cursor:pointer;}
\ No newline at end of file
diff --git a/NecoSama/README.md b/NecoSama/README.md
new file mode 100644
index 00000000..da4593c4
--- /dev/null
+++ b/NecoSama/README.md
@@ -0,0 +1,2 @@
+# My Repository
+My solution is shown as the url:
diff --git a/PyBeaner/0001/coupon.py b/PyBeaner/0001/coupon.py
new file mode 100644
index 00000000..460b6182
--- /dev/null
+++ b/PyBeaner/0001/coupon.py
@@ -0,0 +1,30 @@
+__author__ = 'PyBeaner'
+from random import choice
+import string
+
+chars = string.ascii_uppercase + string.digits
+
+
+def generate_coupons(count, coupon_length=5):
+ coupons = []
+ for i in range(count):
+ coupon = generate_one_coupon(coupon_length=coupon_length)
+ while coupon in coupons:
+ coupon = generate_one_coupon(coupon_length)
+
+ coupons.append(coupon)
+
+ return coupons
+
+
+def generate_one_coupon(coupon_length=5):
+ coupon = []
+ for i in range(coupon_length):
+ ch = choice(chars)
+ coupon.append(ch)
+ return "".join(coupon)
+
+
+if __name__ == '__main__':
+ coupons = generate_coupons(200, 5)
+ print(coupons)
diff --git a/PyBeaner/0002/save_to_mysql.py b/PyBeaner/0002/save_to_mysql.py
new file mode 100644
index 00000000..a9a7f9bf
--- /dev/null
+++ b/PyBeaner/0002/save_to_mysql.py
@@ -0,0 +1,26 @@
+__author__ = 'PyBeaner'
+import pymysql.cursors
+
+
+def save_to_mysql(coupons):
+ try:
+ connection = pymysql.connect(host='localhost',
+ user='user',
+ passwd='passwd',
+ db='db',
+ cursorclass=pymysql.cursors.DictCursor)
+
+ with connection.cursor() as cursor:
+ select_sql = "SELECT coupon FROM coupons where coupon='%s'"
+ insert_sql = "INSERT INTO coupons VALUES (%s);"
+ for coupon in coupons:
+ cursor.excute(select_sql, (coupon,))
+ result = cursor.fetchone()
+ if result:
+ continue
+
+ cursor.excute(insert_sql, (coupon,))
+
+ connection.commit()
+ finally:
+ connection.close()
diff --git a/PyBeaner/0004/wc.py b/PyBeaner/0004/wc.py
new file mode 100644
index 00000000..8af8b03a
--- /dev/null
+++ b/PyBeaner/0004/wc.py
@@ -0,0 +1,11 @@
+from collections import Counter
+import re
+
+__author__ = "PyBeaner"
+
+with open(r"F:\Program Files\Git\doc\git\html\RelNotes\1.5.0.1.txt") as f:
+ word_pat = re.compile("^[A-Za-z]+$")
+ file_words = [word for line in f for word in line.split()
+ if len(word) > 1 and word_pat.match(word)]
+
+print(Counter(file_words))
diff --git a/PyBeaner/0007/code_lines.py b/PyBeaner/0007/code_lines.py
new file mode 100644
index 00000000..81484695
--- /dev/null
+++ b/PyBeaner/0007/code_lines.py
@@ -0,0 +1,43 @@
+# coding=utf-8
+__author__ = 'PyBeaner'
+import os
+import fnmatch
+
+total_lines = 0
+code_lines = 0
+empty_lines = 0
+comment_lines = 0
+
+
+def count_line(line):
+ line = line.lstrip()
+ global comment_lines, empty_lines, total_lines, code_lines
+
+ total_lines += 1
+ if line.startswith("#"):
+ comment_lines += 1
+ elif not line:
+ empty_lines += 1
+ else:
+ code_lines += 1
+
+
+def scan_dir(directory, suffix="*.py"):
+ directory = os.path.abspath(directory)
+ print("Scanning files in %s ..." % directory)
+ for cur_dir, dirs, files in os.walk(directory):
+ for file in files:
+ if not fnmatch.fnmatch(file, suffix):
+ continue
+ file_path = os.path.join(cur_dir, file)
+ with open(file_path, errors="replace") as f:
+ for line in f:
+ count_line(line)
+
+
+if __name__ == '__main__':
+ scan_dir(r"../..")
+ print("Total lines:%d" % total_lines)
+ print("Code lines:%d" % code_lines)
+ print("Empty lines:%d" % empty_lines)
+ print("Comment lines:%d" % comment_lines)
diff --git a/PyBeaner/0008/text_in_html.py b/PyBeaner/0008/text_in_html.py
new file mode 100644
index 00000000..a184018d
--- /dev/null
+++ b/PyBeaner/0008/text_in_html.py
@@ -0,0 +1,21 @@
+# coding=utf-8
+__author__ = 'PyBeaner'
+from bs4 import BeautifulSoup
+
+
+def get_text(html):
+ soup = BeautifulSoup(html)
+ return soup.text
+
+
+if __name__ == '__main__':
+ import requests
+
+ r = requests.get("https://github.com/")
+ html = r.text
+ text = get_text(html)
+ with open("html.txt", "w+", errors="replace") as f:
+ print(text, file=f)
+ f.seek(0)
+ for line in f:
+ print(line)
diff --git a/PyBeaner/0009/link_in_html.py b/PyBeaner/0009/link_in_html.py
new file mode 100644
index 00000000..f78f8d07
--- /dev/null
+++ b/PyBeaner/0009/link_in_html.py
@@ -0,0 +1,22 @@
+# coding=utf-8
+__author__ = 'PyBeaner'
+from bs4 import BeautifulSoup
+
+
+def get_links(html):
+ soup = BeautifulSoup(html)
+ links = []
+ for link in soup.find_all("a"):
+ href = link["href"]
+ if href.startswith("http"):
+ links.append(href)
+ return links
+
+
+if __name__ == '__main__':
+ import requests
+
+ r = requests.get("https://github.com/")
+ html = r.text
+ links = get_links(html)
+ print(links)
diff --git a/PyBeaner/0011/filter.py b/PyBeaner/0011/filter.py
new file mode 100644
index 00000000..03633390
--- /dev/null
+++ b/PyBeaner/0011/filter.py
@@ -0,0 +1,9 @@
+__author__ = 'PyBeaner'
+
+words = open("filtered_words.txt").read().split()
+
+word = input("Please Input an word:")
+if word in words:
+ print("Freedom")
+else:
+ print("Human Rights")
diff --git a/PyBeaner/0011/filtered_words.txt b/PyBeaner/0011/filtered_words.txt
new file mode 100644
index 00000000..444eb7c6
--- /dev/null
+++ b/PyBeaner/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/PyBeaner/0012/filter.py b/PyBeaner/0012/filter.py
new file mode 100644
index 00000000..4e272ce6
--- /dev/null
+++ b/PyBeaner/0012/filter.py
@@ -0,0 +1,9 @@
+__author__ = 'PyBeaner'
+words = open("filtered_words.txt").read().split()
+
+user_input = input("Please Input an word:")
+
+for word in words:
+ user_input = user_input.replace(word, "*" * len(word))
+
+print(user_input)
diff --git a/PyBeaner/0012/filtered_words.txt b/PyBeaner/0012/filtered_words.txt
new file mode 100644
index 00000000..444eb7c6
--- /dev/null
+++ b/PyBeaner/0012/filtered_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/PyBeaner/__init__.py b/PyBeaner/__init__.py
new file mode 100644
index 00000000..88c7a442
--- /dev/null
+++ b/PyBeaner/__init__.py
@@ -0,0 +1 @@
+__author__ = 'PyBeaner'
diff --git a/README.md b/README.md
index 35ee7952..5d75dd92 100644
--- a/README.md
+++ b/README.md
@@ -3,23 +3,25 @@ python
Show Me the Code Python version.
+2015年8月10日更新:
+【注】Pull Request 请提交你个人的仓库 URL 链接地址。
### How to Add your solutions:
- * fork this repo
- * create a folder named with your github name
- * create a folder named the problem num
- * add your solution in the folder
+ * Fork this repo.
+ * Create a folder named with your github name.
+ * Create a folder named the problem num.
+ * Add your solution in the folder.
For example, if you wanna add a solution for problem 0001, you should do like this:
- * fork Show-Me-the-Code/python
- * git clone YOUR_REPO_URL SOME_DIR
- * cd SOME_DIR
- * mkdir YOUR_GITHUB_USER_NAME
- * cd YOU_GITHUB_USER_NAME
- * mkdir 0001
- * cd 0001
- * and the write some code & test it
+ * Fork `Show-Me-the-Code/python`.
+ * git clone `YOUR_REPO_URL SOME_DIR`.
+ * cd `SOME_DIR`.
+ * mkdir `YOUR_GITHUB_USER_NAME`.
+ * cd `YOU_GITHUB_USER_NAME`.
+ * mkdir `0001`.
+ * cd `0001`.
+ * and the write some code & test it.
-if all these steps done, send us an pull request. After we accepte your request, we'll invite you to this group.
+If all these steps done, send us an pull request. After we accept your request, we'll invite you to this group.
diff --git a/ShaoyuanLi/0000/a.png b/ShaoyuanLi/0000/a.png
new file mode 100644
index 00000000..5f6b0113
Binary files /dev/null and b/ShaoyuanLi/0000/a.png differ
diff --git a/ShaoyuanLi/0000/example.py b/ShaoyuanLi/0000/example.py
new file mode 100644
index 00000000..c04af4d6
--- /dev/null
+++ b/ShaoyuanLi/0000/example.py
@@ -0,0 +1,9 @@
+import Image,ImageDraw,ImageFont
+
+myfont=ImageFont.truetype("arial.ttf", 35)
+im=Image.open("touxiang.png")
+draw=ImageDraw.Draw(im)
+x,y=im.size
+draw.text((x-x/5,y/8),"8",fill=(255,0,0),font=myfont)
+im.save("result.png", "PNG")
+
diff --git a/ShaoyuanLi/0000/exmaple.py b/ShaoyuanLi/0000/exmaple.py
new file mode 100644
index 00000000..c04af4d6
--- /dev/null
+++ b/ShaoyuanLi/0000/exmaple.py
@@ -0,0 +1,9 @@
+import Image,ImageDraw,ImageFont
+
+myfont=ImageFont.truetype("arial.ttf", 35)
+im=Image.open("touxiang.png")
+draw=ImageDraw.Draw(im)
+x,y=im.size
+draw.text((x-x/5,y/8),"8",fill=(255,0,0),font=myfont)
+im.save("result.png", "PNG")
+
diff --git a/ShaoyuanLi/0000/touxiang.png b/ShaoyuanLi/0000/touxiang.png
new file mode 100644
index 00000000..c3222d12
Binary files /dev/null and b/ShaoyuanLi/0000/touxiang.png differ
diff --git a/ShaoyuanLi/0001/0001.py b/ShaoyuanLi/0001/0001.py
new file mode 100644
index 00000000..278979a6
--- /dev/null
+++ b/ShaoyuanLi/0001/0001.py
@@ -0,0 +1,24 @@
+# -*- coding: cp936 -*-
+import random
+#200鳤Ϊ8Ż룬ֵ伯ּĸ
+def generate_key(number=200,length=8):
+ char_set="abcdefghijklmnopqrstuvwxyz0123456789"
+ result=""
+ for i in range(0, number):
+ temp=""
+ while(temp==""):
+ for j in range(0,length):
+ temp=temp+char_set[random.randint(0,35)]
+#жɵŻǷ֮ǰظ
+ if(result.find(temp)==-1):
+ result=result+"%d "%(i+1)+temp
+ else:
+ temp=""
+ result=result+'\n'
+ return result
+def file_write():
+ fp=open("result.txt",'w')
+ fp.writelines(generate_key())
+ fp.close()
+if __name__ == '__main__':
+ file_write()
diff --git a/ShaoyuanLi/0001/result.txt b/ShaoyuanLi/0001/result.txt
new file mode 100644
index 00000000..8b16cadb
--- /dev/null
+++ b/ShaoyuanLi/0001/result.txt
@@ -0,0 +1,200 @@
+1 nxmmjq5u
+2 5hoe20v9
+3 elb1hrv0
+4 ls6htkmx
+5 qwzg0o39
+6 97reovrl
+7 zcwu57gj
+8 gk8cgovi
+9 prciw3q0
+10 vnf9n6b8
+11 fps1hiqw
+12 j33wf93a
+13 zwue5e71
+14 0nissnay
+15 feghkqmx
+16 io4kuhcq
+17 x6u8t76p
+18 1h61e4ng
+19 qbl5ebk8
+20 6jual6xm
+21 vjocsl6m
+22 n61d32ud
+23 p4m2iphq
+24 pyacaotz
+25 04qoagrf
+26 6crk5pqt
+27 s3ahsg3m
+28 mqzy3c6s
+29 sn7zd09i
+30 cf8zzveh
+31 xsudv4pb
+32 trnqj7fp
+33 wcm0p84l
+34 4ipcf95a
+35 s9xq6xcy
+36 phpz7h8l
+37 o91mes3g
+38 t6uknpae
+39 z6c5xi23
+40 yye3x973
+41 er1yto5z
+42 sfap7fsl
+43 bziiqf36
+44 ybg4dhmk
+45 y1mmf067
+46 33118f0r
+47 z5qmqqq7
+48 ryb0k7zw
+49 tedbcsxp
+50 yeq6xacz
+51 sgxvn5ji
+52 klymd488
+53 xfmwvjq2
+54 auy0dic5
+55 gis55ucl
+56 mcq6cr17
+57 o96zscnz
+58 hk2rlohj
+59 0ntnb0q4
+60 xw1v4xel
+61 nha9skdv
+62 k1kv2y97
+63 gbfz5l0v
+64 an80u8wr
+65 4pc3njpa
+66 6it3rlw7
+67 6mj7rtab
+68 9uahvgry
+69 680wn4my
+70 251guth4
+71 zjd0za7k
+72 n0z7wbeh
+73 j0h3jjvz
+74 f9oux370
+75 8sky09ux
+76 eax249ug
+77 477aqrpo
+78 vucjphwm
+79 ud32a2e4
+80 nhquv87l
+81 f4um10au
+82 m5jkru0w
+83 rpvzm6tm
+84 dykl1h4p
+85 zmuwu3o0
+86 j7giqlex
+87 vwa69otf
+88 6sha6mfq
+89 fpdf4wm1
+90 c04s7ymz
+91 ks87sv0b
+92 jhshq4xo
+93 96zplwyn
+94 muahr9je
+95 t218gs1g
+96 xcs602r5
+97 2d44deyq
+98 pdh1yvgf
+99 tejxc3xc
+100 ci2bx2y0
+101 ei2ic9q3
+102 1txrhspe
+103 0ut7su6t
+104 nc90orev
+105 67dn6ccd
+106 6eopvnqi
+107 a8klb1uz
+108 nwrqv1q4
+109 hz8r2ylb
+110 dnklsvf8
+111 t300hvo2
+112 lx35alfv
+113 42061qcj
+114 na4roat2
+115 3cpr59zl
+116 cwtfdnw1
+117 ig13dgp8
+118 1l00kvoe
+119 pzeijnui
+120 cquvplvg
+121 46os5qq4
+122 0gnccy9u
+123 utcbxjxy
+124 tfy5z7oj
+125 9c90fgqa
+126 z8c4glb3
+127 vhvx6jsw
+128 at0dknzh
+129 3t4n1zmw
+130 ohzbmj4m
+131 8yw8thmv
+132 eafvf0u2
+133 9k74zdd9
+134 s5wnndk8
+135 pzn80syp
+136 pwwrz5y3
+137 x4j7ea5q
+138 tyd2pf35
+139 lxz2tyso
+140 4sjkim2k
+141 hkgxx7zo
+142 xfci5bvl
+143 6m9ejxq6
+144 wfw60y3x
+145 yqvlczdy
+146 1xddbfio
+147 6emvqho0
+148 l4x17hf6
+149 fm5eibvy
+150 l8vvvosj
+151 wbhffvzm
+152 zwzcsx91
+153 q7xxd9fw
+154 x0xxczvo
+155 avp7wbsd
+156 2pqfl04c
+157 ropj6jx6
+158 andgzoxe
+159 xn11gqgu
+160 cc31xxhx
+161 22cuf67k
+162 ikuypkzs
+163 k2hawt99
+164 kb2f3z36
+165 wwdpa84t
+166 qcmqffx9
+167 1ia6qv0s
+168 5s2flplu
+169 bk1vseyl
+170 h1eq9td4
+171 b18q9a62
+172 daryg2hx
+173 2poyp7tt
+174 9xhoyk5q
+175 xcav6ut9
+176 j0wuv9hk
+177 cfyradja
+178 79kb1jmr
+179 jdo0ydys
+180 zyfy4yly
+181 dsr2j44o
+182 xfh51sce
+183 44gzcgpf
+184 x6kh99np
+185 asr1r9vu
+186 27hiy93f
+187 ggl2442w
+188 jmkf60w7
+189 qrhax89p
+190 whuhnbtc
+191 74hvzjlh
+192 05xfn6y8
+193 7gp768d5
+194 cu3o1xm1
+195 6hchvuy6
+196 ki975jre
+197 9q296wk4
+198 48l0a9nv
+199 ssx4zopx
+200 yscuw50k
diff --git a/ShaoyuanLi/0004/0004.py b/ShaoyuanLi/0004/0004.py
new file mode 100644
index 00000000..c80d04e8
--- /dev/null
+++ b/ShaoyuanLi/0004/0004.py
@@ -0,0 +1,19 @@
+# -*- coding: cp936 -*-
+import re
+fin=open("example.txt","r")
+fout=open("result.txt","w")
+str=fin.read()
+#ƥʽ
+reObj=re.compile("\b?([a-zA-Z]+)\b?")
+words=reObj.findall(str)
+#ֵ
+word_dict={}
+#ԵʵСдΪֵͳƣͬʱҪ
+for word in words:
+ if(word_dict.has_key(word)):
+ word_dict[word.lower()]=max(word_dict[word.lower()],words.count(word.lower())+words.count(word.upper())+words.count(word))
+ else:
+ word_dict[word.lower()]=max(0,words.count(word.lower())+words.count(word.upper())+words.count(word))
+for(word,number) in word_dict.items():
+ fout.write(word+":%d\n"%number)
+
diff --git a/ShaoyuanLi/0004/example.txt b/ShaoyuanLi/0004/example.txt
new file mode 100644
index 00000000..fd6c17d4
--- /dev/null
+++ b/ShaoyuanLi/0004/example.txt
@@ -0,0 +1 @@
+In the latest move to support the economy, Shanghai, Beijing, Chongqing and six other provinces and municipalities will allow banks to refinance high-quality credit assets rated by the People's Bank of China, said the central bank, as the program was first introduced in Guangdong and Shandong provinces last year.
\ No newline at end of file
diff --git a/ShaoyuanLi/0004/result.txt b/ShaoyuanLi/0004/result.txt
new file mode 100644
index 00000000..aa415b37
--- /dev/null
+++ b/ShaoyuanLi/0004/result.txt
@@ -0,0 +1,41 @@
+and:6
+beijing:1
+shandong:1
+six:2
+people:1
+move:2
+year:2
+high:2
+as:2
+program:2
+in:2
+guangdong:1
+quality:2
+provinces:4
+rated:2
+support:2
+shanghai:1
+to:4
+other:2
+was:2
+economy:2
+municipalities:2
+refinance:2
+said:2
+china:1
+last:2
+by:2
+bank:2
+chongqing:1
+introduced:2
+central:2
+assets:2
+of:2
+will:2
+credit:2
+s:2
+allow:2
+banks:2
+the:10
+first:2
+latest:2
diff --git a/Tachone/README.md b/Tachone/README.md
new file mode 100644
index 00000000..e6b2512a
--- /dev/null
+++ b/Tachone/README.md
@@ -0,0 +1,8 @@
+View my codes through the url below
+
+https://github.com/Tachone/PythonCode
+
+otherwise,welcome to visit my csdn blog!
+It's about linux,c++,shell,python,network~~
+
+http://blog.csdn.net/nk_test
diff --git a/WangZhou/0000/consolab.ttf b/WangZhou/0000/consolab.ttf
new file mode 100644
index 00000000..55f6bd2f
Binary files /dev/null and b/WangZhou/0000/consolab.ttf differ
diff --git a/WangZhou/0000/insert_num_angle.py b/WangZhou/0000/insert_num_angle.py
new file mode 100644
index 00000000..73242822
--- /dev/null
+++ b/WangZhou/0000/insert_num_angle.py
@@ -0,0 +1,20 @@
+from PIL import Image, ImageDraw, ImageFont
+
+
+def insert_angle_num(img):
+ """
+ Insert a num on the right-upper angle,then save the new image.
+ :param img:string : filename of an Image object
+ """
+ with Image.open(img) as im:
+ width, height = im.size
+ draw_image = ImageDraw.Draw(im)
+ color = '#ff0000'
+ num_font = ImageFont.truetype('consolab.ttf', 100)
+ draw_image.text((width - 80, 20), '7', font=num_font, fill=color)
+ im.save('new_message.jpg')
+
+
+if __name__ == "__main__":
+ img = 'wz0000.jpg'
+ insert_angle_num(img)
diff --git a/WangZhou/0000/new_message.jpg b/WangZhou/0000/new_message.jpg
new file mode 100644
index 00000000..6f3bb4ef
Binary files /dev/null and b/WangZhou/0000/new_message.jpg differ
diff --git a/WangZhou/0000/wz0000.jpg b/WangZhou/0000/wz0000.jpg
new file mode 100644
index 00000000..d4a4d920
Binary files /dev/null and b/WangZhou/0000/wz0000.jpg differ
diff --git a/WangZhou/0001/gen_act_key.py b/WangZhou/0001/gen_act_key.py
new file mode 100644
index 00000000..45909b32
--- /dev/null
+++ b/WangZhou/0001/gen_act_key.py
@@ -0,0 +1,21 @@
+import uuid
+
+
+def gen_act_key(n):
+ """
+ 生成 n 个激活码,保存在字典。
+ :param n: int
+ :return: dict
+ """
+ act_code_store = {}
+
+ for i in range(n):
+ code0 = str(uuid.uuid1()).split('-')[0]
+ code1 = '-'.join(str(uuid.uuid3(uuid.NAMESPACE_DNS, f'{i}')).split('-')[1:])
+ act_code = code0 + '-' + code1
+ act_code_store[f'id-{i}'] = act_code
+ return act_code_store
+
+
+if __name__ == "__main__":
+ activity_code = gen_act_key(200)
diff --git a/Yixuan/0000/duck.jpg b/Yixuan/0000/duck.jpg
new file mode 100644
index 00000000..c74dbf60
Binary files /dev/null and b/Yixuan/0000/duck.jpg differ
diff --git a/Yixuan/0000/finnal.jpg b/Yixuan/0000/finnal.jpg
new file mode 100644
index 00000000..91af4c69
Binary files /dev/null and b/Yixuan/0000/finnal.jpg differ
diff --git a/Yixuan/0000/main.py b/Yixuan/0000/main.py
new file mode 100644
index 00000000..a27cf4b1
--- /dev/null
+++ b/Yixuan/0000/main.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+from PIL import Image, ImageDraw, ImageFont, ImageColor
+
+
+'''
+打开文件,
+声明 text 的位置, 是什么, 字体, 颜色.
+
+----
+'''
+
+original = Image.open("duck.jpg") #Open pic
+
+font = ImageFont.truetype("msyh.ttf", 60)
+
+d = ImageDraw.Draw(original)
+
+d.text((500, 0), "2", font=font, fill=(255,0,0,255))
+
+d = ImageDraw.Draw(original)
+
+original.save("finnal.jpg")
+
diff --git a/Yixuan/0000/msyh.ttf b/Yixuan/0000/msyh.ttf
new file mode 100644
index 00000000..aa23ae1f
Binary files /dev/null and b/Yixuan/0000/msyh.ttf differ
diff --git a/Yixuan/0001/code.md b/Yixuan/0001/code.md
new file mode 100644
index 00000000..161e02ca
--- /dev/null
+++ b/Yixuan/0001/code.md
@@ -0,0 +1,200 @@
+1. 3f654938-3b34-4585-b7f7-f41567b8e645
+2. b8e79c24-a7b4-4723-adae-96148557fb5f
+3. ce2de3c4-f479-47da-9bfe-84d54511597b
+4. 0d7ad4d4-a24c-46c5-b400-d5f13131c3a6
+5. ea97a605-feea-4806-8cab-9efc5009cb4f
+6. 44651cd4-3729-4fa3-8ef6-578c4aca17c5
+7. a6bdb701-6c63-4618-8183-03445f7341db
+8. 6b403e29-97ba-4d61-a1cc-b640b08b7184
+9. 656983b7-0f17-44b4-bfe1-b256bd313a4c
+10. ce587a68-a0a9-48b9-b575-69fcfd466f4f
+11. 151e5e37-3a62-48e7-a78b-7d0a580dd4d9
+12. 1ddaeba0-e342-4800-a324-dd48f837fae0
+13. 438b79e6-0944-448b-8116-5bcb1af00f87
+14. 4d59bff5-5049-4b81-b056-ea400f34d830
+15. ba70787c-c4b4-4f1f-84b8-bfd1c4cc0923
+16. d02a649a-acc9-46f8-8795-aadda041c9b0
+17. ee6127aa-c615-4bb6-8b58-6814b539a897
+18. 095477f1-920b-40bb-bf8b-5d63d4cc8562
+19. aa2fb5b6-7642-4427-963c-8866d09d5661
+20. b87c5852-c605-4753-8a68-ea3ceca4364c
+21. 2f880a72-82a2-4ed6-b139-269f1b9c613b
+22. bc40ada8-8553-4a6f-9d8c-30640f7448a1
+23. 37cbf172-73d2-4eaa-8d24-509146eca5cd
+24. 484ccf9b-a0cd-4c87-9445-b31d9bb7ddd8
+25. 3364723d-74ec-4df7-bfa5-8b19419f5ae9
+26. fdb3737b-d8f1-435b-b32d-25c11b170934
+27. e53991dd-50c5-45b9-974d-296716ddc0e0
+28. bf60b96b-2bc4-4043-b84a-78445116d6fb
+29. 2fe83f3e-16f3-4234-acfc-313887ff9620
+30. f27a9f6d-3daf-4172-9a45-975e870eef5b
+31. 7761b335-1884-45b4-a6a7-908b92122b3c
+32. 30166b2f-9e53-479f-beea-7002d67b3707
+33. 46fb8106-129b-4618-8d15-4fdd4be6f861
+34. 75b52f54-e50d-4542-9d91-dc1e80ae1a0f
+35. 26b23075-5b85-4720-a127-81dd1940e5d8
+36. ece5ed26-991c-4b3f-9309-9edbaabfe015
+37. c2eb57bd-b24d-423b-bb58-64aeb7b7c00b
+38. 53232e6c-5e39-47a9-bfc3-5b7652025d54
+39. fe8d95c7-2666-4217-b0c0-1aeaca2aecfd
+40. a1330a02-4ccf-408d-a46a-ed2170ec5e9e
+41. e27ff244-2f12-4749-b0bf-fab075bd4375
+42. ee96285b-6611-45a2-977e-743e68e9f84b
+43. 46b5294d-d6e3-401f-a6d1-67786bfac27e
+44. 64494b13-579b-45df-a3c9-55b4b0cb566c
+45. 3e10dda7-eb94-4652-9fb4-fd5202a53927
+46. 8f2fb84c-e8fb-4dbe-8428-7eb0c1f42647
+47. df66e698-0a0f-4541-a873-7fe456235d6f
+48. 18be0daf-7704-4a43-8758-ef3d5fe2e122
+49. a30daa16-3c9e-4022-9e16-392e3440b42b
+50. 703f2bfd-692b-487b-a8c2-0edfdb95f538
+51. 96e0eaa8-ad18-41f3-abb7-5f0239eeaf0d
+52. a2e00b48-5869-40b2-9712-0b1aae345f18
+53. d1c97db9-8402-44f1-b5a4-4d3183d469c4
+54. e552c679-5e3d-4000-8f1e-689ae23afe69
+55. 4db88579-5c7b-4339-a4b4-33cf870358bb
+56. da7ef6e2-d0b3-47db-9bfb-63391733b688
+57. a89536d8-9ebe-4741-a433-4c092183e598
+58. d2f9d5c0-3bd7-4b34-ab50-4794f3b7e733
+59. d42fa8f9-082c-4a79-ab3e-f8c67c88712a
+60. 0a2f6922-2860-4b5d-ac3b-390637839a38
+61. 02900b28-c774-4a4d-9497-1af77a14c5b9
+62. d520298b-d0ab-4c0e-b740-b08647a263fb
+63. 2f938524-d218-4215-a66a-bcf5d86665c2
+64. ad06ad28-6d69-4a57-81c7-2e4e28edd074
+65. 951f99f3-3c41-49c7-95d5-252e98c53c88
+66. 9b45f680-bf88-4afd-9db6-9c76c857b565
+67. 409adbc5-c62a-45e6-951c-7a43ac4c014f
+68. eda3935b-1900-46be-9158-91c2d617d16a
+69. b4830980-bae7-4151-931f-b6252d701605
+70. 63e29a47-7995-480e-aaaf-e288a7229656
+71. ec53de7b-38cd-4dab-acf6-3d3c951519ae
+72. 79fd2f79-7269-4a80-b62a-4b67e21371fe
+73. 74de0b9e-a660-42b9-aded-5e8cac9bc20b
+74. 8a6eaedc-116b-4ab3-a5b6-37ca7c970d0d
+75. bd4b77b8-dc32-411e-b0f2-2434d9dde74f
+76. 43d32480-955a-444c-9794-d6d53746ea83
+77. cd74e749-1e3d-406a-9ade-b88698cce346
+78. 1abc5745-2fc9-4244-8f2b-03c9bc2544ee
+79. dd59494e-2339-411b-8a69-6500d32e06e7
+80. 71fed090-15a4-42b2-8a24-56baa748172e
+81. 764a33d2-222a-45f6-ae20-f174b1a21548
+82. 28c2e491-4003-4b73-b570-c5d6eae7f247
+83. 64f36931-fd83-4001-af20-18c6112dc57e
+84. 4ec62f94-021f-4007-8475-70ebc880a187
+85. 1086e631-a654-4597-9c2b-47d14ddb04d2
+86. 5457bc3a-0595-4c2f-8cae-78a5cf75b0ab
+87. 026fb380-c1f2-4e71-a655-37db4a063640
+88. 0b44fa97-7019-48a8-9fb7-fa5a8baf1cd6
+89. c88c4ba8-8886-414a-875a-2fbcd87c1e15
+90. 880e5c6a-4b6b-4a0f-b7bd-0dde578ff4a0
+91. 905d527e-f54b-4b45-8d11-0e78ac8b6d1f
+92. 9477e52f-ab15-4f7a-8b3d-d06411051b8e
+93. 8ddc8db6-ecaa-4494-a4d7-1496aa9be92c
+94. 068e1a52-1002-4a66-ae90-07c7bbb80686
+95. 5ac1b226-0077-434c-81fc-ba5b59b843ed
+96. 0b13b926-dd01-4016-a5a6-115d154265eb
+97. be819d0a-8d7e-42a5-80f4-432f0ced0324
+98. f2dcd76b-8c4a-40af-a57b-77612594c207
+99. 11b7e07b-baa7-4114-b479-f7749dd1ac98
+100. ed3d4461-c291-4701-95b1-36fd6a4ece7f
+101. cc14d776-7461-48ba-818f-03510a8466f0
+102. 1dbe55f1-9877-4e18-8e76-36c7d1bbd239
+103. 25decf42-91d1-4ec4-9603-abfa9a5afa4c
+104. ea19ed4e-abfb-462b-ba90-a1294c4e53b7
+105. 4bfeadcc-95e7-439f-9f4f-046892382991
+106. 6a82b514-f7e9-4ea1-8f82-79d181a015f0
+107. e745de17-6139-4847-842c-008ba60acb0b
+108. c3ab3ff7-cd3f-4c83-8aa0-a033502b46e2
+109. a1b9ba37-5230-4956-a820-46a273c35bb8
+110. 52387327-01ee-4f4c-8a91-1833e0d19fa0
+111. d98edc3e-895e-4d01-a505-f94c1d6cf4e4
+112. ec72b2e1-93d2-43e4-b6d3-501b4a3e7654
+113. 7e2ad2bd-4421-4762-995b-d1941fe7e876
+114. dab25b3b-6cce-4ca2-91eb-2eb0e11b55b3
+115. ae16df43-402d-4765-9249-89fcbc5188a8
+116. 0a56c626-a169-4100-b932-3fdef9141079
+117. 25711d01-9228-4f9c-ae13-86f774c6e179
+118. dfb72410-9208-4e69-9252-1c8b56e2b052
+119. 571eaa38-4c6f-49cd-bb7d-cccd4b9e913e
+120. d8ba2cf4-1a32-40fd-8171-28fa53c1b269
+121. 749292ea-db2e-4db5-a952-18c0e71cdcaf
+122. b7a0a1d9-4032-40e7-8fe5-2219a04bb14b
+123. 9af40fa8-9e35-4fd4-b879-869e8da3b88d
+124. 8352d9ad-3e2e-4b67-aff2-65b8c046d82e
+125. 509e61d2-8b47-4c5d-8bd8-b3bc6d0eb8b0
+126. e415e315-b647-4e1b-bb14-aaff11923410
+127. 9ec998e4-d655-40a3-bedc-4291efa781da
+128. b3a3d295-a987-4442-9396-646909aaf2cc
+129. 0037ae45-5623-4c34-8482-4f2b0d0c1e65
+130. 4cc5ae3c-b317-43b8-bed4-8b0dd8c4bed0
+131. 5562ebf3-8df6-426a-8bcb-a7a25a57bcae
+132. feaa277c-6f8d-41c7-a3e6-00c76b9e6077
+133. 65e4a317-42c4-44a5-9c2a-b9261c2494ea
+134. 0799db74-2799-412b-9109-118933312560
+135. a91f601f-caab-4d7f-a874-f1ec883d90c2
+136. 017e1b31-e568-4f8a-8887-99b7b3743fbd
+137. 3301ab55-ae27-4713-ab25-f553e27a927d
+138. f3a9549e-6bea-4912-9d22-6e92f488544a
+139. e7d69120-5877-4212-bbd9-f4623f9fbe8d
+140. ccf2adcf-d816-41f9-8733-33d58b5f2a5a
+141. 1a579cb8-c2fd-4386-9676-de421c4837a4
+142. 43f026b9-e09c-4b4c-913b-e1e3d2e7c1cc
+143. b8737099-63a3-4771-b0c1-3ad57c195d37
+144. aae9711c-7ef2-45c5-89e8-8913518b0b36
+145. 1dbc21aa-64cd-4ce8-a150-9d1c1f986b51
+146. 449b9684-511f-4cd5-b610-51d9168ae8b1
+147. 89ca7227-4fab-483a-9682-fe0d619dd216
+148. 197b78b6-7a54-4a59-be80-2c84bb8811b3
+149. af95ddc9-3821-411d-8c6e-cd78785e7b56
+150. c600a1cc-9965-4bb1-8494-ef9d0f4abff5
+151. 694837db-f956-4772-a8ce-edfbfde6ff25
+152. ed6b74c2-2f43-42bb-ab4e-4be2957fbe1a
+153. a47381c8-3369-4830-bb9f-97643f8a1fa9
+154. 2733d133-0703-4648-9ef5-373a0beda5ac
+155. ad806245-df11-4bf2-89dc-195294083141
+156. 8492943f-de1c-4b34-b49c-2779ea5af3a7
+157. 2364d4d2-b9c0-4d0a-a9e5-c9b4e38c9e24
+158. 9889efba-a977-4d5b-9f3b-9a98f8e8e6e2
+159. 36ce676b-63a1-471f-b1ea-1e755ccc7631
+160. 977e26db-ed39-405a-b007-0c2b2bf43625
+161. 9ff654b7-3b09-43bf-97fc-2acd4d308aa1
+162. 1809a02d-3970-4951-bef3-acf7884a402c
+163. 25602879-7ad0-41f3-a8cb-635c2996ce4c
+164. adda3d47-377d-4a19-9d3e-abff09dc2c67
+165. 0c83fa5e-d271-4ebb-a438-840cb074c7a0
+166. c1f7ba6e-b22b-4850-ba21-ae231da31f6b
+167. 8568a74e-843b-45d0-9a30-582b8c8e9c59
+168. 6ffbeb12-8639-4d97-9988-a73360cddffc
+169. f3598b23-0741-499d-9bcd-ed1a1d3edae7
+170. 3b3492ff-b0a8-4341-943a-c44a6bb11f27
+171. 2701fec9-0693-4463-9599-befc09ce987a
+172. dc728f2f-c057-4f8f-b690-9646d69b6e41
+173. cb9569ab-d12e-4fc1-a905-0347868f0519
+174. 30fb9248-4cb8-4f51-add3-c7914ae34bfe
+175. 4a669209-cab6-4800-85aa-a6de510ed81c
+176. d5f81043-7cd9-4ab1-8247-40907be973bb
+177. 7b23f2a5-db14-4e25-81b9-4449f0c26b32
+178. 8768a814-e3e8-4396-a7e1-32440ec34c17
+179. 697e96ef-bcff-4097-8bbd-ee3a8beb5be7
+180. dc0ab926-196d-4d8b-8bed-0d842550c13b
+181. 53ea2b69-8c9a-4511-80ed-2142f1964d0a
+182. f38e6218-37e4-43af-85f5-a27acef5d8be
+183. cc19ab8d-a7af-446b-8d8a-1155b4b52851
+184. a6890790-ff42-402f-9352-792eea1a1f30
+185. 19124697-b4ba-4e67-b846-28c2f6cd2d09
+186. 57e9443a-7577-4e74-a32f-5ad71cccefe6
+187. 4899e4f1-a0b9-46f8-a09b-cf0420e88444
+188. 0f06b2f6-6fdf-4398-8071-d62d9520d3d3
+189. 50476641-9902-411a-b664-52d233e16040
+190. 2ea035c3-c362-44f3-9824-2dbbfcd32f41
+191. 77a582c6-046c-4a66-93fd-5315f0bca09f
+192. 3f1682d0-f6bc-4d0d-a335-d30ab3dc267b
+193. 14d6c743-69f1-4c5a-87c9-a666eb611f72
+194. fde1c6c1-905f-4785-829c-26925ad38d50
+195. fd17032e-c76a-476b-818b-0697f70cfd12
+196. 2ba10acf-ef65-4954-901d-485082c78259
+197. cf805a2d-030d-4fc0-a2a8-33c5096ac68e
+198. f7439f89-4b23-4f9d-b610-f5bfa276275c
+199. 0c1b58bc-2d78-4a3b-9cf5-f971da929379
+200. 96c4ae13-3927-4023-8c8f-9a77e9dd46a1
diff --git a/Yixuan/0001/code.py b/Yixuan/0001/code.py
new file mode 100644
index 00000000..a66f192b
--- /dev/null
+++ b/Yixuan/0001/code.py
@@ -0,0 +1,8 @@
+import uuid
+
+i = 1
+while (i < 201):
+ f = open('code.md', 'ar+')
+ s = str(i)+". "+str(uuid.uuid4())
+ f.write(s+"\n")
+ i +=1
diff --git a/JiYouMCC/0023/guestbook/guestbook/__init__.py b/Yixuan/0001/workfile
similarity index 100%
rename from JiYouMCC/0023/guestbook/guestbook/__init__.py
rename to Yixuan/0001/workfile
diff --git a/ZsnnsZ/README.md b/ZsnnsZ/README.md
new file mode 100644
index 00000000..5ab9e5dc
--- /dev/null
+++ b/ZsnnsZ/README.md
@@ -0,0 +1,2 @@
+提交项目地址,问题基本全部解决:
+https://github.com/ZsnnsZ/show-you-my-code
diff --git a/ailurus1991/0001/codes.txt b/ailurus1991/0001/codes.txt
index 26e98174..7198c7fa 100644
--- a/ailurus1991/0001/codes.txt
+++ b/ailurus1991/0001/codes.txt
@@ -1,200 +1,200 @@
-07ELiS3B
-wbEw2K7Z
-ODH0prGa
-iDwl7cF4
-uLd49jty
-5K4a2jR7
-bXay61gz
-dvCwV5Kw
-DKX80Jwa
-CpOJG3bC
-nmC6LNHo
-MCugndv8
-L3TBpc77
-yg2eGufG
-gKvUff78
-0UuiY9jI
-VdOmYNLp
-JWOvybaN
-rOpXsrG4
-pp9yA0UU
-XIt5aH8C
-irlE2V8O
-jp9gGCD4
-hynSrDcw
-nMRgkIbT
-gBZmLVXj
-L63Bl4pW
-Zuu7LJFP
-1cpIw01S
-8r3gS5un
-DeLn2nW8
-hGL3oXK3
-Oyg6XGGN
-IsmHK0a2
-cmYJgb7J
-brFmxKVN
-XpBYlhTj
-RDgPKSwb
-jDBaz5j9
-aw0PV8NA
-Yzfw7Gb9
-B1rX6lPN
-0bUfzfcz
-Gh39PGoa
-Akegbesg
-S2a0Mfod
-Lrba0c0W
-vBhG0OVZ
-gOenR9r9
-usg8Igst
-tTrTTTlP
-2uerutso
-UyK0YOCE
-LZJLon5J
-mcVmWTSM
-5YGpc1vj
-HE0zFaPs
-6oSHZKSi
-UmRzZLzD
-VvGEvWeX
-72MW1Yhe
-efu750PR
-uJ5cPLb2
-mvGNBCwn
-RYGyeu8R
-vgmhv3nA
-AbC3xS9h
-CGavT5ZH
-uClSx9fa
-se9tgUFg
-RZnGvK6c
-8ngxJ3t4
-it2l1cMl
-ASnRgmKG
-eaNxtwJJ
-GPr4DHfI
-TABgIdyY
-ppIhvBGl
-PJ2EOKOx
-LOeycE7Y
-WHc4hRos
-pLkzd8t0
-g1DJ3bzp
-1XiXun9T
-HeGBPWuB
-xnY8l1BW
-pp13sKHk
-o21x6nGC
-GfW5KCyb
-mSBtbyN6
-Upfn2YST
-FuBDk2aF
-TZYSzJFr
-cmKfTB0n
-fPOEUI55
-L8u7Fa9K
-e2dT5zeA
-CpxDKaha
-jR9dgGm1
-Rp5wzLGL
-gaKuxrbY
-C5zD0Ogn
-7sXTGOYt
-nmuLpxtY
-gF1fxkAc
-gZEM23es
-9CaF5ZhF
-ZG8BXNsh
-GJ0hJ1RY
-AbovgxFV
-gOiRytSP
-Xy6tydDZ
-rLZAZr2K
-GGgCLEzK
-EZXw6KHU
-12rA6HwD
-WdcmUpfh
-pTcL2AVZ
-iiTTEZAD
-9r09I993
-IA8m3afb
-mB3pACVP
-TcLMmxCg
-rOhdD9lN
-RTISe5UU
-0AsjKMsp
-gTP3UhLv
-DP6Vbtgg
-DkrE4l2Y
-zGvlNuTA
-BOCa0cd8
-tAG42DW8
-n6158oPG
-woZOFDwK
-RdZecnGR
-G9IgvSX5
-zE8oBorV
-UMZKLtLz
-EwnG1537
-HY1RsBSo
-rIzynYzG
-G6dTmRAs
-VjA5Rz3U
-XeRwvtO9
-g9z71OMw
-rxgeJwsx
-bzzRBuCu
-eOiJgvYI
-GYXJIG4a
-WN6mg6Iz
-SpxyjghJ
-uHmfhXwg
-O2WhHwSF
-g6zYyhZr
-6jYt7g19
-J5AUt36B
-sdGDCIa1
-3GvGIPGS
-HD5wlcTz
-Z96XKAyG
-gVX8uwEl
-E4IHGgGr
-bAbrc8pW
-TfUxLtDW
-T9lXGfhX
-C4nCjSZ4
-cauOES6a
-vBOe3Llc
-cHAvs2jv
-RAGxrePF
-WyndaKIi
-Eg7lGyrG
-GyeH2tcK
-9A1P6oiE
-wSoSkJvk
-8avTBzlB
-XUBFx6xs
-rRH2NNgf
-jy1nItmL
-p7NWxGwh
-zoF3aFNr
-LCivfna9
-tcdhOvP7
-alvHFgKL
-Dj39CPbx
-dGBM32CN
-XZXyvd45
-XFkRvZXh
-lTb1grNm
-dKi60bUk
-R1O7wKBI
-IpnIL3ug
-mOwaLEGc
-p859BYUr
-rOw3ndJY
-7npjvosA
-ZvjLNXG5
-kPc7Okua
-nal1g2uD
-8KLNVdCk
+067wDUmF
+WIE5ADSa
+yzbEbrkn
+78Cs0yUs
+7rC8ojTB
+x0n6Gifh
+A2ETYgl9
+gFlzZYrx
+4NzSt1sr
+bm3ASNIO
+THH2col6
+01zobZb5
+OgjiVfHL
+jJiTGlHw
+cDjk9aat
+ei37S20e
+v8MwU8Ay
+c2OPgHXJ
+Co7SCKaM
+FLY8JBWT
+uihcGKet
+FctyEKZp
+l7sMtgny
+MSR8gTta
+4GIYEeoB
+n0XDBftG
+2Hd9Y2ck
+KLdCGVLz
+GcCtm85C
+B19FPPGz
+X95nvyFg
+VgoM0O3l
+Cfl0dvad
+s5pu2Lsg
+x1C6IPsb
+U8gdNBbo
+aTD4nc3X
+TFhJ8hv9
+csxaFbsD
+HFhgchBw
+18enGW85
+Wn1uktzK
+4FTMiz84
+rzJxzZJJ
+EBXIC3bg
+SIkLuMcR
+AEhzICT2
+xMe5pgU8
+YjpyYLcI
+lOMJnFdO
+lMVdKj7J
+4nVrcNMk
+of8DU2Dc
+xSRGwsPC
+iGUDTU9V
+1CVcDt74
+V73OfYzr
+LYAb82H8
+NdWCKpej
+9jIoCTAJ
+wrAFhIMa
+szrKV5Vr
+LPpcsVxJ
+1eMWwAla
+ybleklKB
+m6ucvieP
+mHf6jewS
+bBCVMG1g
+3BdbbKvd
+fNpvWBlv
+17UGgPuS
+KFCgFzT8
+zdGiFgib
+8aH7vG2e
+KJsW1NAF
+EFOIyikg
+ErVISFhP
+e7G0HnOC
+LimUSRLY
+gowryZCr
+3ymxPGED
+Myfxo46p
+bDMorR79
+shbsx6uU
+st3hRGfJ
+WOpGTRDv
+cXsjlAnK
+G8pBYlE4
+twFZ8ZXC
+6uOlozge
+3rNG15ch
+ZmEnahs0
+8glVkUEa
+OLRGdj5o
+GjnpLexB
+CJxnG5i2
+GXUwUVWN
+yFKWRoVx
+vUbrT1uB
+pviEftiP
+4pDvYtwE
+m8nHJXGR
+BUvTcLz8
+TYC8z0YX
+81HDyXBf
+C5CTFNzf
+5GUxkZdL
+OL7gf8p0
+v7wbVSSW
+mLwXcTpj
+zMrh85gx
+i4gFLwYn
+ACOgocDu
+FgtJTamH
+0ytVTb9Y
+vldIGDwc
+fJ4t0TLR
+TRT0PNLm
+w5ZVDGwy
+RBYKUnVe
+6C74ns4U
+G5lwHP4C
+N8EEarnb
+ggHaNSrr
+UdciYEDP
+6dS1RHsD
+UGFY3sGI
+d5WN970r
+i8GZJ0KO
+4YJfF6O3
+EdafYI9V
+VPRfG4Rd
+x7ISwBwf
+YgJW38B3
+p6ZvBR4u
+HbBrzH3c
+1ob7y8FW
+tPo66Pnd
+nkHEnYCH
+inMyvaIt
+eAtO62GO
+KGtn0rAl
+Wln5Zs68
+UcsCS9MH
+aTxlR2Dn
+UIjBsbHx
+pEt3kSz3
+4yu66j4x
+4br5X0o6
+uBUFwunT
+ACsYgFmE
+BgdM6gHr
+ZtKEdLH6
+ZBMxBcg4
+Gb5Ws11z
+gVZ1GS5h
+8D3yar2p
+ySR3Bge8
+WS0e7gPM
+PfD9FsnN
+YG8Xhe4X
+yiglF48r
+iE9EgBIa
+gj8D5uaJ
+Goxl80Kj
+G1rucjuN
+n0R7vzMH
+k9aEGZnj
+4gGGOgi4
+1pWAS2v3
+GXYoICVX
+eG0KguCF
+3MFKfF7M
+84ByMUX1
+tM7eKnnr
+A9RyXkR4
+geFYr0MI
+CHtwhua8
+2VYgMTXh
+lmUSzUKF
+g5xDFFfW
+GzDoI1pG
+yw8Y1jGG
+DPzJHHFP
+ExC8epYJ
+Xgx1GhMb
+ulOvCnDc
+zKXlSSPn
+P2WyjuB1
+SHJPLPVA
+FyZhOPdU
+8ZXcojam
+AezONIMT
+DBc7slXt
+66B4DeTh
+3rltINms
+daXIFKhy
+v1g9xaHb
+ZWKlILmc
+YzGC1FVi
diff --git a/ailurus1991/0005/.DS_Store b/ailurus1991/0005/.DS_Store
deleted file mode 100644
index 08ecfc63..00000000
Binary files a/ailurus1991/0005/.DS_Store and /dev/null differ
diff --git a/ailurus1991/0005/pics/.DS_Store b/ailurus1991/0005/pics/.DS_Store
deleted file mode 100644
index 960740ed..00000000
Binary files a/ailurus1991/0005/pics/.DS_Store and /dev/null differ
diff --git a/ammmerzougui/0001/test.py b/ammmerzougui/0001/test.py
new file mode 100644
index 00000000..4c1c96f2
--- /dev/null
+++ b/ammmerzougui/0001/test.py
@@ -0,0 +1,11 @@
+'''
+Generating a random code
+By @ammmerzougui
+'''
+import random
+
+def genCode(length):
+ s = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
+ return "".join(random.sample(s,length))
+l=input("Enter the length of the random code: ")
+print(genCode(int(l)))
diff --git a/asahiSky/0000/sample.png b/asahiSky/0000/sample.png
new file mode 100644
index 00000000..0df44713
Binary files /dev/null and b/asahiSky/0000/sample.png differ
diff --git a/asahiSky/0000/test.py b/asahiSky/0000/test.py
new file mode 100644
index 00000000..d46aecca
--- /dev/null
+++ b/asahiSky/0000/test.py
@@ -0,0 +1,12 @@
+from PIL import Image, ImageDraw, ImageFont, ImageColor
+
+
+def drawPic(fileName):
+ img = Image.open(fileName)
+ x, y = img.size
+ fnt = ImageFont.truetype("arial.ttf", size=30)
+ draw = ImageDraw.Draw(img)
+ draw.text((x - 50, 10), font=fnt, fill=128, text='14')
+ img.show()
+if __name__ == '__main__':
+ drawPic('sample.png')
diff --git a/asahiSky/0001/showmecode.sublime-project b/asahiSky/0001/showmecode.sublime-project
new file mode 100644
index 00000000..dc813104
--- /dev/null
+++ b/asahiSky/0001/showmecode.sublime-project
@@ -0,0 +1,8 @@
+{
+ "folders":
+ [
+ {
+ "path": "D:\\GitHub\\python\\asahiSky"
+ }
+ ]
+}
diff --git a/asahiSky/0001/showmecode.sublime-workspace b/asahiSky/0001/showmecode.sublime-workspace
new file mode 100644
index 00000000..60613b35
--- /dev/null
+++ b/asahiSky/0001/showmecode.sublime-workspace
@@ -0,0 +1,1761 @@
+{
+ "auto_complete":
+ {
+ "selected_items":
+ [
+ [
+ "enc",
+ "encrypt_password〔function〕"
+ ],
+ [
+ "unic",
+ "unicode〔class〕"
+ ],
+ [
+ "s",
+ "sha256〔function〕"
+ ],
+ [
+ "html",
+ "htmlCont"
+ ],
+ [
+ "name",
+ "nameList"
+ ],
+ [
+ "cr",
+ "create_Num"
+ ],
+ [
+ "Imagec",
+ "ImageColor〔module〕"
+ ],
+ [
+ "dia",
+ "diabetes_y_test"
+ ],
+ [
+ "line",
+ "linear_model"
+ ],
+ [
+ "ir",
+ "iris_Y_test"
+ ],
+ [
+ "iris",
+ "iris_X_train"
+ ],
+ [
+ "svm",
+ "svm〔module〕"
+ ],
+ [
+ "lin",
+ "linear_model"
+ ],
+ [
+ "l",
+ "linear_model〔module〕"
+ ],
+ [
+ "HttpRe",
+ "HttpResponse〔class〕"
+ ],
+ [
+ "a",
+ "append(3"
+ ],
+ [
+ "defa",
+ "defaultdict〔module〕"
+ ],
+ [
+ "de",
+ "defaultdict〔class〕"
+ ],
+ [
+ "prior",
+ "priorityQueue"
+ ],
+ [
+ "he",
+ "heappop〔function〕"
+ ],
+ [
+ "n",
+ "nlargest〔function〕"
+ ],
+ [
+ "p",
+ "print (todo.py)"
+ ],
+ [
+ "pritn",
+ "printf printf …"
+ ],
+ [
+ "ma",
+ "main main()"
+ ],
+ [
+ "readl",
+ "readlines〔function〕"
+ ],
+ [
+ "enh",
+ "enhancer"
+ ],
+ [
+ "I",
+ "ImageDraw"
+ ],
+ [
+ "fr",
+ "from〔keyword〕"
+ ],
+ [
+ "Ima",
+ "ImageEnhance"
+ ],
+ [
+ "Im",
+ "ImageFilter〔module〕"
+ ],
+ [
+ "im",
+ "import"
+ ],
+ [
+ "spl",
+ "split"
+ ],
+ [
+ "ex",
+ "except〔keyword〕"
+ ],
+ [
+ "__",
+ "__future__ (load_data.py)"
+ ],
+ [
+ "url",
+ "urllib"
+ ],
+ [
+ "ur",
+ "urllib"
+ ],
+ [
+ "re",
+ "result"
+ ],
+ [
+ "coo",
+ "cookie"
+ ],
+ [
+ "fi",
+ "fileName〔variable〕"
+ ],
+ [
+ "rq",
+ "request"
+ ],
+ [
+ "get",
+ "getPage"
+ ],
+ [
+ "req",
+ "request"
+ ],
+ [
+ "cl",
+ "close (wtftw.py)"
+ ],
+ [
+ "res",
+ "response"
+ ],
+ [
+ "requ",
+ "request (wtftw.py)"
+ ],
+ [
+ "bac",
+ "background-size"
+ ],
+ [
+ "wid",
+ "width"
+ ],
+ [
+ "margin",
+ "margin"
+ ],
+ [
+ "fl",
+ "float"
+ ],
+ [
+ "text",
+ "text-align"
+ ],
+ [
+ "fon",
+ "font-size"
+ ],
+ [
+ "in",
+ "index_url"
+ ],
+ [
+ "Theta",
+ "Theta1"
+ ],
+ [
+ "delta",
+ "delta3"
+ ],
+ [
+ "J",
+ "J_temp"
+ ],
+ [
+ "pre",
+ "pre_temp"
+ ],
+ [
+ "the",
+ "theta_k"
+ ],
+ [
+ "all",
+ "all_theta"
+ ],
+ [
+ "y",
+ "y_temp"
+ ],
+ [
+ "inc",
+ "include (FoodChain.cpp)"
+ ],
+ [
+ "tr",
+ "trueSum"
+ ],
+ [
+ "t",
+ "trueSum"
+ ],
+ [
+ "m",
+ "MAXK"
+ ],
+ [
+ "int",
+ "init"
+ ],
+ [
+ "max",
+ "MAXN"
+ ],
+ [
+ "do",
+ "double"
+ ],
+ [
+ "sort",
+ "sorted"
+ ],
+ [
+ "min",
+ "minLen"
+ ],
+ [
+ "len",
+ "length"
+ ],
+ [
+ "le",
+ "length"
+ ],
+ [
+ "c",
+ "count"
+ ],
+ [
+ "Tr",
+ "Tree::Print"
+ ],
+ [
+ "Tre",
+ "Tree::add"
+ ],
+ [
+ "nel",
+ "nLen2"
+ ],
+ [
+ "nle",
+ "nLen1"
+ ],
+ [
+ "nL",
+ "nLen2"
+ ],
+ [
+ "an",
+ "an2"
+ ],
+ [
+ "nlen",
+ "nLen1"
+ ],
+ [
+ "szl",
+ "szLine1"
+ ],
+ [
+ "sz",
+ "szLine2"
+ ],
+ [
+ "szlin",
+ "szLine2"
+ ],
+ [
+ "real",
+ "realP"
+ ],
+ [
+ "vir",
+ "virP"
+ ],
+ [
+ "day",
+ "dayOfMonth"
+ ],
+ [
+ "Dat",
+ "Date::Date"
+ ],
+ [
+ "mon",
+ "month"
+ ],
+ [
+ "E",
+ "Employee"
+ ],
+ [
+ "b",
+ "birth"
+ ],
+ [
+ "IS",
+ "IS_1"
+ ],
+ [
+ "CNO",
+ "Cno"
+ ],
+ [
+ "SN",
+ "Sno"
+ ],
+ [
+ "minu",
+ "minutes"
+ ],
+ [
+ "Ti",
+ "Time::Time"
+ ],
+ [
+ "h",
+ "hours"
+ ],
+ [
+ "rea",
+ "realP"
+ ],
+ [
+ "Co",
+ "Complex"
+ ],
+ [
+ "tex",
+ "textPanel"
+ ],
+ [
+ "ctrl",
+ "ctrl+right"
+ ],
+ [
+ "pr",
+ "private"
+ ]
+ ]
+ },
+ "buffers":
+ [
+ {
+ "contents": "import os\nfrom hashlib import sha256\nfrom hmac import HMAC\n\n\ndef encrypt_password(password, salt=None):\n\n if salt is None:\n salt = os.urandom(8)\n\n salt = salt.encode('utf-8')\n assert 8 == len(salt)\n if isinstance(password, str):\n password = password.encode('UTF-8')\n\n\n result = password\n for i in range(10):\n result = HMAC(result,salt,sha256).digest()\n\n return salt+result\n\n\nprint(encrypt_password('Hty980204'))\n",
+ "file": "/D/GitHub/python/asahiSky/0021/test.py",
+ "file_size": 480,
+ "file_write_time": 130865943901684265,
+ "settings":
+ {
+ "buffer_size": 451,
+ "line_ending": "Windows"
+ }
+ },
+ {
+ "contents": "Traceback (most recent call last):\n File \"test.py\", line 24, in \n print(encrypt_password('Hty980204'))\n File \"test.py\", line 12, in encrypt_password\n assert 8 == len(salt)\nAssertionError\n\n***Repl Closed***\n",
+ "settings":
+ {
+ "buffer_size": 222,
+ "line_ending": "Windows",
+ "name": "*REPL* [python]",
+ "read_only": true,
+ "scratch": true
+ }
+ },
+ {
+ "contents": "Traceback (most recent call last):\n File \"test.py\", line 24, in \n print(encrypt_password('Hty980204'))\n File \"test.py\", line 11, in encrypt_password\n salt = salt.encode('utf-8')\nAttributeError: 'bytes' object has no attribute 'encode'\n\n***Repl Closed***\n",
+ "settings":
+ {
+ "buffer_size": 270,
+ "line_ending": "Windows",
+ "name": "*REPL* [python]",
+ "read_only": true,
+ "scratch": true
+ }
+ },
+ {
+ "contents": "b'asdceged\\xee\\xdc\\xea\\x8a\\x08\\x10\\xab3\\xfe\\\\\\xb9\\xb5S\\x8bn\\x11$W\\tV\\x0bC\\x84\\xfd\\xd2\\x14\\x0b\\xef}MP\\xc2'\n\n***Repl Closed***\n",
+ "settings":
+ {
+ "buffer_size": 125,
+ "line_ending": "Windows",
+ "name": "*REPL* [python]",
+ "read_only": true,
+ "scratch": true
+ }
+ },
+ {
+ "contents": "Traceback (most recent call last):\n File \"test.py\", line 22, in \n print(encrypt_password('Hty980204','asdceged'))\n File \"test.py\", line 18, in encrypt_password\n result = HMAC(result,salt,sha256).digest()\n File \"D:\\Python34\\lib\\hmac.py\", line 84, in __init__\n self.update(msg)\n File \"D:\\Python34\\lib\\hmac.py\", line 93, in update\n self.inner.update(msg)\nTypeError: Unicode-objects must be encoded before hashing\n\n***Repl Closed***\n",
+ "settings":
+ {
+ "buffer_size": 453,
+ "line_ending": "Windows",
+ "name": "*REPL* [python]",
+ "read_only": true,
+ "scratch": true
+ }
+ },
+ {
+ "contents": "Traceback (most recent call last):\n File \"test.py\", line 22, in \n print(encrypt_password('Hty980204','asdceged'))\n File \"test.py\", line 17, in encrypt_password\n for i in xrange(10):\nNameError: name 'xrange' is not defined\n\n***Repl Closed***\n",
+ "settings":
+ {
+ "buffer_size": 257,
+ "line_ending": "Windows",
+ "name": "*REPL* [python]",
+ "read_only": true,
+ "scratch": true
+ }
+ },
+ {
+ "contents": "Traceback (most recent call last):\n File \"test.py\", line 23, in \n print(encrypt_password('Hty980204','asdceged'))\n File \"test.py\", line 15, in encrypt_password\n assert isinstance(password, str)\nAssertionError\n\n***Repl Closed***\n",
+ "settings":
+ {
+ "buffer_size": 244,
+ "line_ending": "Windows",
+ "name": "*REPL* [python]",
+ "read_only": true,
+ "scratch": true
+ }
+ }
+ ],
+ "build_system": "",
+ "build_system_choices":
+ [
+ [
+ [
+ [
+ "Packages/C++/C++ Single File.sublime-build",
+ ""
+ ],
+ [
+ "Packages/C++/C++ Single File.sublime-build",
+ "Run"
+ ]
+ ],
+ [
+ "Packages/C++/C++ Single File.sublime-build",
+ ""
+ ]
+ ],
+ [
+ [
+ [
+ "Packages/C++/C++ Single File.sublime-build",
+ ""
+ ],
+ [
+ "Packages/C++/C++ Single File.sublime-build",
+ "Run"
+ ],
+ [
+ "Packages/SublimeREPL/sublimerepl_build_system_hack.sublime-build",
+ ""
+ ]
+ ],
+ [
+ "Packages/C++/C++ Single File.sublime-build",
+ "Run"
+ ]
+ ],
+ [
+ [
+ [
+ "Packages/Python/Python.sublime-build",
+ ""
+ ],
+ [
+ "Packages/Python/Python.sublime-build",
+ "Syntax Check"
+ ]
+ ],
+ [
+ "Packages/Python/Python.sublime-build",
+ ""
+ ]
+ ],
+ [
+ [
+ [
+ "Packages/Python/Python.sublime-build",
+ ""
+ ],
+ [
+ "Packages/Python/Python.sublime-build",
+ "Syntax Check"
+ ],
+ [
+ "Packages/SublimeREPL/sublimerepl_build_system_hack.sublime-build",
+ ""
+ ]
+ ],
+ [
+ "Packages/Python/Python.sublime-build",
+ ""
+ ]
+ ],
+ [
+ [
+ [
+ "Packages/User/C++compiler.sublime-build",
+ ""
+ ],
+ [
+ "Packages/User/C++compiler.sublime-build",
+ "Run"
+ ]
+ ],
+ [
+ "Packages/User/C++compiler.sublime-build",
+ ""
+ ]
+ ]
+ ],
+ "build_varint": "",
+ "command_palette":
+ {
+ "height": 242.0,
+ "last_filter": "install",
+ "selected_items":
+ [
+ [
+ "install",
+ "Package Control: Install Package"
+ ],
+ [
+ "Package Control: li",
+ "Package Control: List Packages"
+ ],
+ [
+ "pdf",
+ "LaTeXing: Open PDF"
+ ],
+ [
+ "Package Control: ",
+ "Package Control: Disable Package"
+ ],
+ [
+ "install ",
+ "Package Control: Install Package"
+ ],
+ [
+ "instal",
+ "Package Control: Install Package"
+ ],
+ [
+ "enable",
+ "Package Control: Enable Package"
+ ],
+ [
+ "alignment",
+ "Preferences: Alignment File Settings – Default"
+ ],
+ [
+ "set syntax:ja",
+ "Set Syntax: Java"
+ ],
+ [
+ "pack",
+ "Package Control: Enable Package"
+ ],
+ [
+ "package control:",
+ "Package Control: Install Package"
+ ],
+ [
+ "package control",
+ "Package Control: Add Channel"
+ ],
+ [
+ "ins",
+ "Build: New Build System"
+ ]
+ ],
+ "width": 528.0
+ },
+ "console":
+ {
+ "height": 126.0,
+ "history":
+ [
+ "python",
+ "python img_attribute.py",
+ "python",
+ "import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())"
+ ]
+ },
+ "distraction_free":
+ {
+ "menu_visible": true,
+ "show_minimap": false,
+ "show_open_files": false,
+ "show_tabs": false,
+ "side_bar_visible": false,
+ "status_bar_visible": false
+ },
+ "expanded_folders":
+ [
+ "/D/GitHub/python/asahiSky",
+ "/D/GitHub/python/asahiSky/0000",
+ "/D/GitHub/python/asahiSky/0001",
+ "/D/GitHub/python/asahiSky/0011",
+ "/D/GitHub/python/asahiSky/0021"
+ ],
+ "file_history":
+ [
+ "/D/GitHub/python/asahiSky/0021/example.py",
+ "/D/GitHub/python/asahiSky/0001/test.py",
+ "/D/GitHub/python/asahiSky/0011/test.py",
+ "/F/config.txt",
+ "/D/Python34/Lib/site-packages/uuid.py",
+ "/D/GitHub/python/ailurus1991/0001/main.py",
+ "/D/GitHub/python/burness/0001/generate_200_keys.py",
+ "/D/GitHub/python/endersodium/0001/0001.py",
+ "/D/GitHub/python/agmcs/0001/0001.py",
+ "/D/GitHub/mycode/0000/test.py",
+ "/D/GitHub/python/agmcs/0013/0013.py",
+ "/D/GitHub/python/JiYouMCC/0001/0001.py",
+ "/D/GitHub/python_study/scilearn/Generalized Linear Models.py",
+ "/D/破解字典/test.py",
+ "/D/GitHub/django/docs/intro/tutorial03.txt",
+ "/D/GitHub/python_study/scilearn/plot_lda_qda.py",
+ "/C/Users/Asahi/Downloads/plot_lda_qda.py",
+ "/D/GitHub/scikit-learn/doc/modules/covariance.rst",
+ "/D/GitHub/python_study/scilearn/todo.py",
+ "/D/GitHub/python_study/jango/mysite/todo.py",
+ "/D/GitHub/python_study/jango/mysite/polls/urls.py",
+ "/D/GitHub/python_study/jango/mysite/polls/models.py",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/User/C++compiler.sublime-build",
+ "/D/GitHub/django/docs/conf.py",
+ "/D/GitHub/python_study/jango/mysite/siteinjango.sublime-project",
+ "/D/GitHub/python_study/jango/mysite/site.sublime-project",
+ "/D/GitHub/python/DIYgod/README.md",
+ "/D/GitHub/python/README.md",
+ "/D/GitHub/python/DIYgod/0006/test/test.py",
+ "/D/GitHub/python_study/cookbook/todo.py",
+ "/D/GitHub/python_study/jango/todo.py",
+ "/D/GitHub/django/docs/intro/overview.txt",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings",
+ "/C/Users/Asahi/Downloads/scipy-master/scipy-master/setup.py",
+ "/D/machine-learning-ex5/machine-learning-ex5/ex5/validationCurve.m",
+ "/D/machine-learning-ex5/machine-learning-ex5/ex5/learningCurve.m",
+ "/D/machine-learning-ex5/machine-learning-ex5/ex5/polyFeatures.m",
+ "/D/GitHub/ML_code/mlclass-ex5-005/mlclass-ex5/validationCurve.m",
+ "/D/GitHub/ML_code/mlclass-ex5-005/mlclass-ex5/polyFeatures.m",
+ "/D/GitHub/ML_code/mlclass-ex5-005/mlclass-ex5/learningCurve.m",
+ "/D/GitHub/ML_code/mlclass-ex5-005/mlclass-ex5/linearRegCostFunction.m",
+ "/D/machine-learning-ex5/machine-learning-ex5/ex5/linearRegCostFunction.m",
+ "/D/GitHub/python_study/try_raise.py",
+ "/D/GitHub/python_study/threeGates.py",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/Default/Default (Windows).sublime-keymap",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/User/Default (Windows).sublime-keymap",
+ "/D/GitHub/python_study/about_pillow/todo.py",
+ "/D/GitHub/python_study/netwatch/todo.py",
+ "/D/GitHub/python_study/s.cpp",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/User/Python.sublime-build",
+ "/D/GitHub/ML_code/mlclass-ex5-005/mlclass-ex5/plotFit.m",
+ "/D/GitHub/python_study/urllibkk.py",
+ "/C/Users/Asahi/Downloads/py3kcap-0.1.tar/py3kcap-0.1/py3kcap-0.1/._README",
+ "/C/Users/Asahi/Desktop/sss.reg",
+ "/D/GitHub/python_study/about_pillow/box.py",
+ "/D/Python34/Lib/site-packages/PIL/Image.py",
+ "/D/GitHub/python_study/about_pillow/thumbnails.py",
+ "/D/GitHub/python/4disland/0000/add_num.py",
+ "/D/GitHub/python_study/about_pillow/load_data.py",
+ "/D/GitHub/python/cijianzy/0000/test.py",
+ "/C/Users/Asahi/Downloads/xv-3.10a/xv-3.10a/bggen.c",
+ "/C/Users/Asahi/Downloads/xv-3.10a/xv-3.10a/INSTALL",
+ "/D/GitHub/python_study/my_cla.py",
+ "/D/GitHub/python_project/reptile/cet4Scores.py",
+ "/D/GitHub/python_study/about_pillow/img_attribute.py",
+ "/D/GitHub/python_project/reptile/ustcLib.py",
+ "/D/GitHub/python_study/about_pillow/work_with_img.py",
+ "/D/GitHub/python_study/myClass.py",
+ "/D/GitHub/python_study/urllib.py",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/User/SublimeCodeIntel.sublime-settings",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/SublimeCodeIntel/SublimeCodeIntel.sublime-settings",
+ "/D/Python34/Lib/urllib/request.py",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/Python PEP8 Autoformat/pep8_autoformat.sublime-settings",
+ "/C/Users/Asahi/Documents/Tencent Files/969525345/AppWebCache/117/1.url.cn/qun/qinfo_v2/bower_components/json2/1.0/0f9a.json2.js",
+ "/E/shadow/gui-config.json",
+ "/D/ProcessExplorer/Eula.txt",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/Default/Preferences.sublime-settings",
+ "/D/GitHub/python_study/os_to.py",
+ "/D/GitHub/python_study/myerror.py",
+ "/D/project/ustcMis.py",
+ "/D/project/ustcLib.py",
+ "/D/project/xiushibaike.py",
+ "/D/project/python-download.py",
+ "/D/GitHub/python_study/force_exception.py",
+ "/D/GitHub/python_study/py_study.sublime-project",
+ "/D/Python34/Lib/dis.py",
+ "/D/Python34/Lib/test/test_sys.py",
+ "/D/code/POJ/Robot.cpp",
+ "/D/code/POJ/DesertKing.cpp",
+ "/D/code/html&css/mypage.html",
+ "/C/Users/Asahi/Documents/AmazeUI-2.4.2/assets/css/amazeui.css",
+ "/C/Users/Asahi/Documents/AmazeUI-2.4.2/assets/js/amazeui.ie8polyfill.js",
+ "/C/Users/Asahi/Downloads/AmazeUI-2.4.2/assets/css/amazeui.css",
+ "/D/code/pystyudy/su.py",
+ "/D/project/wtftw.py",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/Python PEP8 Autoformat/Default (Windows).sublime-keymap",
+ "/D/code/html&css/stylesheet.css",
+ "/D/project/html_to_pdf.py",
+ "/D/project/sss.py",
+ "/D/code/html&css/myproject.html",
+ "/D/code/html&css/todo.css",
+ "/D/code/html&css/todo.scss",
+ "/D/code/html&css/stylesheet.scss",
+ "/D/code/html&css/todo",
+ "/D/code/html&css/a good example.css",
+ "/D/code/html&css/mystyle.css",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/HTML-CSS-JS Prettify/HTMLPrettify.sublime-settings",
+ "/D/code/html&css/mystyle.scss",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/HTML-CSS-JS Prettify/mystyle.scss",
+ "/D/code/html&css/mystyle.css.map",
+ "/C/Users/Asahi/AppData/Roaming/Sublime Text 3/Packages/Emmet/Emmet.sublime-settings",
+ "/D/project/ps.py",
+ "/D/project/python-download.tpy",
+ "/D/code/html&css/test.html",
+ "/D/code/BigDiv.c",
+ "/D/code/Binomial Distribution.cpp",
+ "/D/Test/MATLAB/ex4/ex4.m",
+ "/C/Users/Asahi/Downloads/CM3D2 Editor_files/ArrayBuffer_slice.js",
+ "/D/Test/MATLAB/ex4/sigmoidGradient.m",
+ "/C/Users/Asahi/Downloads/CM3D2 Editor_files/main.css",
+ "/D/Test/MATLAB/ex4/nnCostFunction.m",
+ "/D/Test/MATLAB/ex3/oneVsAll.m",
+ "/D/Test/MATLAB/ex3/predictOneVsAll.m",
+ "/D/Test/MATLAB/ex3/predict.m",
+ "/D/Test/MATLAB/ex3/lrCostFunction.m",
+ "/D/Test/MATLAB/ex2/costFunctionReg.m",
+ "/D/Test/MATLAB/ex2/costFunction.m",
+ "/D/Test/MATLAB/ex2/ex2_reg.m"
+ ],
+ "find":
+ {
+ "height": 38.0
+ },
+ "find_in_files":
+ {
+ "height": 96.0,
+ "where_history":
+ [
+ ]
+ },
+ "find_state":
+ {
+ "case_sensitive": false,
+ "find_history":
+ [
+ "UUID",
+ "string",
+ "ctrl+b",
+ "ctrl+shift+b",
+ "#include \"stdio.h\"\n",
+ "#",
+ "ctrl+`",
+ "console",
+ "encode()",
+ "ctrl+o",
+ "ctrl+l",
+ "link",
+ "Square",
+ "line",
+ "ctrl+l"
+ ],
+ "highlight": true,
+ "in_selection": false,
+ "preserve_case": false,
+ "regex": false,
+ "replace_history":
+ [
+ "Circle",
+ "=\"\";"
+ ],
+ "reverse": false,
+ "show_context": true,
+ "use_buffer2": true,
+ "whole_word": false,
+ "wrap": true
+ },
+ "groups":
+ [
+ {
+ "selected": 0,
+ "sheets":
+ [
+ {
+ "buffer": 0,
+ "file": "/D/GitHub/python/asahiSky/0021/test.py",
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 451,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 369,
+ 369
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "open_with_edit": true,
+ "origin_encoding": "ASCII",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 0,
+ "type": "text"
+ },
+ {
+ "buffer": 1,
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 222,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 222,
+ 222
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "auto_indent": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "default_dir": "D:\\GitHub\\python\\asahiSky",
+ "detect_indentation": false,
+ "gutter": false,
+ "history_arrows": true,
+ "indent_subsequent_lines": false,
+ "line_numbers": false,
+ "repl": true,
+ "repl_external_id": "python",
+ "repl_id": "0332263a7a204d059303aad3b596ed58",
+ "repl_restart_args":
+ {
+ "cmd":
+ [
+ "python",
+ "-u",
+ "$file_basename"
+ ],
+ "cwd": "$file_path",
+ "encoding": "utf8",
+ "extend_env":
+ {
+ "PYTHONIOENCODING": "utf-8"
+ },
+ "external_id": "python",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "type": "subprocess"
+ },
+ "repl_sublime2": false,
+ "smart_indent": false,
+ "spell_check": false,
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 1,
+ "type": "text"
+ },
+ {
+ "buffer": 2,
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 270,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 270,
+ 270
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "auto_indent": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "default_dir": "D:\\GitHub\\python\\asahiSky",
+ "detect_indentation": false,
+ "gutter": false,
+ "history_arrows": true,
+ "indent_subsequent_lines": false,
+ "line_numbers": false,
+ "repl": true,
+ "repl_external_id": "python",
+ "repl_id": "199baf9d90a54c188c62ebfcad11415f",
+ "repl_restart_args":
+ {
+ "cmd":
+ [
+ "python",
+ "-u",
+ "$file_basename"
+ ],
+ "cwd": "$file_path",
+ "encoding": "utf8",
+ "extend_env":
+ {
+ "PYTHONIOENCODING": "utf-8"
+ },
+ "external_id": "python",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "type": "subprocess"
+ },
+ "repl_sublime2": false,
+ "smart_indent": false,
+ "spell_check": false,
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 2,
+ "type": "text"
+ },
+ {
+ "buffer": 3,
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 125,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 125,
+ 125
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "auto_indent": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "default_dir": "D:\\GitHub\\python\\asahiSky",
+ "detect_indentation": false,
+ "gutter": false,
+ "history_arrows": true,
+ "indent_subsequent_lines": false,
+ "line_numbers": false,
+ "repl": true,
+ "repl_external_id": "python",
+ "repl_id": "fe691f22eb574eefbea4722cf17eb46a",
+ "repl_restart_args":
+ {
+ "cmd":
+ [
+ "python",
+ "-u",
+ "$file_basename"
+ ],
+ "cwd": "$file_path",
+ "encoding": "utf8",
+ "extend_env":
+ {
+ "PYTHONIOENCODING": "utf-8"
+ },
+ "external_id": "python",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "type": "subprocess"
+ },
+ "repl_sublime2": false,
+ "smart_indent": false,
+ "spell_check": false,
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 3,
+ "type": "text"
+ },
+ {
+ "buffer": 4,
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 453,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 387,
+ 433
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "auto_indent": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "default_dir": "D:\\GitHub\\python\\asahiSky",
+ "detect_indentation": false,
+ "gutter": false,
+ "history_arrows": true,
+ "indent_subsequent_lines": false,
+ "line_numbers": false,
+ "repl": true,
+ "repl_external_id": "python",
+ "repl_id": "2833a1b82139483caf55ac828c16235b",
+ "repl_restart_args":
+ {
+ "cmd":
+ [
+ "python",
+ "-u",
+ "$file_basename"
+ ],
+ "cwd": "$file_path",
+ "encoding": "utf8",
+ "extend_env":
+ {
+ "PYTHONIOENCODING": "utf-8"
+ },
+ "external_id": "python",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "type": "subprocess"
+ },
+ "repl_sublime2": false,
+ "smart_indent": false,
+ "spell_check": false,
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 4,
+ "type": "text"
+ },
+ {
+ "buffer": 5,
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 257,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 257,
+ 257
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "auto_indent": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "default_dir": "D:\\GitHub\\python\\asahiSky",
+ "detect_indentation": false,
+ "gutter": false,
+ "history_arrows": true,
+ "indent_subsequent_lines": false,
+ "line_numbers": false,
+ "repl": true,
+ "repl_external_id": "python",
+ "repl_id": "519227a6b1204ae089ffd0613b6075fe",
+ "repl_restart_args":
+ {
+ "cmd":
+ [
+ "python",
+ "-u",
+ "$file_basename"
+ ],
+ "cwd": "$file_path",
+ "encoding": "utf8",
+ "extend_env":
+ {
+ "PYTHONIOENCODING": "utf-8"
+ },
+ "external_id": "python",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "type": "subprocess"
+ },
+ "repl_sublime2": false,
+ "smart_indent": false,
+ "spell_check": false,
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 5,
+ "type": "text"
+ },
+ {
+ "buffer": 6,
+ "semi_transient": false,
+ "settings":
+ {
+ "buffer_size": 244,
+ "regions":
+ {
+ },
+ "selection":
+ [
+ [
+ 244,
+ 244
+ ]
+ ],
+ "settings":
+ {
+ "BracketHighlighterBusy": false,
+ "auto_complete": false,
+ "auto_indent": false,
+ "bh_regions":
+ [
+ "bh_round",
+ "bh_round_center",
+ "bh_round_open",
+ "bh_round_close",
+ "bh_round_content",
+ "bh_single_quote",
+ "bh_single_quote_center",
+ "bh_single_quote_open",
+ "bh_single_quote_close",
+ "bh_single_quote_content",
+ "bh_curly",
+ "bh_curly_center",
+ "bh_curly_open",
+ "bh_curly_close",
+ "bh_curly_content",
+ "bh_square",
+ "bh_square_center",
+ "bh_square_open",
+ "bh_square_close",
+ "bh_square_content",
+ "bh_double_quote",
+ "bh_double_quote_center",
+ "bh_double_quote_open",
+ "bh_double_quote_close",
+ "bh_double_quote_content",
+ "bh_angle",
+ "bh_angle_center",
+ "bh_angle_open",
+ "bh_angle_close",
+ "bh_angle_content",
+ "bh_c_define",
+ "bh_c_define_center",
+ "bh_c_define_open",
+ "bh_c_define_close",
+ "bh_c_define_content",
+ "bh_unmatched",
+ "bh_unmatched_center",
+ "bh_unmatched_open",
+ "bh_unmatched_close",
+ "bh_unmatched_content",
+ "bh_regex",
+ "bh_regex_center",
+ "bh_regex_open",
+ "bh_regex_close",
+ "bh_regex_content",
+ "bh_tag",
+ "bh_tag_center",
+ "bh_tag_open",
+ "bh_tag_close",
+ "bh_tag_content",
+ "bh_default",
+ "bh_default_center",
+ "bh_default_open",
+ "bh_default_close",
+ "bh_default_content"
+ ],
+ "default_dir": "D:\\GitHub\\python\\asahiSky",
+ "detect_indentation": false,
+ "gutter": false,
+ "history_arrows": true,
+ "indent_subsequent_lines": false,
+ "line_numbers": false,
+ "repl": true,
+ "repl_external_id": "python",
+ "repl_id": "cc52d72427354724acc6e404a18c231b",
+ "repl_restart_args":
+ {
+ "cmd":
+ [
+ "python",
+ "-u",
+ "$file_basename"
+ ],
+ "cwd": "$file_path",
+ "encoding": "utf8",
+ "extend_env":
+ {
+ "PYTHONIOENCODING": "utf-8"
+ },
+ "external_id": "python",
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "type": "subprocess"
+ },
+ "repl_sublime2": false,
+ "smart_indent": false,
+ "spell_check": false,
+ "syntax": "Packages/Python/Python.tmLanguage",
+ "translate_tabs_to_spaces": false
+ },
+ "translation.x": 0.0,
+ "translation.y": 0.0,
+ "zoom_level": 1.0
+ },
+ "stack_index": 6,
+ "type": "text"
+ }
+ ]
+ }
+ ],
+ "incremental_find":
+ {
+ "height": 30.0
+ },
+ "input":
+ {
+ "height": 31.0
+ },
+ "layout":
+ {
+ "cells":
+ [
+ [
+ 0,
+ 0,
+ 1,
+ 1
+ ]
+ ],
+ "cols":
+ [
+ 0.0,
+ 1.0
+ ],
+ "rows":
+ [
+ 0.0,
+ 1.0
+ ]
+ },
+ "menu_visible": true,
+ "output.CppYCM.2":
+ {
+ "height": 0.0
+ },
+ "output.exec":
+ {
+ "height": 160.0
+ },
+ "output.find_results":
+ {
+ "height": 0.0
+ },
+ "pinned_build_system": "Packages/User/C++compiler.sublime-build",
+ "project": "showmecode.sublime-project",
+ "replace":
+ {
+ "height": 56.0
+ },
+ "save_all_on_build": true,
+ "select_file":
+ {
+ "height": 0.0,
+ "last_filter": "",
+ "selected_items":
+ [
+ [
+ "",
+ "todo.py"
+ ],
+ [
+ "bino",
+ "D:\\code\\Binomial Distribution.cpp"
+ ]
+ ],
+ "width": 0.0
+ },
+ "select_project":
+ {
+ "height": 500.0,
+ "last_filter": "",
+ "selected_items":
+ [
+ [
+ "",
+ "D:\\GitHub\\data-structure\\data_structure.sublime-project"
+ ]
+ ],
+ "width": 380.0
+ },
+ "select_symbol":
+ {
+ "height": 0.0,
+ "last_filter": "",
+ "selected_items":
+ [
+ ],
+ "width": 0.0
+ },
+ "selected_group": 0,
+ "settings":
+ {
+ },
+ "show_minimap": true,
+ "show_open_files": false,
+ "show_tabs": true,
+ "side_bar_visible": true,
+ "side_bar_width": 189.0,
+ "status_bar_visible": true,
+ "template_settings":
+ {
+ "max_columns": 1
+ }
+}
diff --git a/asahiSky/0001/test.py b/asahiSky/0001/test.py
new file mode 100644
index 00000000..45584875
--- /dev/null
+++ b/asahiSky/0001/test.py
@@ -0,0 +1,19 @@
+import uuid
+
+
+def create_Num():
+ number = 200
+ result = []
+ sum = 0
+ while True:
+ i = str(uuid.uuid1())
+ if not i in result:
+ result.append(i)
+ sum += 1
+ if sum == number:
+ break
+ return result
+
+if __name__ == '__main__':
+ result = create_Num()
+ print(result)
diff --git a/asahiSky/0011/filtered_words.txt b/asahiSky/0011/filtered_words.txt
new file mode 100644
index 00000000..444eb7c6
--- /dev/null
+++ b/asahiSky/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/asahiSky/0011/test.py b/asahiSky/0011/test.py
new file mode 100644
index 00000000..8de1a417
--- /dev/null
+++ b/asahiSky/0011/test.py
@@ -0,0 +1,17 @@
+import os
+
+fileName = 'filtered_words.txt'
+nameList = open(fileName,'rt')
+nameList = nameList.readlines()
+
+print(nameList)
+while True:
+ s = input('What do you want to say:')
+ if (s+'\n') in nameList:
+ print('Freedom')
+ continue
+ if (s=='exit'):
+ break
+ else:
+ print('Human Rights')
+
diff --git a/JiYouMCC/0023/guestbook/guestbook/commits/__init__.py b/asahiSky/0021/example.py
similarity index 100%
rename from JiYouMCC/0023/guestbook/guestbook/commits/__init__.py
rename to asahiSky/0021/example.py
diff --git a/asahiSky/0021/test.py b/asahiSky/0021/test.py
new file mode 100644
index 00000000..c81b14d4
--- /dev/null
+++ b/asahiSky/0021/test.py
@@ -0,0 +1,24 @@
+import os
+from hashlib import sha256
+from hmac import HMAC
+
+
+def encrypt_password(password, salt=None):
+
+ if salt is None:
+ salt = str(os.urandom(8))
+
+ salt = salt.encode('utf-8')
+ assert 8 == len(salt)
+ if isinstance(password, str):
+ password = password.encode('UTF-8')
+
+
+ result = password
+ for i in range(10):
+ result = HMAC(result,salt,sha256).digest()
+
+ return salt+result
+
+
+print(encrypt_password('Hty980204'))
diff --git a/bbos1994/0001/discount.py b/bbos1994/0001/discount.py
new file mode 100644
index 00000000..8274da28
--- /dev/null
+++ b/bbos1994/0001/discount.py
@@ -0,0 +1,25 @@
+#! /usr/bin/python3
+# -*-coding:utf-8 -*-
+
+__author__ = 'TonyZhu'
+
+from random import randint
+
+str = 'abcdefghigklmnopqrstuvwxyz123456789'
+
+def produce(count):
+ discountNumArray = []
+ for _count in range(count):
+ discountNum = []
+ for i in range(10):
+ _index = randint(0,34)
+ discountNum.append(str[_index])
+ discountNumArray.append(''.join(discountNum))
+ return discountNumArray
+
+
+
+if __name__ == '__main__':
+ discountNumArray = produce(10)
+ for _array in discountNumArray:
+ print(_array)
\ No newline at end of file
diff --git a/bbos1994/0002/discount.py b/bbos1994/0002/discount.py
new file mode 100644
index 00000000..8274da28
--- /dev/null
+++ b/bbos1994/0002/discount.py
@@ -0,0 +1,25 @@
+#! /usr/bin/python3
+# -*-coding:utf-8 -*-
+
+__author__ = 'TonyZhu'
+
+from random import randint
+
+str = 'abcdefghigklmnopqrstuvwxyz123456789'
+
+def produce(count):
+ discountNumArray = []
+ for _count in range(count):
+ discountNum = []
+ for i in range(10):
+ _index = randint(0,34)
+ discountNum.append(str[_index])
+ discountNumArray.append(''.join(discountNum))
+ return discountNumArray
+
+
+
+if __name__ == '__main__':
+ discountNumArray = produce(10)
+ for _array in discountNumArray:
+ print(_array)
\ No newline at end of file
diff --git a/bbos1994/0002/saveDiscountToDB.py b/bbos1994/0002/saveDiscountToDB.py
new file mode 100644
index 00000000..fb898e1a
--- /dev/null
+++ b/bbos1994/0002/saveDiscountToDB.py
@@ -0,0 +1,23 @@
+#! /usr/bin/python3
+# -*- coding:utf-8 -*-
+
+__author__ = 'TonyZhu'
+
+import mysql.connector
+import discount
+
+def saveToMySQL(discount_str):
+ conn = mysql.connector.connect(user = 'root',password='password',database = 'Test')
+ cursor = conn.cursor()
+ cursor.execute('insert into discount values(%s)',[discount_str])
+ count = cursor.rowcount
+
+ conn.commit()
+ cursor.close()
+ return count
+
+if __name__ == '__main__':
+ discount_arr = discount.produce(3)
+ for _discount in discount_arr:
+ flag = True if saveToMySQL(_discount) == 1 else False
+ print(flag)
\ No newline at end of file
diff --git a/bbos1994/0004/countWord.py b/bbos1994/0004/countWord.py
new file mode 100644
index 00000000..9b93e133
--- /dev/null
+++ b/bbos1994/0004/countWord.py
@@ -0,0 +1,31 @@
+#! /usr/local/bin/python3
+# -*- coding:utf-8 -*-
+
+__author__='TonyZhu'
+
+import re
+# import os
+
+# print(os.getcwd()+'/words.txt')
+def wordStatistics(path):
+ wordDict = {}
+ with open(path,'r') as file:
+ for line in file:
+ wordsSplitByPunc = re.findall(r'[a-z0-9]+',line.lower())
+ for words in wordsSplitByPunc:
+ wordList = words.strip().split() # split by space
+ for _word in wordList:
+ if wordDict.has_key(_word):
+ wordCount = wordDict.get(_word)
+ wordCount+=1
+ wordDict[_word] = wordCount
+ else:
+ wordDict[_word] = 1
+ # wordListPerLine = line.lower().replace(string.punctuation,'').strip().split(' ')
+ return wordDict
+
+if __name__ == '__main__':
+ import os
+ wordDict = wordStatistics(os.getcwd()+'/word.txt')
+ for k,v in wordDict.items():
+ print('key is \'%s\',value is %s'%(k,v))
diff --git a/bbos1994/0004/word.txt b/bbos1994/0004/word.txt
new file mode 100644
index 00000000..07c117b2
--- /dev/null
+++ b/bbos1994/0004/word.txt
@@ -0,0 +1,2 @@
+l am the big big boy in the world;
+The world is big big include the boy ;
diff --git a/chris5641/0000/arial.ttf b/chris5641/0000/arial.ttf
new file mode 100644
index 00000000..ad7d8eab
Binary files /dev/null and b/chris5641/0000/arial.ttf differ
diff --git a/chris5641/0000/img.png b/chris5641/0000/img.png
new file mode 100644
index 00000000..589711ce
Binary files /dev/null and b/chris5641/0000/img.png differ
diff --git a/chris5641/0000/img.py b/chris5641/0000/img.py
new file mode 100644
index 00000000..42ef1ca0
--- /dev/null
+++ b/chris5641/0000/img.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+"""
+第 0000 题:将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+"""
+from PIL import Image, ImageFont, ImageDraw
+
+__author__ = 'Chris5641'
+
+
+def img_add_num(num=1):
+ img = Image.open('img.png')
+ w, h = img.size
+ font = ImageFont.truetype('arial.ttf', w // 4)
+ draw = ImageDraw.Draw(img)
+ draw.text((w*3//4, 0), str(num), font=font, fill='red')
+ img.save('img2.png')
+
+
+if __name__ == '__main__':
+ img_add_num(5)
diff --git a/chris5641/0001/ActivationCode.txt b/chris5641/0001/ActivationCode.txt
new file mode 100644
index 00000000..c8e7cd2b
--- /dev/null
+++ b/chris5641/0001/ActivationCode.txt
@@ -0,0 +1,200 @@
+jasayyhci
+xx1ia7v1b
+zy546onps
+vetsatr2w
+x6f4y3468
+3g1pw108k
+wuyrji08q
+rzlzxs4xg
+bmir749bu
+v7inkwzoi
+68z0kq6ur
+pypmiu5og
+jidqni4fz
+c6b29b9kb
+r9znbbbmj
+331l6y08b
+m4nas4he4
+l4a42ypad
+xfc8h6wvo
+t4khbx7j1
+9hxvrrsah
+imbmie4ky
+e0actu2xz
+3u3amqtu0
+lcovbjpm3
+ds8zbk5jh
+o9y9s74ac
+jdldifamh
+nw15e3qf4
+w71kk7i6a
+iasy74ovn
+42v6hkfvp
+xtnwhy7mg
+id3z7ved4
+jr97n77ue
+3mjujcppy
+0tvfnt287
+llxys3ki8
+umldlkaxz
+8cc8tjlq7
+6y43a71ov
+2wbx19xmq
+3ypbwgy1h
+zazhe7d5r
+p5endwk3e
+wrczjq0cu
+41cuvr7z7
+u6dek96c9
+ek9cb76q3
+u7yybk8hv
+6fksdba4l
+9rehlyiua
+oh2mxkspj
+j32ik9hiu
+o4k7m9md3
+5slv1d2gd
+7gh1z7o0b
+1l82vu6nz
+jntsvp6hs
+k5pfdggxp
+zyo25p2qs
+joayw5bea
+0mm39197z
+0lha1urmm
+6m2k243cs
+zk80uvofv
+d9yzqmwf4
+j8klfjxhx
+uey550hc1
+xgvplru0h
+53ccnuxym
+5pg6a5zgj
+wljjnwwtq
+dg9eo40wk
+3xolm3tox
+7rvurzud3
+3ebemea0y
+9c7orc1qs
+pw6jn47yy
+pre1ixi35
+ph8et0vh0
+z2oh67j2b
+os2trzxuo
+h6njf1llw
+qm6q1erka
+345k0m9s9
+72xtf32fu
+zhrybh3ck
+wj7jx3oxi
+0rirzl6oe
+1d4a20r2g
+tnx7a3ekm
+o2xzp9hes
+fny6pazna
+scy17wh0h
+o3g4ptomq
+5w855mrna
+h9f1dryt4
+67b4z8hwk
+nsqicfb7k
+wurfj1qti
+ikn04uuza
+3d5n4jf2a
+79b0uji60
+pcf9exi5g
+tx90dwi6w
+u0qfcw2hb
+ds88iqnsw
+2ia1s623p
+1bcru8hig
+5sshn4khr
+9ivzpka1m
+n3vxc9j7v
+t6evn0x15
+xtb7ejk2x
+jzowhvmfn
+1a15ifimy
+16f5wk3wg
+8phllmc2g
+algx3osnk
+eejbrwtjf
+svjuctaix
+nmzhv1che
+9phravp6a
+pjo3236az
+zdtch5wvm
+olwpmadwq
+oosxw38lq
+ccf5ha2f6
+9u6tmxhsg
+8uwbf2jsj
+fxuevlu97
+pd1aeo1wn
+p731m62yt
+d84boj36g
+1z4t8492r
+ft2qi59n7
+d807oy13b
+ks2jzdn6l
+zdarbnlqw
+lq7o5ai9d
+k1sfr0g68
+tonfk9tz9
+ydii8sjta
+g9jn7bfb8
+h93ujq3te
+75lj46n1u
+kxcoj73gs
+370yg3fp2
+bjzq7a451
+db5ykml2w
+d2qflgw4k
+hes8v3asn
+ebt0ic9iy
+o4l215p31
+0a4kc2zld
+ez8bjzy5v
+3b1g5d8oi
+oobggx057
+p203tasho
+7u6j7m5qw
+stbnkwu33
+sgpf6xiyk
+6gd0v5rdt
+rd3ypbfb0
+mn3qtqtsg
+e2pu7kgne
+zup3mcpin
+ocvd586pd
+77ali7nip
+s4qv5kfz7
+xtr9fulx1
+sc2kcve4j
+l4jdugez4
+80s0mwdnz
+o57vts6gw
+unqar6rwq
+3xl01wlpi
+6uolx1fu2
+2x7cveh1t
+1qdhuzz8l
+b26tsrqyq
+ebbkqoj7d
+gaf1kxh2r
+y6sugvmhc
+7k3igekka
+pnnyrx5up
+9jeetttms
+ui6bdn6rj
+i0r72zw85
+6bylsgtzc
+s5su7plet
+c6ke4pl9g
+rbprh6m6l
+a8ew2e39q
+bpz51z3bz
+vyum7atru
+dcksu3tb1
+j0jyyczuq
+21va9yfqs
diff --git a/chris5641/0001/activation_code.py b/chris5641/0001/activation_code.py
new file mode 100644
index 00000000..8cb6c1ca
--- /dev/null
+++ b/chris5641/0001/activation_code.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+"""
+第 0001 题:做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+"""
+import random
+
+__author__ = 'Chris5641'
+
+
+def get_code():
+ f = open('ActivationCode.txt', 'w')
+ char_seq = 'abcdefghijklmnopqrstuvwxyz0123456789'
+ for i in range(200):
+ code = ''
+ for j in range(9):
+ code += random.choice(char_seq)
+ f.write(code+'\n')
+ f.close()
+
+
+if __name__ == '__main__':
+ get_code()
+
diff --git a/chris5641/0002/ActivationCode.txt b/chris5641/0002/ActivationCode.txt
new file mode 100644
index 00000000..c8e7cd2b
--- /dev/null
+++ b/chris5641/0002/ActivationCode.txt
@@ -0,0 +1,200 @@
+jasayyhci
+xx1ia7v1b
+zy546onps
+vetsatr2w
+x6f4y3468
+3g1pw108k
+wuyrji08q
+rzlzxs4xg
+bmir749bu
+v7inkwzoi
+68z0kq6ur
+pypmiu5og
+jidqni4fz
+c6b29b9kb
+r9znbbbmj
+331l6y08b
+m4nas4he4
+l4a42ypad
+xfc8h6wvo
+t4khbx7j1
+9hxvrrsah
+imbmie4ky
+e0actu2xz
+3u3amqtu0
+lcovbjpm3
+ds8zbk5jh
+o9y9s74ac
+jdldifamh
+nw15e3qf4
+w71kk7i6a
+iasy74ovn
+42v6hkfvp
+xtnwhy7mg
+id3z7ved4
+jr97n77ue
+3mjujcppy
+0tvfnt287
+llxys3ki8
+umldlkaxz
+8cc8tjlq7
+6y43a71ov
+2wbx19xmq
+3ypbwgy1h
+zazhe7d5r
+p5endwk3e
+wrczjq0cu
+41cuvr7z7
+u6dek96c9
+ek9cb76q3
+u7yybk8hv
+6fksdba4l
+9rehlyiua
+oh2mxkspj
+j32ik9hiu
+o4k7m9md3
+5slv1d2gd
+7gh1z7o0b
+1l82vu6nz
+jntsvp6hs
+k5pfdggxp
+zyo25p2qs
+joayw5bea
+0mm39197z
+0lha1urmm
+6m2k243cs
+zk80uvofv
+d9yzqmwf4
+j8klfjxhx
+uey550hc1
+xgvplru0h
+53ccnuxym
+5pg6a5zgj
+wljjnwwtq
+dg9eo40wk
+3xolm3tox
+7rvurzud3
+3ebemea0y
+9c7orc1qs
+pw6jn47yy
+pre1ixi35
+ph8et0vh0
+z2oh67j2b
+os2trzxuo
+h6njf1llw
+qm6q1erka
+345k0m9s9
+72xtf32fu
+zhrybh3ck
+wj7jx3oxi
+0rirzl6oe
+1d4a20r2g
+tnx7a3ekm
+o2xzp9hes
+fny6pazna
+scy17wh0h
+o3g4ptomq
+5w855mrna
+h9f1dryt4
+67b4z8hwk
+nsqicfb7k
+wurfj1qti
+ikn04uuza
+3d5n4jf2a
+79b0uji60
+pcf9exi5g
+tx90dwi6w
+u0qfcw2hb
+ds88iqnsw
+2ia1s623p
+1bcru8hig
+5sshn4khr
+9ivzpka1m
+n3vxc9j7v
+t6evn0x15
+xtb7ejk2x
+jzowhvmfn
+1a15ifimy
+16f5wk3wg
+8phllmc2g
+algx3osnk
+eejbrwtjf
+svjuctaix
+nmzhv1che
+9phravp6a
+pjo3236az
+zdtch5wvm
+olwpmadwq
+oosxw38lq
+ccf5ha2f6
+9u6tmxhsg
+8uwbf2jsj
+fxuevlu97
+pd1aeo1wn
+p731m62yt
+d84boj36g
+1z4t8492r
+ft2qi59n7
+d807oy13b
+ks2jzdn6l
+zdarbnlqw
+lq7o5ai9d
+k1sfr0g68
+tonfk9tz9
+ydii8sjta
+g9jn7bfb8
+h93ujq3te
+75lj46n1u
+kxcoj73gs
+370yg3fp2
+bjzq7a451
+db5ykml2w
+d2qflgw4k
+hes8v3asn
+ebt0ic9iy
+o4l215p31
+0a4kc2zld
+ez8bjzy5v
+3b1g5d8oi
+oobggx057
+p203tasho
+7u6j7m5qw
+stbnkwu33
+sgpf6xiyk
+6gd0v5rdt
+rd3ypbfb0
+mn3qtqtsg
+e2pu7kgne
+zup3mcpin
+ocvd586pd
+77ali7nip
+s4qv5kfz7
+xtr9fulx1
+sc2kcve4j
+l4jdugez4
+80s0mwdnz
+o57vts6gw
+unqar6rwq
+3xl01wlpi
+6uolx1fu2
+2x7cveh1t
+1qdhuzz8l
+b26tsrqyq
+ebbkqoj7d
+gaf1kxh2r
+y6sugvmhc
+7k3igekka
+pnnyrx5up
+9jeetttms
+ui6bdn6rj
+i0r72zw85
+6bylsgtzc
+s5su7plet
+c6ke4pl9g
+rbprh6m6l
+a8ew2e39q
+bpz51z3bz
+vyum7atru
+dcksu3tb1
+j0jyyczuq
+21va9yfqs
diff --git a/chris5641/0002/code2sql.py b/chris5641/0002/code2sql.py
new file mode 100644
index 00000000..4f81226b
--- /dev/null
+++ b/chris5641/0002/code2sql.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+"""
+第 0002 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。
+"""
+import pymysql
+__author__ = 'Chris5641'
+
+
+def code2sql():
+ f = open('ActivationCode.txt', 'r')
+ conn = pymysql.connect(user='root', passwd='password')
+ cursor = conn.cursor()
+ cursor.execute('create database if not exists accode')
+ cursor.execute('use accode')
+ cursor.execute('create table accode(id int auto_increment primary key, code varchar(10))')
+ for line in f.readlines():
+ cursor.execute('insert into accode (code) values (%s)', [line.strip()])
+ conn.commit()
+ f.close()
+ cursor.close()
+ conn.close()
+
+
+if __name__ == '__main__':
+ code2sql()
diff --git a/chris5641/0003/ActivationCode.txt b/chris5641/0003/ActivationCode.txt
new file mode 100644
index 00000000..c8e7cd2b
--- /dev/null
+++ b/chris5641/0003/ActivationCode.txt
@@ -0,0 +1,200 @@
+jasayyhci
+xx1ia7v1b
+zy546onps
+vetsatr2w
+x6f4y3468
+3g1pw108k
+wuyrji08q
+rzlzxs4xg
+bmir749bu
+v7inkwzoi
+68z0kq6ur
+pypmiu5og
+jidqni4fz
+c6b29b9kb
+r9znbbbmj
+331l6y08b
+m4nas4he4
+l4a42ypad
+xfc8h6wvo
+t4khbx7j1
+9hxvrrsah
+imbmie4ky
+e0actu2xz
+3u3amqtu0
+lcovbjpm3
+ds8zbk5jh
+o9y9s74ac
+jdldifamh
+nw15e3qf4
+w71kk7i6a
+iasy74ovn
+42v6hkfvp
+xtnwhy7mg
+id3z7ved4
+jr97n77ue
+3mjujcppy
+0tvfnt287
+llxys3ki8
+umldlkaxz
+8cc8tjlq7
+6y43a71ov
+2wbx19xmq
+3ypbwgy1h
+zazhe7d5r
+p5endwk3e
+wrczjq0cu
+41cuvr7z7
+u6dek96c9
+ek9cb76q3
+u7yybk8hv
+6fksdba4l
+9rehlyiua
+oh2mxkspj
+j32ik9hiu
+o4k7m9md3
+5slv1d2gd
+7gh1z7o0b
+1l82vu6nz
+jntsvp6hs
+k5pfdggxp
+zyo25p2qs
+joayw5bea
+0mm39197z
+0lha1urmm
+6m2k243cs
+zk80uvofv
+d9yzqmwf4
+j8klfjxhx
+uey550hc1
+xgvplru0h
+53ccnuxym
+5pg6a5zgj
+wljjnwwtq
+dg9eo40wk
+3xolm3tox
+7rvurzud3
+3ebemea0y
+9c7orc1qs
+pw6jn47yy
+pre1ixi35
+ph8et0vh0
+z2oh67j2b
+os2trzxuo
+h6njf1llw
+qm6q1erka
+345k0m9s9
+72xtf32fu
+zhrybh3ck
+wj7jx3oxi
+0rirzl6oe
+1d4a20r2g
+tnx7a3ekm
+o2xzp9hes
+fny6pazna
+scy17wh0h
+o3g4ptomq
+5w855mrna
+h9f1dryt4
+67b4z8hwk
+nsqicfb7k
+wurfj1qti
+ikn04uuza
+3d5n4jf2a
+79b0uji60
+pcf9exi5g
+tx90dwi6w
+u0qfcw2hb
+ds88iqnsw
+2ia1s623p
+1bcru8hig
+5sshn4khr
+9ivzpka1m
+n3vxc9j7v
+t6evn0x15
+xtb7ejk2x
+jzowhvmfn
+1a15ifimy
+16f5wk3wg
+8phllmc2g
+algx3osnk
+eejbrwtjf
+svjuctaix
+nmzhv1che
+9phravp6a
+pjo3236az
+zdtch5wvm
+olwpmadwq
+oosxw38lq
+ccf5ha2f6
+9u6tmxhsg
+8uwbf2jsj
+fxuevlu97
+pd1aeo1wn
+p731m62yt
+d84boj36g
+1z4t8492r
+ft2qi59n7
+d807oy13b
+ks2jzdn6l
+zdarbnlqw
+lq7o5ai9d
+k1sfr0g68
+tonfk9tz9
+ydii8sjta
+g9jn7bfb8
+h93ujq3te
+75lj46n1u
+kxcoj73gs
+370yg3fp2
+bjzq7a451
+db5ykml2w
+d2qflgw4k
+hes8v3asn
+ebt0ic9iy
+o4l215p31
+0a4kc2zld
+ez8bjzy5v
+3b1g5d8oi
+oobggx057
+p203tasho
+7u6j7m5qw
+stbnkwu33
+sgpf6xiyk
+6gd0v5rdt
+rd3ypbfb0
+mn3qtqtsg
+e2pu7kgne
+zup3mcpin
+ocvd586pd
+77ali7nip
+s4qv5kfz7
+xtr9fulx1
+sc2kcve4j
+l4jdugez4
+80s0mwdnz
+o57vts6gw
+unqar6rwq
+3xl01wlpi
+6uolx1fu2
+2x7cveh1t
+1qdhuzz8l
+b26tsrqyq
+ebbkqoj7d
+gaf1kxh2r
+y6sugvmhc
+7k3igekka
+pnnyrx5up
+9jeetttms
+ui6bdn6rj
+i0r72zw85
+6bylsgtzc
+s5su7plet
+c6ke4pl9g
+rbprh6m6l
+a8ew2e39q
+bpz51z3bz
+vyum7atru
+dcksu3tb1
+j0jyyczuq
+21va9yfqs
diff --git a/chris5641/0003/code2redis.py b/chris5641/0003/code2redis.py
new file mode 100644
index 00000000..1817bc4b
--- /dev/null
+++ b/chris5641/0003/code2redis.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+"""
+第 0003 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 Redis 非关系型数据库中。
+"""
+import redis
+__author__ = 'Chris5641'
+
+
+def code2redis():
+ i = 0
+ f = open('ActivationCode.txt', 'r')
+ r = redis.Redis(host='localhost', port=6379)
+ for line in f.readlines():
+ r.zadd('codes', line.strip(), i)
+ i += 1
+
+
+if __name__ == '__main__':
+ code2redis()
diff --git a/chris5641/0004/GetWordNum.py b/chris5641/0004/GetWordNum.py
new file mode 100644
index 00000000..dee7aee5
--- /dev/null
+++ b/chris5641/0004/GetWordNum.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+"""
+第 0004 题:任一个英文的纯文本文件,统计其中的单词出现的个数。
+"""
+import re
+__author__ = 'Chris5641'
+
+
+def get_num():
+ num = 0
+ f = open('test.txt', 'r')
+ for line in f.readlines():
+ num += len(re.findall(r'[a-zA-Z0-9\']+', line))
+ f.close()
+ return num
+
+
+if __name__ == '__main__':
+ print(get_num())
diff --git a/chris5641/0004/test.txt b/chris5641/0004/test.txt
new file mode 100644
index 00000000..d9695573
--- /dev/null
+++ b/chris5641/0004/test.txt
@@ -0,0 +1,3 @@
+Microsoft's is a big, computer compony.
+this is a test!
+
diff --git a/chris5641/0005/ChangeResolution.py b/chris5641/0005/ChangeResolution.py
new file mode 100644
index 00000000..5189a86a
--- /dev/null
+++ b/chris5641/0005/ChangeResolution.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+"""
+第 0005 题:你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+"""
+from PIL import Image
+import os
+
+__author__ = 'Chris5641'
+
+
+def change_resolution(path):
+ for picname in os.listdir(path):
+ picpath = os.path.join(path, picname)
+ with Image.open(picpath) as im:
+ w, h = im.size
+ n = w/1366 if (w/1366) >= (h/640) else h/640
+ im.thumbnail((w/n, h/n))
+ im.save('finish_'+picname.split('.')[0]+'.jpg', 'jpeg')
+
+
+if __name__ == '__main__':
+ change_resolution('/home/chris/pictures/123')
diff --git a/cijianzy/0000/test.py b/cijianzy/0000/test.py
index a0e48067..83888204 100644
--- a/cijianzy/0000/test.py
+++ b/cijianzy/0000/test.py
@@ -2,14 +2,16 @@
import ImageDraw
import ImageFont
im = Image.open(u'test.jpg')
-
-#im.show()
-#n = im.size
+#打开图片
x = ImageDraw.Draw(im)
+#绘制图片
n = im.size
+#得到大小
font = ImageFont.truetype('arial.ttf', n[0]/5)
-
+#设置字体和字体大小
x.text((n[0]*4/5,0),"7",fill = (255,0,0),font = font)
-
-im.show()
+#输入文字
+#im.show()
im.save('output.jpg','JPEG')
+#保存图片
+
diff --git a/cijianzy/0001/code.py b/cijianzy/0001/code.py
new file mode 100644
index 00000000..85f36566
--- /dev/null
+++ b/cijianzy/0001/code.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+#coding:utf-8
+# Author: cijianzy
+# Created Time: 2015年06月14日 星期日 17时43分18秒
+
+from uuid import uuid4
+def get_key(num):
+ key_list = [str(uuid4()) for i in range(num)]
+ return key_list
+print get_key(200)
+
diff --git a/cnwangjie b/cnwangjie
new file mode 160000
index 00000000..98664848
--- /dev/null
+++ b/cnwangjie
@@ -0,0 +1 @@
+Subproject commit 986648481f91753fe53fc8457df9a30cdfb7c395
diff --git a/crazyacking/0000/add_num.py b/crazyacking/0000/add_num.py
new file mode 100644
index 00000000..4361c9fc
--- /dev/null
+++ b/crazyacking/0000/add_num.py
@@ -0,0 +1,33 @@
+#!/usr /bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+将你的 QQ 头像右上角加上红色的数字,类似于微信未读信息数量提示效果
+Pillow:Python Imaging Library
+PIL.ImageDraw.Draw.text(xy, text, fill=None, font=None, anchor=None)
+"""
+from PIL import Image, ImageDraw, ImageFont
+
+class Image_unread_message:
+ def open(self,path):
+ self.im=Image.open(path)
+ return True
+ def __init__(self):
+ self.fnt=None
+ self.im=None
+
+ def setFont(self,font_path,size):
+ self.fnt=ImageFont.truetype(font_path,size)
+ return True
+ def draw_text(self,position,str,colour,fnSSt):
+ draw=ImageDraw.Draw(self.im)
+ draw.text(position,str,fill=colour,font=fnt)
+ self.im.show()
+ self.im.save(str+'num'+'.jpg')
+ return True
+
+
+test=Image_unread_message()
+test.open('test.jpg')
+test.setFont('ahronbd.ttf',80)
+test.draw_text((160,-20),'4',(255,0,0),test.fnt)
\ No newline at end of file
diff --git a/crazyacking/0000/ahronbd.ttf b/crazyacking/0000/ahronbd.ttf
new file mode 100644
index 00000000..a0bd1911
Binary files /dev/null and b/crazyacking/0000/ahronbd.ttf differ
diff --git a/crazyacking/0000/simsunb.ttf b/crazyacking/0000/simsunb.ttf
new file mode 100644
index 00000000..36ad1220
Binary files /dev/null and b/crazyacking/0000/simsunb.ttf differ
diff --git a/crazyacking/0001/0001.py b/crazyacking/0001/0001.py
new file mode 100644
index 00000000..0926d226
--- /dev/null
+++ b/crazyacking/0001/0001.py
@@ -0,0 +1,7 @@
+import uuid
+"""
+做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用**生成激活码**(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+"""
+
+for i in range(200):
+ print(str(uuid.uuid4()))
\ No newline at end of file
diff --git a/crazyacking/0002/0002.py b/crazyacking/0002/0002.py
new file mode 100644
index 00000000..89749a0d
--- /dev/null
+++ b/crazyacking/0002/0002.py
@@ -0,0 +1,88 @@
+#coding=utf-8
+
+import uuid
+
+import MySQLdb
+
+"""
+002, 将 0001 题生成的 200 个激活码(或者优惠券)保存到 **MySQL** 关系型数据库中
+"""
+
+
+class ActivationCode(object):
+ def __init__(self, code_count, database, username, host='localhost', port=3306, password=''):
+ self._host = host
+ self._username = username
+ self._password = password
+ self._database = database
+ self._port = port
+
+ self.codes = self._generate_activation_code(code_count)
+ #print self.codes
+
+
+ def _get_mysql_instance(self):
+ params = {
+ 'host': self._host,
+ 'user': self._username,
+ 'passwd': self._password,
+ 'db': self._database,
+ 'port': self._port,
+ }
+ return MySQLdb.connect(**params)
+
+
+ def _generate_activation_code(self, count):
+ code_list = []
+ for i in xrange(count):
+ code = str(uuid.uuid4()).replace('-', '').upper()
+ if not code in code_list:
+ code_list.append(code)
+
+ return code_list
+
+
+ def store_to_mysql(self):
+ if self.codes:
+ conn = self._get_mysql_instance()
+
+ try:
+ cur = conn.cursor()
+
+ # clear old datas
+ cur.execute('delete from code')
+
+ # insert mutilple code
+ for code in self.codes:
+ cur.execute("insert into code(code) values('%s')" % code)
+
+ conn.commit()
+ cur.close()
+ conn.close()
+
+ return True
+ except MySQLdb.Error,e:
+ conn.rollback()
+ print "Mysql Error %d: %s" % (e.args[0], e.args[1])
+
+ return False
+
+
+ def print_activation_code(self):
+ conn = self._get_mysql_instance()
+
+ try:
+ cur = conn.cursor()
+ cur.execute('select code from code')
+
+ results = cur.fetchall()
+ for row in results:
+ print row[0]
+ except MySQLdb.Error,e:
+ print "Mysql Error %d: %s" % (e.args[0], e.args[1])
+
+
+if __name__ == "__main__":
+ active_code = ActivationCode(200, database='Test', username='root')
+ if active_code.store_to_mysql():
+ active_code.print_activation_code()
diff --git a/crazyacking/0003/Activation_code.txt b/crazyacking/0003/Activation_code.txt
new file mode 100644
index 00000000..2174d5e9
--- /dev/null
+++ b/crazyacking/0003/Activation_code.txt
@@ -0,0 +1,200 @@
+xsdPh4f
+8qoW07j
+Tnj1HmB
+zIT8qAB
+FnDnNi0
+3QpZj1O
+KlkwRfE
+wsdy8NQ
+pvXSdlY
+pp9LWSn
+dS6zQnC
+WbCHjJH
+jAjJtli
+38ykU8k
+wMNCQ1m
+X245rLW
+UWizZgo
+YkLduIF
+v1GJSdz
+BNMZuX5
+yIjRDQu
+GNvXIIF
+DbWEtTD
+F1W2jtg
+54bWrUb
+b2IEbzZ
+xcaOsuG
+uXOhegJ
+TvKkKSN
+KgSCoEJ
+elrc80r
+DOXohsE
+KjdnEGw
+ffqwUwX
+xdRhBkT
+ruceTaI
+RZZTs0h
+K5EKaNj
+VqW5vfD
+ownScnm
+7rGnRPw
+TiaUfFy
+7YSMWr0
+C9YkCdo
+6ikBwSy
+qiETLg6
+aKDPWxE
+b3cCXhY
+MKA2OKu
+9EdcKmD
+0qeKaui
+ejpFFlC
+SmC9Nor
+mCPyWEv
+kStIHKd
+9DkalxT
+jWColwT
+GcTkSXk
+V5UrDSg
+ekrLbCf
+cQXARzF
+UP7ksMd
+MGVEVVH
+tKlLsKA
+bz978B2
+3d6BchN
+FQaaOIJ
+CVOzpVy
+5S41CmW
+BrEcQpZ
+RgpvtTu
+eNIFEtp
+IYA1GXy
+aVofZsk
+RtR05Dr
+RtKSB4v
+ylWhH4I
+E1rTSQQ
+km1GyrM
+1YhC46I
+Yth5Mop
+h1rq8Zt
+1N33N7j
+k5BXCmg
+E1wPDwt
+uvWFfTk
+QaExb9R
+xmbbV3I
+Jiqxv4q
+t86xdCq
+hjnITkf
+X7QfU9R
+BNrvD6R
+TrD8RKS
+j4Hb5m0
+Ej01pN1
+DjBieTP
+TF1Yhw3
+P8Hvl0h
+iuQIBSZ
+7hYH1nu
+Keddid3
+UMhZAlX
+yEBxCNV
+h9eUhig
+Uf2FGRg
+D6mGp0Y
+slkzCJF
+d2MtwFg
+H4P7dA5
+dh3uvgk
+hV67DzW
+kS6veXF
+QWs0IBe
+mUTAsKo
+bA3ZmDA
+bdzo5aa
+ssP0Ioy
+bSzxPwX
+Yvx2TwW
+B8RHjhI
+f1k9PHy
+JT6UjuI
+UrUzUMT
+gatlmvG
+Z0IcjOW
+WSeJD71
+xn2TEqq
+l6XMop0
+cebTTJx
+JAFSQP7
+hP86mW8
+uTbUfPI
+uInfJSv
+PkWbVsD
+Soc04tS
+Trv2Tli
+p9OQOR6
+2E63ef8
+mOIm6vn
+pvY48CT
+18u0DeJ
+G65JpBW
+fXAyrcL
+nujVYv3
+Zmcu79i
+NPtWjMc
+Xhsc44i
+cpVKhfM
+QiwFFGB
+YbBpW33
+ShzJeoe
+rRVzaA2
+9P9TjOA
+9DCcFW6
+eV9kso8
+ylNtW8l
+cg4NDrW
+z9jG8LY
+p8DRxic
+v60BL2p
+7gXCYhl
+bRFKTnV
+9hAeREO
+UF8Ushb
+zHnAsxJ
+qIEgxWg
+B2gMwr8
+fyTx67J
+14iRytg
+hLludCg
+jMVkbU1
+lFQQ1YX
+stOGahb
+cgB8aJC
+eVyrvc7
+eftb4Ge
+MFyiWOO
+hAf6Hha
+b884B8F
+qXaVpDs
+z1PYqm3
+YXZz3YI
+LZgQpdZ
+HpYkmdw
+uhR1wth
+mwfz0kk
+9AlVldl
+pQ8xzhi
+5tPou1g
+ahNqlgN
+euCV2IH
+tg9b7s8
+Z4r2aA6
+JYUijB2
+k6tMe54
+LJuhb7x
+Z6VPjwe
+U3qgd0G
+a9RH5fF
diff --git a/crazyacking/0003/store_redis.py b/crazyacking/0003/store_redis.py
new file mode 100644
index 00000000..d286d380
--- /dev/null
+++ b/crazyacking/0003/store_redis.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+
+import redis
+
+def store_redis(filepath):
+ r = redis.StrictRedis(host = 'localhost', port = 6379, db = 0)
+ f = open(filepath, 'rb')
+ for line in f.readlines():
+ code = line.strip()
+ r.lpush('code', code)
+
+if __name__ == '__main__':
+ store_redis('Activation_code.txt')
diff --git a/crazyacking/0005/changeResolution.py b/crazyacking/0005/changeResolution.py
new file mode 100644
index 00000000..cb67a271
--- /dev/null
+++ b/crazyacking/0005/changeResolution.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+'''
+第 0005 题:你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小
+'''
+from PIL import Image
+
+def change_img(path,size=(1136,640)):
+ im = Image.open(path)
+ size=(size[1],size[0]) if im.size[1]>im.size[0] else size
+ im.thumbnail(size,Image.ANTIALIAS) #Image.ANTIALIAS为滤镜参数
+ im.save('result-'+path)
+
+change_img('1.jpg')
diff --git a/deng47/problem 0000/solution for problem 0000.py b/deng47/problem 0000/solution for problem 0000.py
new file mode 100644
index 00000000..e613f3f5
--- /dev/null
+++ b/deng47/problem 0000/solution for problem 0000.py
@@ -0,0 +1,13 @@
+from PIL import Image, ImageDraw, ImageFont
+
+def add_num(img):
+ draw = ImageDraw.Draw(img)
+ myfont = ImageFont.truetype('C:/windows/fonts/Calibri.ttf', size=90)
+ fillcolor = "#ff0000"
+ width, height = img.size
+ draw.text((width-90, 10), '4', font=myfont, fill=fillcolor)
+ img.save('result.jpg','jpeg')
+
+if __name__ == '__main__':
+ image = Image.open('test.jpg')
+ add_num(image)
\ No newline at end of file
diff --git a/doubi_sdust/0000.py b/doubi_sdust/0000.py
new file mode 100644
index 00000000..dcc25f32
--- /dev/null
+++ b/doubi_sdust/0000.py
@@ -0,0 +1,20 @@
+'''
+
+第 0000 题: 将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。 类似于图中效果
+
+'''
+from PIL import Image, ImageDraw, ImageFont
+#PIL https://pillow.readthedocs.org/
+def add_num(img):
+ draw = ImageDraw.Draw(img)
+ #加载TrueType或OpenType字体文件,并创建一个字体对象。
+ myfont = ImageFont.truetype('C:/windows/fonts/Arial.ttf', size=20)
+ fillcolor = "#ff0000"
+ width, height = img.size
+ draw.text((width-40, 0), '2', font=myfont, fill=fillcolor)
+ img.save('result.jpg','jpeg')
+ return 0
+
+image = Image.open('image.jpg')
+print(image.format,image.size,image.mode)
+add_num(image)
\ No newline at end of file
diff --git a/doubi_sdust/0001.py b/doubi_sdust/0001.py
new file mode 100644
index 00000000..7f36876d
--- /dev/null
+++ b/doubi_sdust/0001.py
@@ -0,0 +1,35 @@
+'''
+第 0001 题: 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。
+'''
+import random
+import pymysql
+def creat_num(num,long):
+ str = 'qwertyuiopasdfghjklzxcvbnm1234567890'
+ b = []
+ for i in range(num):
+ a = ''
+ for j in range(long):
+ a += random.choice(str)
+ b.append(a)
+ return b
+
+def InsertIntoMysql(codelist):
+ # 打开数据库连接
+ db = pymysql.connect(host='127.0.0.1',user='root',passwd='919824467',db='mysql')
+ # 使用 cursor() 方法创建一个游标对象 cursor
+ cur = db.cursor()
+ #数据库语句
+ cur.execute('CREATE DATABASE IF NOT EXISTS code')
+ cur.execute('USE code')
+ cur.execute('''CREATE TABLE IF NOT EXISTS num(
+ id INT NOT NULL AUTO_INCREMENT,
+ code VARCHAR(32) NOT NULL,
+ PRIMARY KEY(id) )''')
+ for num in codelist:
+ cur.execute('INSERT INTO num(code) VALUES(%s)',(num))
+ cur.connection.commit()
+ db.close()
+
+InsertIntoMysql(creat_num(200,10))
\ No newline at end of file
diff --git a/doubi_sdust/0002.py b/doubi_sdust/0002.py
new file mode 100644
index 00000000..28b8b1b8
--- /dev/null
+++ b/doubi_sdust/0002.py
@@ -0,0 +1 @@
+#refer to 0001.py
\ No newline at end of file
diff --git a/JiYouMCC/0024/todoList/todoList/__init__.py b/doubi_sdust/0003.py
similarity index 100%
rename from JiYouMCC/0024/todoList/todoList/__init__.py
rename to doubi_sdust/0003.py
diff --git a/doubi_sdust/0004.py b/doubi_sdust/0004.py
new file mode 100644
index 00000000..eb433587
--- /dev/null
+++ b/doubi_sdust/0004.py
@@ -0,0 +1,14 @@
+'''
+第 0004 题: 任一个英文的纯文本文件,统计其中的单词出现的个数。
+'''
+
+# encoding: utf-8
+import collections
+import os
+
+with open('test.txt','r') as fp:
+ str1=fp.read().split(' ')
+b = collections.Counter(str1)
+with open('result.txt','w') as result_file:
+ for key,value in b.items():
+ result_file.write(key+':'+str(value)+'\n')
\ No newline at end of file
diff --git a/doubi_sdust/0005.py b/doubi_sdust/0005.py
new file mode 100644
index 00000000..00d842aa
--- /dev/null
+++ b/doubi_sdust/0005.py
@@ -0,0 +1,15 @@
+'''
+第 0005 题: 你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+'''
+from PIL import Image
+import os.path
+
+def Size(dirPath, size_x, size_y):
+ f_list = os.listdir(dirPath)
+ for i in f_list:
+ if os.path.splitext(i)[1] == '.jpg':
+ img = Image.open(i)
+ img.thumbnail((size_x,size_y))
+ img.save(i)
+ print(i)
+Size('D:\PyCharm 2017.1.3\projects', 1136, 640)
\ No newline at end of file
diff --git a/doubi_sdust/0006.py b/doubi_sdust/0006.py
new file mode 100644
index 00000000..9f573b36
--- /dev/null
+++ b/doubi_sdust/0006.py
@@ -0,0 +1,24 @@
+'''
+第 0006 题: 你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+'''
+# encoding: utf-8
+import collections
+import os.path
+def judgeit(words):
+ for i in range(6):
+ if len(words[i]) > 2 and words[i] != 'the' and words[i] != 'her' and words[i] != 'his' and words[i] != 'and' and words[i] != 'she':
+ return words[i]
+ return words[7]
+
+def mainKeywords(dirPath):
+ f_list = os.listdir(dirPath)
+ for i in f_list:
+ if os.path.splitext(i)[1] == '.txt':
+ print('the keywords of' + i + ' is:' )
+ with open(i, 'r') as fp:
+ str1 = fp.read().split(' ')
+ b = collections.Counter(str1)
+ keywords = sorted(b, key=lambda x: b[x],reverse = True)
+ print(judgeit(keywords))
+
+mainKeywords('D:\PyCharm 2017.1.3\projects')
\ No newline at end of file
diff --git a/doubi_sdust/0007.py b/doubi_sdust/0007.py
new file mode 100644
index 00000000..50a8f56b
--- /dev/null
+++ b/doubi_sdust/0007.py
@@ -0,0 +1,39 @@
+'''
+第 0007 题: 有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+'''
+import os.path
+import re
+def mainKeywords(dirPath):
+ blank, comments, codelines, totalines, count, temp = 0, 0, 0, 0, 0, 0
+ f_list = os.listdir(dirPath)
+ for i in f_list:
+ if os.path.splitext(i)[1] == '.py':
+ print(i)
+ with open(i, 'r', encoding='utf-8') as fp:
+ while True:
+ line = fp.readline()
+ totalines += 1
+ if not line:
+ break
+ elif line.strip().startswith('#'):
+ comments += 1
+ elif line.strip().startswith("'''") or line.strip().startswith('"""'):
+ comments += 1
+ if line.count('"""') == 1 or line.count("'''") == 1:
+ while True:
+ line = fp.readline()
+ totalines += 1
+ comments += 1
+ if ("'''" in line) or ('"""' in line):
+ break
+ elif line.strip():
+ codelines += 1
+ else:
+ blank += 1
+ print('the nuber of totalines is : ' + str(totalines-1))
+ print('the nuber of comments is : ' + str(comments))
+ print('the nuber of codelines is : ' + str(codelines))
+ print('the nuber of blanklines is : ' + str(blank))
+ blank, comments, codelines, totalines = 0, 0, 0, 0
+
+mainKeywords('D:\PyCharm 2017.1.3\projects')
\ No newline at end of file
diff --git a/doubi_sdust/0008.py b/doubi_sdust/0008.py
new file mode 100644
index 00000000..0821a8e0
--- /dev/null
+++ b/doubi_sdust/0008.py
@@ -0,0 +1,19 @@
+'''
+第 0008 题: 一个HTML文件,找出里面的正文。
+
+第 0009 题: 一个HTML文件,找出里面的链接。
+'''
+
+# coding=utf-8
+from bs4 import BeautifulSoup
+def sechBodyUrl(path):
+ with open(path,encoding='utf-8') as fp:
+ text = BeautifulSoup(fp, 'lxml')
+ urls = text.findAll('a')
+ for u in urls:
+ print(u['href'])
+ content = text.get_text().strip('\n')
+ return content
+
+sechBodyUrl('0007.html')
+#print(searchBody('0007.html'))
\ No newline at end of file
diff --git a/doubi_sdust/0009.py b/doubi_sdust/0009.py
new file mode 100644
index 00000000..be2e68ee
--- /dev/null
+++ b/doubi_sdust/0009.py
@@ -0,0 +1 @@
+#refer to 0008.py
\ No newline at end of file
diff --git a/doubi_sdust/0010.py b/doubi_sdust/0010.py
new file mode 100644
index 00000000..e7e8dea8
--- /dev/null
+++ b/doubi_sdust/0010.py
@@ -0,0 +1,37 @@
+'''
+第 0010 题: 使用 Python 生成类似于下图中的字母验证码图片
+
+参考廖雪峰代码:liaoxuefeng.com/…/00140767171357714f87a053a824ffd811d98a83b58ec13000
+'''
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+import random
+
+# 随机字母:
+def rndChar():
+ return chr(random.randint(65, 90))
+# 随机颜色1:
+def rndColor():
+ return (random.randint(64, 255), random.randint(64, 255), random.randint(64, 255))
+# 随机颜色2:
+def rndColor2():
+ return (random.randint(32, 127), random.randint(32, 127), random.randint(32, 127))
+
+# 240 x 60:
+width = 240
+height = 60
+image = Image.new('RGB', (width, height), (255, 255, 255))
+# 创建Font对象:
+font = ImageFont.truetype('C:/windows/fonts/Arial.ttf', 36)
+# 创建Draw对象:
+draw = ImageDraw.Draw(image)
+# 填充每个像素:
+for x in range(width):
+ for y in range(height):
+ draw.point((x, y), fill=rndColor())
+# 输出文字:
+for t in range(4):
+ draw.text((60 * t + 10, 10), rndChar(), font=font, fill=rndColor2())
+# 模糊:
+image = image.filter(ImageFilter.BLUR)
+image.save('code.jpg', 'jpeg');
+image.show('code.jpg')
\ No newline at end of file
diff --git a/effy/0000/.DS_Store b/effy/0000/.DS_Store
deleted file mode 100644
index 5008ddfc..00000000
Binary files a/effy/0000/.DS_Store and /dev/null differ
diff --git a/evan69/0000/0000.py b/evan69/0000/0000.py
new file mode 100644
index 00000000..40d9d90d
--- /dev/null
+++ b/evan69/0000/0000.py
@@ -0,0 +1,23 @@
+# coding=utf-8
+from PIL import Image,ImageFont,ImageDraw
+import sys
+def add_number(filename,number):
+ mystr = str(min(99,number))
+ al = 0.4
+ if number > 99:
+ mystr += '+'
+ al = 0.25
+ print mystr
+ img = Image.open(filename)
+ fontsize = min(img.size[0],img.size[1])
+ print img.size
+ fontsize = int(fontsize * al)
+ font = ImageFont.truetype('Arial.ttf',size = fontsize)
+ position = img.size[0] - font.getsize(mystr)[0]
+ dr = ImageDraw.Draw(img)
+ dr.text((position,0),mystr,font = font,fill = (255,0,0,255))
+ return img
+
+filename = sys.argv[1]
+num = sys.argv[2]
+add_number(filename,int(num)).save(num + '_' + filename)
diff --git a/evan69/0000/1.jpg b/evan69/0000/1.jpg
new file mode 100644
index 00000000..436f58aa
Binary files /dev/null and b/evan69/0000/1.jpg differ
diff --git a/evan69/0000/2.png b/evan69/0000/2.png
new file mode 100644
index 00000000..84a947cf
Binary files /dev/null and b/evan69/0000/2.png differ
diff --git a/evan69/0000/Arial.ttf b/evan69/0000/Arial.ttf
new file mode 100644
index 00000000..12cc15c8
Binary files /dev/null and b/evan69/0000/Arial.ttf differ
diff --git a/evan69/0001/0001.py b/evan69/0001/0001.py
new file mode 100644
index 00000000..978a04dd
--- /dev/null
+++ b/evan69/0001/0001.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+import uuid
+
+def produce_str(num = 200):
+ str_list = []
+ i = 0
+ while True:
+ i = i + 1
+ if i > num:
+ break
+ mystr = str(uuid.uuid1()).replace('-','')
+ if mystr not in str_list:
+ str_list.append(mystr)
+ return str_list
+
+
+a = produce_str()
+print a
diff --git a/evan69/0004/0004.py b/evan69/0004/0004.py
new file mode 100644
index 00000000..437e804a
--- /dev/null
+++ b/evan69/0004/0004.py
@@ -0,0 +1,18 @@
+import collections,re
+import sys
+def cal(filename = 'in.txt'):
+ print 'now processing:' + filename + '......'
+ f = open(filename,'r')
+ data = f.read()
+ dic = collections.defaultdict(lambda :0)
+ data = re.sub(r'[\W\d]',' ',data)
+ data = data.lower()
+ datalist = data.split(' ')
+ for item in datalist:
+ dic[item] += 1
+ del dic['']
+ return dic
+try:
+ print sorted(cal().items())
+except:
+ print 'no input file'
diff --git a/evan69/0004/in.txt b/evan69/0004/in.txt
new file mode 100644
index 00000000..0d60d0a3
--- /dev/null
+++ b/evan69/0004/in.txt
@@ -0,0 +1,32 @@
+If you are looking for someone you can pour out your love to, let me suggest the empowered woman. The empowered woman knows what she wants, knows how to get it, knows how to live fully, and she knows how to love you back without needing anyone’s approval or recognition. An empowered woman is unarguably one of the most magnificent beings you will ever come in contact with. Read on and find 10 reason why you should absolutely love and embrace the empowered women in your life! .
+
+1. She knows how to love you in return
+It is difficult to give what you don’t have. It is impossible to love someone and feel fulfilled when they can’t love you in return because they don’t love themselves. This will never happen to you when you love an empowered woman. She loves herself (not in a narcissistic manner). In turn, she appreciates who you are and loves you in return. She will love you just like you deserve to be loved.
+
+2. She will inspire you
+When life puts you down and you are at the end of your rope, the empowered woman will be there to see you through. Her drive, enthusiasm and (at times) hopeless optimism will inspire you to carry on despite the obstacles you face.
+
+3. She is not afraid of failure
+While many out there are thoroughly terrified of failure, the empowered woman understands that failures are simply stepping stones in life. How can you not love someone that is thoroughly unafraid to try, fail, and give it a shot all over again?!
+
+4. She is all about the legacy
+While most people are focused on the car, the house, the job, and corner office; the empowered woman is focused on leaving a legacy that will inspire others and change the world. The empowered woman is focused on empowering others to maximize their potential and fulfill their purpose. She is all about inspiring others to look beyond themselves and live a life of service to others.
+
+5. She can laugh at her mistakes…
+…and learn from them as well! She understands mistakes are part of the journey. The empowered woman can laugh and learn from her mistakes to ensure they never happen again.
+
+6. She can be vulnerable
+The empowered woman understands there is no debt in relationships without vulnerability. Although she is emotionally strong, she is willing to laugh and cry with you because all of these emotions are an essential part of life.
+
+7. She can speak her mind
+While everyone else is too concerned with what others may think or say, the empowered woman is not afraid to speak her mind. She understands that her value comes from within, not from what others say or think about her.
+
+8. She knows when to remain quiet
+She lives by Abe Lincoln’s words, “Better to remain silent and be thought a fool, than to speak out and remove all doubt.”
+
+9. She knows how to have fun
+Whether it is at the symphony or at a ball game, the empowered woman understands life is made up of experiences with people – not the places you go. She is able to live in the moment and enjoy it fully without being concerned for the future. After all, who’s got a guaranteed future?
+
+10. She is not afraid of change
+While most people rather continue on living unfulfilled lives as long as their comfort zone remains intact, the empowered woman is all about embracing change. She understands growth cannot happen without change. She understands that change is the gift life offers you to choose your destiny. Therefore, she is not afraid of change because it is her stepping stone towards success.
+
diff --git a/evan69/0007/0007.py b/evan69/0007/0007.py
new file mode 100644
index 00000000..11d98525
--- /dev/null
+++ b/evan69/0007/0007.py
@@ -0,0 +1,37 @@
+#coding:utf8
+import sys,os,re
+
+def cal(path):
+ filelist = os.listdir(path)
+ #print filelist
+ filelist = (item for item in filelist if item.endswith('.py'))
+ ret = [0,0,0]
+ for item in filelist:
+ res = calfile(path,item)
+ for i in (0,1,2):
+ ret[i] += res[i]
+ return tuple(ret)
+
+def calfile(path,filename):
+ totline = 0
+ blankline = 0
+ commentline = 0
+ fileobj = open(path + filename,'r')
+ linelist = fileobj.readlines()
+ totline = len(linelist)
+ for line in linelist:
+ pattern = re.compile(r'(\s*)#')
+ pattern1 = re.compile(r'(\s*)$')
+ if pattern.match(line):
+ commentline += 1
+ if pattern1.match(line):
+ blankline += 1
+ fileobj.close()
+ return totline,blankline,commentline
+
+#path = r'/home/evan/Desktop/py/python/evan69/0007/'
+path = sys.argv[1]
+data = cal(path)
+dic = dict(zip(['total line','blank line','comment line'],list(data)))
+print dic
+
diff --git a/friday/0000/0000.py b/friday/0000/0000.py
new file mode 100644
index 00000000..5399ffd4
--- /dev/null
+++ b/friday/0000/0000.py
@@ -0,0 +1,13 @@
+__author__ = 'friday'
+
+from PIL import Image, ImageDraw, ImageFont
+
+def add_num(picPath, num):
+ img = Image.open(picPath)
+ x, y = img.size
+ myfont = ImageFont.truetype('futura-normal.ttf', x // 3)
+ ImageDraw.Draw(img).text((2 * x / 3, 0), str(num), font = myfont, fill = 'red')
+ img.save('123_.jpg')
+
+if __name__ == '__main__':
+ add_num('123.jpg', 9)
\ No newline at end of file
diff --git a/friday/0000/futura-normal.ttf b/friday/0000/futura-normal.ttf
new file mode 100755
index 00000000..dabda48c
Binary files /dev/null and b/friday/0000/futura-normal.ttf differ
diff --git a/friday/0000/readme.txt b/friday/0000/readme.txt
new file mode 100644
index 00000000..7016b745
--- /dev/null
+++ b/friday/0000/readme.txt
@@ -0,0 +1,2 @@
+把要转换的图片命名为123.jpg放在0000目录下运行0000.py即可实现在图片上加数字的功能
+
diff --git a/friday/0001/0001.py b/friday/0001/0001.py
new file mode 100644
index 00000000..294c819c
--- /dev/null
+++ b/friday/0001/0001.py
@@ -0,0 +1,16 @@
+__author__ = 'friday'
+import random
+
+def creat_num(num,long):
+ str = 'qwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*_+'
+ b = []
+ for i in range(num):
+ a = ''
+ for j in range(long):
+ a += random.choice(str)
+ b.append(a)
+ for i in range(len(b)):
+ print(b[i])
+
+if __name__ == '__main__':
+ creat_num(200,10)
\ No newline at end of file
diff --git a/friday/0001/readme.txt b/friday/0001/readme.txt
new file mode 100644
index 00000000..1dc98bf1
--- /dev/null
+++ b/friday/0001/readme.txt
@@ -0,0 +1 @@
+随机生成两百个十位的优惠码
diff --git a/fybhp/.gitignore b/fybhp/.gitignore
new file mode 100644
index 00000000..2a7fcf79
--- /dev/null
+++ b/fybhp/.gitignore
@@ -0,0 +1,7 @@
+.idea
+fortest.py
+*.png
+*.jpg
+migrations
+*.sqlite
+*.pyc
\ No newline at end of file
diff --git a/fybhp/practice0/practice0.py b/fybhp/practice0/practice0.py
new file mode 100644
index 00000000..330b4897
--- /dev/null
+++ b/fybhp/practice0/practice0.py
@@ -0,0 +1,20 @@
+# -*- coding:utf-8 -*-
+import PIL
+from PIL import ImageFont
+from PIL import Image
+from PIL import ImageDraw
+
+#设置字体,如果没有,也可以不设置
+#font = ImageFont.truetype("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",13)
+
+#打开底版图片
+imageFile = "./icon.jpg"
+im1=Image.open(imageFile)
+
+# 在图片上添加文字 1
+draw = ImageDraw.Draw(im1)
+draw.text((90, 5),"2",(255,0,0))#,font=font)
+draw = ImageDraw.Draw(im1)
+
+# 保存
+im1.save("./practice1/icon.png")
\ No newline at end of file
diff --git a/fybhp/practice1/practice1.py b/fybhp/practice1/practice1.py
new file mode 100644
index 00000000..3531a922
--- /dev/null
+++ b/fybhp/practice1/practice1.py
@@ -0,0 +1,22 @@
+# -*- coding:utf-8 -*-
+import re
+import string
+import random
+
+map = {}
+#pattern = re.compile(r'([a-z0-9A-Z]{4}-){3}([a-z0-9A-Z]{4})')
+#这个函数定义的很精髓
+def id_generator(size=4, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase):
+ #[random.choice(chars) for _ in range(size)]为列表解析
+ #(random.choice(chars) for _ in range(size))为生成器,其对内存更友好
+ list = []
+ for i in range(4):
+ a = ''.join(random.choice(chars) for _ in range(size))
+ list.append(a)
+ return list
+for i in range(200):
+ id = '-'.join(id_generator())
+ while id in map.values():
+ id = '-'.join(id_generator())
+ map[i] = id
+print map
diff --git a/fybhp/practice10/arial.ttf b/fybhp/practice10/arial.ttf
new file mode 100644
index 00000000..886789b8
Binary files /dev/null and b/fybhp/practice10/arial.ttf differ
diff --git a/fybhp/practice10/practice10.py b/fybhp/practice10/practice10.py
new file mode 100644
index 00000000..1fadb5e3
--- /dev/null
+++ b/fybhp/practice10/practice10.py
@@ -0,0 +1,25 @@
+# -*- coding:utf-8 -*-
+import string
+import random
+from PIL import Image,ImageDraw,ImageFont,ImageFilter
+
+def numgenerator(size=4, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase):
+ return ''.join(random.choice(chars) for _ in range(size))
+
+def getcolor():
+ return (random.randint(0,255),random.randint(0,255),random.randint(0,255))
+
+def getfont():
+ font = ImageFont.truetype('Arial.ttf',random.randint(50,65))
+ return font
+
+check = numgenerator()
+imageFile = "./bacdgroud.jpg"
+img = Image.open(imageFile)
+draw = ImageDraw.Draw(img)
+for i in range(4):
+ draw.text((72*i+random.randint(15,20), random.randint(5,10)),check[i],getcolor(),font=getfont())
+ draw = ImageDraw.Draw(img)
+image = img.filter(ImageFilter.BLUR)
+
+image.save("./test1.jpg")
diff --git a/fybhp/practice11/filter_words.txt b/fybhp/practice11/filter_words.txt
new file mode 100644
index 00000000..a5d1d90a
--- /dev/null
+++ b/fybhp/practice11/filter_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/fybhp/practice11/practice11.py b/fybhp/practice11/practice11.py
new file mode 100644
index 00000000..17fe1bd8
--- /dev/null
+++ b/fybhp/practice11/practice11.py
@@ -0,0 +1,12 @@
+# -*- coding:utf-8 -*-
+
+list = []
+file = open('filter_words.txt','r')
+content = file.read().decode('gbk')
+allwords = content.split()
+#print allwords
+checkword = raw_input('>').decode('utf-8')
+if checkword in allwords:
+ print 'Freedom'
+else:
+ print 'Hunam Rights'
\ No newline at end of file
diff --git a/fybhp/practice12/filter_words.txt b/fybhp/practice12/filter_words.txt
new file mode 100644
index 00000000..a5d1d90a
--- /dev/null
+++ b/fybhp/practice12/filter_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/fybhp/practice12/practice12.py b/fybhp/practice12/practice12.py
new file mode 100644
index 00000000..bfcd9c4d
--- /dev/null
+++ b/fybhp/practice12/practice12.py
@@ -0,0 +1,12 @@
+# -*- coding:utf-8 -*-
+import re
+list = []
+file = open('filter_words.txt','r')
+content = file.read().decode('gbk')
+allwords = content.split()
+#print allwords
+yourword = raw_input('>').decode('utf-8')
+for mingan in allwords:
+ if mingan in yourword:
+ yourword = re.sub(mingan,'*'*len(mingan),yourword)
+print yourword
\ No newline at end of file
diff --git a/JiYouMCC/0024/todoList/todoList/list/__init__.py b/fybhp/practice13/practice13/__init__.py
similarity index 100%
rename from JiYouMCC/0024/todoList/todoList/list/__init__.py
rename to fybhp/practice13/practice13/__init__.py
diff --git a/fybhp/practice13/practice13/items.py b/fybhp/practice13/practice13/items.py
new file mode 100644
index 00000000..abbf70e1
--- /dev/null
+++ b/fybhp/practice13/practice13/items.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+
+# Define here the models for your scraped items
+#
+# See documentation in:
+# http://doc.scrapy.org/en/latest/topics/items.html
+
+import scrapy
+
+
+class Practice13Item(scrapy.Item):
+ # define the fields for your item here like:
+ # name = scrapy.Field()
+ image_urls = scrapy.Field()
+ images = scrapy.Field()
+ image_paths = scrapy.Field()
+ pass
diff --git a/fybhp/practice13/practice13/pipelines.py b/fybhp/practice13/practice13/pipelines.py
new file mode 100644
index 00000000..f1276b9a
--- /dev/null
+++ b/fybhp/practice13/practice13/pipelines.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+import scrapy
+from scrapy.pipelines.images import ImagesPipeline
+from scrapy.exceptions import DropItem
+# Define your item pipelines here
+#
+# Don't forget to add your pipeline to the ITEM_PIPELINES setting
+# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
+
+
+class Practice13Pipeline(ImagesPipeline):
+ def get_media_requests(self, item, info):
+ for image_url in item['image_urls']:
+ yield scrapy.Request(image_url)
+
+ def item_completed(self, results, item, info):
+ image_paths = [x['path'] for ok, x in results if ok]
+ if not image_paths:
+ raise DropItem("Item contains no images")
+ item['image_paths'] = image_paths
+ return item
diff --git a/fybhp/practice13/practice13/settings.py b/fybhp/practice13/practice13/settings.py
new file mode 100644
index 00000000..08078b11
--- /dev/null
+++ b/fybhp/practice13/practice13/settings.py
@@ -0,0 +1,87 @@
+# -*- coding: utf-8 -*-
+
+# Scrapy settings for practice13 project
+#
+# For simplicity, this file contains only settings considered important or
+# commonly used. You can find more settings consulting the documentation:
+#
+# http://doc.scrapy.org/en/latest/topics/settings.html
+# http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
+# http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
+
+BOT_NAME = 'practice13'
+
+SPIDER_MODULES = ['practice13.spiders']
+NEWSPIDER_MODULE = 'practice13.spiders'
+
+ITEM_PIPELINES = {'practice13.pipelines.Practice13Pipeline': 1}
+
+IMAGES_STORE = '.'
+# Crawl responsibly by identifying yourself (and your website) on the user-agent
+#USER_AGENT = 'practice13 (+http://www.yourdomain.com)'
+
+# Configure maximum concurrent requests performed by Scrapy (default: 16)
+#CONCURRENT_REQUESTS=32
+
+# Configure a delay for requests for the same website (default: 0)
+# See http://scrapy.readthedocs.org/en/latest/topics/settings.html#download-delay
+# See also autothrottle settings and docs
+#DOWNLOAD_DELAY=3
+# The download delay setting will honor only one of:
+#CONCURRENT_REQUESTS_PER_DOMAIN=16
+#CONCURRENT_REQUESTS_PER_IP=16
+
+# Disable cookies (enabled by default)
+#COOKIES_ENABLED=False
+
+# Disable Telnet Console (enabled by default)
+#TELNETCONSOLE_ENABLED=False
+
+# Override the default request headers:
+#DEFAULT_REQUEST_HEADERS = {
+# 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
+# 'Accept-Language': 'en',
+#}
+
+# Enable or disable spider middlewares
+# See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html
+#SPIDER_MIDDLEWARES = {
+# 'practice13.middlewares.MyCustomSpiderMiddleware': 543,
+#}
+
+# Enable or disable downloader middlewares
+# See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html
+#DOWNLOADER_MIDDLEWARES = {
+# 'practice13.middlewares.MyCustomDownloaderMiddleware': 543,
+#}
+
+# Enable or disable extensions
+# See http://scrapy.readthedocs.org/en/latest/topics/extensions.html
+#EXTENSIONS = {
+# 'scrapy.telnet.TelnetConsole': None,
+#}
+
+# Configure item pipelines
+# See http://scrapy.readthedocs.org/en/latest/topics/item-pipeline.html
+#ITEM_PIPELINES = {
+# 'practice13.pipelines.SomePipeline': 300,
+#}
+
+# Enable and configure the AutoThrottle extension (disabled by default)
+# See http://doc.scrapy.org/en/latest/topics/autothrottle.html
+# NOTE: AutoThrottle will honour the standard settings for concurrency and delay
+#AUTOTHROTTLE_ENABLED=True
+# The initial download delay
+#AUTOTHROTTLE_START_DELAY=5
+# The maximum download delay to be set in case of high latencies
+#AUTOTHROTTLE_MAX_DELAY=60
+# Enable showing throttling stats for every response received:
+#AUTOTHROTTLE_DEBUG=False
+
+# Enable and configure HTTP caching (disabled by default)
+# See http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
+#HTTPCACHE_ENABLED=True
+#HTTPCACHE_EXPIRATION_SECS=0
+#HTTPCACHE_DIR='httpcache'
+#HTTPCACHE_IGNORE_HTTP_CODES=[]
+#HTTPCACHE_STORAGE='scrapy.extensions.httpcache.FilesystemCacheStorage'
diff --git a/fybhp/practice13/practice13/spiders/__init__.py b/fybhp/practice13/practice13/spiders/__init__.py
new file mode 100644
index 00000000..ebd689ac
--- /dev/null
+++ b/fybhp/practice13/practice13/spiders/__init__.py
@@ -0,0 +1,4 @@
+# This package will contain the spiders of your Scrapy project
+#
+# Please refer to the documentation for information on how to create and manage
+# your spiders.
diff --git a/fybhp/practice13/practice13/spiders/shanben.py b/fybhp/practice13/practice13/spiders/shanben.py
new file mode 100644
index 00000000..c8c622c3
--- /dev/null
+++ b/fybhp/practice13/practice13/spiders/shanben.py
@@ -0,0 +1,22 @@
+# -*- coding:utf-8 -*-
+import scrapy
+from scrapy.selector import Selector
+from practice13.items import Practice13Item
+
+class TiebapicSpider(scrapy.Spider):
+ name = "shan"
+ allowed_domains = ["tieba.baidu.com"]
+ start_urls = ['http://tieba.baidu.com/p/2166231880']
+
+ def parse(self,response):
+ sel = Selector(response)
+ div1 = sel.xpath('.//div[@class="d_post_content j_d_post_content clearfix"]')
+ #print div1
+ for single1 in div1:
+ div2 = single1.xpath('./img')
+ #print div2
+ for single2 in div2:
+ item = Practice13Item()
+ item['image_urls'] = [single2.xpath('./@src').extract()[0]]
+ print item['image_urls']
+ yield item
diff --git a/fybhp/practice13/scrapy.cfg b/fybhp/practice13/scrapy.cfg
new file mode 100644
index 00000000..f3853077
--- /dev/null
+++ b/fybhp/practice13/scrapy.cfg
@@ -0,0 +1,11 @@
+# Automatically created by: scrapy startproject
+#
+# For more information about the [deploy] section see:
+# https://scrapyd.readthedocs.org/en/latest/deploy.html
+
+[settings]
+default = practice13.settings
+
+[deploy]
+#url = http://localhost:6800/
+project = practice13
diff --git a/fybhp/practice14/practice14.py b/fybhp/practice14/practice14.py
new file mode 100644
index 00000000..85cb4f3e
--- /dev/null
+++ b/fybhp/practice14/practice14.py
@@ -0,0 +1,22 @@
+# -*- coding:utf-8 -*-
+from xlwt import Workbook
+import json
+
+file = open('student.txt','rb')
+text = file.read().decode('gbk')
+js = json.loads(text)
+book = Workbook()
+sheet = book.add_sheet('student')
+rownum = 0
+js2 = sorted(js)
+for i in js2:
+ colnum = 0
+ print i
+ sheet.write(rownum,colnum,unicode(i))
+ for item in js[i]:
+ print item
+ colnum += 1
+ sheet.write(rownum,colnum,unicode(item))
+ rownum += 1
+book.save('student.xls')
+
diff --git a/fybhp/practice14/student.txt b/fybhp/practice14/student.txt
new file mode 100644
index 00000000..ddb4a149
--- /dev/null
+++ b/fybhp/practice14/student.txt
@@ -0,0 +1,5 @@
+{
+ "1":["",150,120,100],
+ "2":["",90,99,95],
+ "3":["",60,66,68]
+}
\ No newline at end of file
diff --git a/fybhp/practice14/student.xls b/fybhp/practice14/student.xls
new file mode 100644
index 00000000..7d11669f
Binary files /dev/null and b/fybhp/practice14/student.xls differ
diff --git a/fybhp/practice15/city.txt b/fybhp/practice15/city.txt
new file mode 100644
index 00000000..4d62a75c
--- /dev/null
+++ b/fybhp/practice15/city.txt
@@ -0,0 +1,5 @@
+{
+ "1" : "Ϻ",
+ "2" : "",
+ "3" : "ɶ"
+}
\ No newline at end of file
diff --git a/fybhp/practice15/city.xls b/fybhp/practice15/city.xls
new file mode 100644
index 00000000..b020435b
Binary files /dev/null and b/fybhp/practice15/city.xls differ
diff --git a/fybhp/practice15/practice15.py b/fybhp/practice15/practice15.py
new file mode 100644
index 00000000..cb0fe3f0
--- /dev/null
+++ b/fybhp/practice15/practice15.py
@@ -0,0 +1,17 @@
+# -*- coding:utf-8 -*-
+from xlwt import Workbook
+import json
+
+file = open('city.txt','rb')
+text = file.read().decode('gbk')
+js = json.loads(text)
+book = Workbook()
+sheet = book.add_sheet('city')
+rownum = 0
+js2 = sorted(js)
+for i in js2:
+ colnum = 0
+ sheet.write(rownum,colnum,unicode(i))
+ sheet.write(rownum,colnum+1,unicode(js[i]))
+ rownum += 1
+book.save('city.xls')
\ No newline at end of file
diff --git a/Jimmy66/0016/numbers.txt b/fybhp/practice16/numbers.txt
similarity index 93%
rename from Jimmy66/0016/numbers.txt
rename to fybhp/practice16/numbers.txt
index 3c8c5a25..9f246488 100644
--- a/Jimmy66/0016/numbers.txt
+++ b/fybhp/practice16/numbers.txt
@@ -1,5 +1,5 @@
-[
- [1, 82, 65535],
- [20, 90, 13],
- [26, 809, 1024]
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
]
\ No newline at end of file
diff --git a/fybhp/practice16/numbers.xls b/fybhp/practice16/numbers.xls
new file mode 100644
index 00000000..55d44312
Binary files /dev/null and b/fybhp/practice16/numbers.xls differ
diff --git a/fybhp/practice16/practice16.py b/fybhp/practice16/practice16.py
new file mode 100644
index 00000000..833afd1e
--- /dev/null
+++ b/fybhp/practice16/practice16.py
@@ -0,0 +1,16 @@
+# -*- coding:utf-8 -*-
+from xlwt import Workbook
+import json
+
+file = open('numbers.txt','rb')
+text = file.read()
+js = json.loads(text)
+book = Workbook()
+sheet = book.add_sheet('numbers')
+rownum = 0
+colnum = 0
+for i in range(len(js)):
+ for j in range(len(js[i])):
+ sheet.write(i,j,str(js[i][j]))
+ #rownum += 1
+book.save('numbers.xls')
\ No newline at end of file
diff --git a/fybhp/practice17/practice17.py b/fybhp/practice17/practice17.py
new file mode 100644
index 00000000..0ef7a944
--- /dev/null
+++ b/fybhp/practice17/practice17.py
@@ -0,0 +1,37 @@
+# -*- coding:utf-8 -*-
+from xml.dom import minidom
+from xlrd import open_workbook
+import json
+import re
+
+jdict = {}
+axls = open_workbook('student.xls')
+sheet1 = axls.sheet_by_name('student')
+for i in range(3):
+ sign = str(sheet1.cell(i,0).value)
+ jdict[sign] = []
+ for j in range(1,5):
+ if j > 1:
+ jdict[sign].append(int(sheet1.cell(i,j).value))
+ else:
+ jdict[sign].append(str(sheet1.cell(i,j).value).decode('gbk'))
+#jdata = json.dumps(jdict,indent=4, ensure_ascii=False)
+#导入jdata引号会出问题,只得导入jdict,但格式不好看,以下是黑科技,想出这种东西要逼疯我。
+s = str(jdict)
+s = re.sub('{','{\n\t ',s)
+s = re.sub('}','\n}',s)
+s = re.sub('],','],\n\t',s)
+print s
+doc = minidom.Document()
+root = doc.createElement('root')
+doc.appendChild(root)
+students = doc.createElement('students')
+comment = doc.createComment(u'\n\t学生信息表\n\t"id" : [名字, 数学, 语文, 英文]\n')
+students.appendChild(comment)
+students_text = doc.createTextNode(s.decode('unicode_escape'))
+students.appendChild(students_text)
+root.appendChild(students)
+f = open("student.xml", "wb")
+f.write(doc.toprettyxml(indent = "", newl = "\n", encoding = "utf-8"))
+f.close()
+
diff --git a/fybhp/practice17/student.xls b/fybhp/practice17/student.xls
new file mode 100644
index 00000000..4b3c08f4
Binary files /dev/null and b/fybhp/practice17/student.xls differ
diff --git a/fybhp/practice17/student.xml b/fybhp/practice17/student.xml
new file mode 100644
index 00000000..dca51733
--- /dev/null
+++ b/fybhp/practice17/student.xml
@@ -0,0 +1,14 @@
+
+
+
+
+{
+ '1': [u'张三', 150, 120, 100],
+ '3': [u'王五', 60, 66, 68],
+ '2': [u'李四', 90, 99, 95]
+}
+
+
diff --git a/fybhp/practice18/city.xls b/fybhp/practice18/city.xls
new file mode 100644
index 00000000..d74e1908
Binary files /dev/null and b/fybhp/practice18/city.xls differ
diff --git a/fybhp/practice18/city.xml b/fybhp/practice18/city.xml
new file mode 100644
index 00000000..cd005692
--- /dev/null
+++ b/fybhp/practice18/city.xml
@@ -0,0 +1,13 @@
+
+
+
+
+{
+ '1': u'上海',
+ '3': u'成都',
+ '2': u'北京'
+}
+
+
diff --git a/fybhp/practice18/practice18.py b/fybhp/practice18/practice18.py
new file mode 100644
index 00000000..7f7bafd2
--- /dev/null
+++ b/fybhp/practice18/practice18.py
@@ -0,0 +1,27 @@
+# -*- coding:utf-8 -*-
+from xml.dom import minidom
+from xlrd import open_workbook
+import re
+
+jdict = {}
+axls = open_workbook('city.xls')
+sheet1 = axls.sheet_by_name('city')
+for i in range(3):
+ jdict[str(sheet1.cell(i,0).value)] = str(sheet1.cell(i,1).value).decode('gbk')
+s = str(jdict)
+s = re.sub('{','{\n\t ',s)
+s = re.sub('}','\n}',s)
+s = re.sub(',',',\n\t',s)
+print s
+doc = minidom.Document()
+root = doc.createElement('root')
+doc.appendChild(root)
+students = doc.createElement('citys')
+comment = doc.createComment(u'\n\t城市信息\n')
+students.appendChild(comment)
+students_text = doc.createTextNode(s.decode('unicode_escape'))
+students.appendChild(students_text)
+root.appendChild(students)
+f = open("city.xml", "wb")
+f.write(doc.toprettyxml(indent = "", newl = "\n", encoding = "utf-8"))
+f.close()
\ No newline at end of file
diff --git a/fybhp/practice19/numbers.xls b/fybhp/practice19/numbers.xls
new file mode 100644
index 00000000..55d44312
Binary files /dev/null and b/fybhp/practice19/numbers.xls differ
diff --git a/fybhp/practice19/numbers.xml b/fybhp/practice19/numbers.xml
new file mode 100644
index 00000000..3ed26b87
--- /dev/null
+++ b/fybhp/practice19/numbers.xml
@@ -0,0 +1,13 @@
+
+
+
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+
diff --git a/fybhp/practice19/practice19.py b/fybhp/practice19/practice19.py
new file mode 100644
index 00000000..b1cdc066
--- /dev/null
+++ b/fybhp/practice19/practice19.py
@@ -0,0 +1,30 @@
+# -*- coding:utf-8 -*-
+from xml.dom import minidom
+from xlrd import open_workbook
+import re
+
+jdict = []
+axls = open_workbook('numbers.xls')
+sheet1 = axls.sheet_by_name('numbers')
+for i in range(3):
+ jdict.append([])
+ for j in range(3):
+ jdict[i].append(int(sheet1.cell(i,j).value))
+s = str(jdict)
+print s
+s = re.sub('\[\[','[\n\t [',s)
+s = re.sub('\]\]',']\n]',s)
+s = re.sub('],','],\n\t',s)
+print s
+doc = minidom.Document()
+root = doc.createElement('root')
+doc.appendChild(root)
+students = doc.createElement('numbers')
+comment = doc.createComment(u'\n\t数字信息\n')
+students.appendChild(comment)
+students_text = doc.createTextNode(s)
+students.appendChild(students_text)
+root.appendChild(students)
+f = open("numbers.xml", "wb")
+f.write(doc.toprettyxml(indent = "", newl = "\n", encoding = "utf-8"))
+f.close()
\ No newline at end of file
diff --git a/fybhp/practice2/pra2.sql b/fybhp/practice2/pra2.sql
new file mode 100644
index 00000000..13316482
--- /dev/null
+++ b/fybhp/practice2/pra2.sql
@@ -0,0 +1,7 @@
+use activation_code;
+CREATE TABLE MyGenerateCode
+(
+ SerialNumber int(5) NOT NULL,
+ ActivationCode char(30) NOT NULL
+);
+ALTER TABLE MyGenerateCode ADD PRIMARY KEY (SerialNumber);
diff --git a/fybhp/practice2/practice2.py b/fybhp/practice2/practice2.py
new file mode 100644
index 00000000..0512893d
--- /dev/null
+++ b/fybhp/practice2/practice2.py
@@ -0,0 +1,30 @@
+# -*- coding:utf-8 -*-
+import MySQLdb
+import MySQLdb.cursors
+import string
+import random
+
+# 表在workbench中已建好.sql语句见pra2.sql
+# 该方法较为底层了,有时间再用SQLAlchemy来实现此脚本.
+map = {}
+db = MySQLdb.connect(host='localhost',user='root',passwd='501826')
+curs = db.cursor()
+db.select_db('activation_code')
+
+def id_generator(size=4, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase):
+ set = []
+ for i in range(4):
+ a = ''.join(random.choice(chars) for _ in range(size))
+ set.append(a)
+ return set
+
+for i in range(200):
+ id = '-'.join(id_generator())
+ while id in map.values():
+ id = '-'.join(id_generator())
+ map[i] = id
+ curs.execute('insert into mygeneratecode values(%d,%r)'%(i,map[i]))
+
+db.commit()
+curs.close()
+db.close()
\ No newline at end of file
diff --git a/fybhp/practice20/practice20.py b/fybhp/practice20/practice20.py
new file mode 100644
index 00000000..e69de29b
diff --git a/fybhp/practice21/practice21.py b/fybhp/practice21/practice21.py
new file mode 100644
index 00000000..b24946ae
--- /dev/null
+++ b/fybhp/practice21/practice21.py
@@ -0,0 +1,26 @@
+# -*-coding:utf-8-*-
+import redis
+from werkzeug.security import generate_password_hash, check_password_hash
+
+#建立redis数据库连接.
+db = redis.Redis(host = 'localhost',port = 6379,db = 0)
+
+while True:
+ option = raw_input(u'请选择:\n1.注册\n2.登陆\n')
+ if option == '1':
+ Username = raw_input(u'请输入用户名:')
+ if db.exists(Username):
+ print u'用户已存在。'
+ continue
+ Set_password = raw_input(u'请设置密码:')
+ password_hash = generate_password_hash(Set_password)
+ db.set(Username,password_hash)
+ if option == '2':
+ Username = raw_input(u'用户名:')
+ password_hash = db.get(Username)
+ password = raw_input(u'请输入密码:')
+ if check_password_hash(password_hash,password):
+ print u'登陆成功。'
+ else:
+ print u'用户名或密码错误。'
+
diff --git a/fybhp/practice23/logical.py b/fybhp/practice23/logical.py
new file mode 100644
index 00000000..2d64da73
--- /dev/null
+++ b/fybhp/practice23/logical.py
@@ -0,0 +1,48 @@
+# -*- coding:utf-8 -*-
+import redis
+from flask import Flask,render_template,url_for,redirect
+from flask.ext.migrate import Migrate,MigrateCommand
+from flask.ext.bootstrap import Bootstrap
+from flask.ext.wtf import Form
+from flask.ext.sqlalchemy import SQLAlchemy
+from flask.ext.script import Shell,Manager
+from wtforms import StringField,SubmitField,TextAreaField
+from wtforms.validators import Required
+from datetime import datetime
+import os
+
+app = Flask(__name__)
+app.config['SECRET_KEY'] = 'gudabaidemima'
+basedir = os.path.abspath(os.path.dirname(__file__))
+app.config['SQLALCHEMY_DATABASE_URI'] = \
+ 'sqlite:///'+os.path.join(basedir,'data.sqlite')
+app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
+bootstrap = Bootstrap(app)
+db = SQLAlchemy(app)
+migrate = Migrate(app,db)
+manager = Manager(app)
+manager.add_command('db', MigrateCommand)
+
+class Message(Form):
+ name = StringField(u'姓名',validators=[Required()])
+ message = TextAreaField(u'内容',validators=[Required()])
+ submit = SubmitField(u'提交')
+
+class Messages(db.Model):
+ __tablename__ = 'messages'
+ name = db.Column(db.String)
+ message = db.Column(db.Text)
+ time = db.Column(db.String,default = datetime.utcnow,primary_key = True)
+
+@app.route('/',methods = ['GET','POST'])
+def index():
+ form = Message()
+ messages = Messages.query.order_by(Messages.time.desc()).all()
+ if form.validate_on_submit():
+ message = Messages(name=form.name.data,message = form.message.data)
+ db.session.add(message)
+ return redirect(url_for('index'))
+ return render_template('index.html',messages = messages,form = form)
+
+if __name__ == '__main__':
+ manager.run()
\ No newline at end of file
diff --git a/fybhp/practice23/templates/_posts.html b/fybhp/practice23/templates/_posts.html
new file mode 100644
index 00000000..aa99c610
--- /dev/null
+++ b/fybhp/practice23/templates/_posts.html
@@ -0,0 +1,15 @@
+
+{% endblock %}
\ No newline at end of file
diff --git a/fybhp/practice3/practice3.py b/fybhp/practice3/practice3.py
new file mode 100644
index 00000000..274b2ad7
--- /dev/null
+++ b/fybhp/practice3/practice3.py
@@ -0,0 +1,28 @@
+# -*- coding:utf-8 -*-
+import redis
+import string
+import random
+
+map = {}
+db = redis.Redis(host = 'localhost',port = 6379,db = 0)
+p = db.pipeline()
+
+def id_generator(size=4, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase):
+ set = []
+ for i in range(4):
+ a = ''.join(random.choice(chars) for _ in range(size))
+ set.append(a)
+ return set
+
+for i in range(200):
+ id = '-'.join(id_generator())
+ while id in map.values():
+ id = '-'.join(id_generator())
+ map[i] = id
+ p.set(i,map[i])
+
+p.execute()
+p.save()
+#for i in range(200):
+ #print str(i) + str(db.get(i))
+print db.keys()
\ No newline at end of file
diff --git a/fybhp/practice4/English.txt b/fybhp/practice4/English.txt
new file mode 100644
index 00000000..5a9e1e92
--- /dev/null
+++ b/fybhp/practice4/English.txt
@@ -0,0 +1,15 @@
+You are watching a film in which two men are having a fight. They hit one another hard. At the start they only fight with their fists. But soon they begin hitting one another over the heads with chairs. And so it goes on until one of the men crashes through a window and falls thirty feet to the ground below. He is deadOf course he isn't really dead. With any luck he isn't even hurt. Why? Because the men who fall out of high windows or jump from fast moving trains, who crash cars of even catch fire, are professionals. They do this for a living. These men are called stuntmen. That is to say, they perform tricks.There are two sides to their work. They actually do most of the things you see on the screen. For example, they fall from a high building. However, they do not fall on to hard ground but on to empty cardboard boxes covered with a mattress . Again, when they hit one another with chairs, the chairs are made of soft wood and when they crash through windows, the glass is made of sugar!But although their work depends on trick of this sort, it also requires a high degree of skill and training. Often a stuntman' s success depends on careful timing. For example, when he is "blown up" in a battle scene, he has to jump out of the way of the explosion just at the right moment.
+
+Naturally stuntmen are well paid for their work, but they lead dangerous lives. They often get seriously injured, and sometimes killed. A Norwegian stuntman, for example, skied over the edge of a cliff a thousand feet high. His parachute failed to open, and he was killed. In spite of all the risks, this is no longer a profession for men only. Men no longer dress up as women when actresses have to perform some dangerous action. For nowadays there are stuntgirls tool.
+In some ways, the United States has made some progress. Fires no longer destroy 18,000 buildings as they did in the Great Chicago Fire of 1871, or kill half a town of 2,400 people, as they did the same night in Peshtigo, Wisconsin. Other than the Beverly Hill Supper Club fire in Kentucky in 1977, it has been four decades since more than 100 Americans died in a fire.
+
+But even with such successes, the United States still has one of the worst fire death rates in the world. Safety experts say the problem is neither money nor technology, but the indifference of a country that just will not take fires seriously enough.
+
+American fire departments are some of the world's fastest and best-equipped. They have to be. The United States has twice Japan's population, and 40 times as many fires. It spends far less on preventing fires than on fighting them. And American fire -safety lessons are aimed almost entirely at children, who die in large numbers in fires but who, against popular beliefs, start very few of them.
+
+Experts say the error is an opinion that fires are not really anyone's fault. That is not so in other countries, where both public education and the law treat fires as either a personal failing or a crime. Japan has many wood houses; of the 48 fires in world history that burned more than 10,000 buildings, Japan has had 27. Punishment for causing a big fire can be as severe as life imprisonment.
+
+In the United States, most education dollars are spent in elementary schools. But, the lessons are aimed at too limited a number of people; just 9 percent of all fire deaths are caused by children playing with matches.
+
+The United States continues to depend more on technology than laws or social pressure. There are smoke detectors in 85 percent of all homes. Some local building laws now require home sprinklers . New heaters and irons shut themselves off if they are tipped.
+Today is the date of that afternoon in April a year ago when I first saw the strange and attractive doll in the window of Abe Sheftel's toy shop on Third Avenue near Fifteenth Street, just around the corner from my office, where the plate on the door reads. Dr Samuel Amory. I remember just how it was that day: the first sign of spring floated across the East River, mixing with the soft - coal smoke from the factories and the street smells of the poor neighbourhood. As I turned the corner on my way to work and came to Sheftel's, I was made once more known of the poor collection of toys in the dusty window, and I remembered the coming birthday of a small niece of mine in Cleveland, to whom I was in the habit of sending small gifts. Therefore, I stopped and examined the window to see if there might be anything suitable, and looked at the collection of unattractive objects--a red toy fire engine, some lead soldiers, cheap baseballs, bottles of ink, pens, yellowed envelopes, and advertisements for soft - drinks. And thus it was that my eyes finally came to rest upon the doll stored away in one corner, a doll with the strangest, most charming expression on her face. I could not wholly make her out, due to the shadows and the film of dust through which I was looking, but I was sure that a deep impression had been made upon me as though I had run into a person, as one does sometimes with a stranger, with whose personality one is deeply impressed.
\ No newline at end of file
diff --git a/fybhp/practice4/practice4(2).py b/fybhp/practice4/practice4(2).py
new file mode 100644
index 00000000..6e7b833a
--- /dev/null
+++ b/fybhp/practice4/practice4(2).py
@@ -0,0 +1,33 @@
+# -*- coding:utf-8 -*-
+
+file = open('./English.txt','r')
+s = set()
+map = {}
+allLines = file.readlines()
+
+def pre(i):
+ if not i in s:
+ map[i] = 1
+ s.add(i)
+ else:
+ map[i] += 1
+
+for eachLine in allLines:
+ alist = eachLine.split()
+ if alist != []:
+ for i in alist:
+ i = i.lower()
+ if i[-1] == '.' or i[-1] == ',' or i[-1] == "'" or i[-1] == '?' :
+ i = i[:-1]
+ if i == '':
+ continue
+ if '.' in i:
+ a = i.split('.')
+ for j in a:
+ pre(j)
+ continue
+ pre(i)
+ else:
+ pass
+print s
+print map
\ No newline at end of file
diff --git a/fybhp/practice4/practice4.py b/fybhp/practice4/practice4.py
new file mode 100644
index 00000000..3daf5e9c
--- /dev/null
+++ b/fybhp/practice4/practice4.py
@@ -0,0 +1,28 @@
+# -*- coding:utf-8 -*-
+import redis
+
+db = redis.Redis(host = 'localhost',port = 6379,db = 0)
+file = open('./English.txt','r')
+s = set()
+map = {}
+allLines = file.readlines()
+for eachLine in allLines:
+ alist = eachLine.split()
+ if alist != []:
+ for i in alist:
+ if i[-1] == '.':
+ i = i[:-1]
+ if i == '':
+ continue
+ i = i.lower()
+ if not i in s:
+ db.set(i,1)
+ s.add(i)
+ else:
+ db.incr(i)
+ else:
+ pass
+print s
+for i in s:
+ map[i] = db.get(i)
+print map
\ No newline at end of file
diff --git a/fybhp/practice5/iphone5/[FLsnow][Fate_stay_night][02][BDrip][1080p][AVC_FLAC]_2015731214139.JPG b/fybhp/practice5/iphone5/[FLsnow][Fate_stay_night][02][BDrip][1080p][AVC_FLAC]_2015731214139.JPG
new file mode 100644
index 00000000..8c9ec81a
Binary files /dev/null and b/fybhp/practice5/iphone5/[FLsnow][Fate_stay_night][02][BDrip][1080p][AVC_FLAC]_2015731214139.JPG differ
diff --git a/fybhp/practice5/iphone5/[FLsnow][Fate_stay_night][07][BDrip][1080p][AVC_FLAC]_20158411234.JPG b/fybhp/practice5/iphone5/[FLsnow][Fate_stay_night][07][BDrip][1080p][AVC_FLAC]_20158411234.JPG
new file mode 100644
index 00000000..ce1f1c91
Binary files /dev/null and b/fybhp/practice5/iphone5/[FLsnow][Fate_stay_night][07][BDrip][1080p][AVC_FLAC]_20158411234.JPG differ
diff --git a/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215121.JPG b/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215121.JPG
new file mode 100644
index 00000000..3cf4f8c5
Binary files /dev/null and b/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215121.JPG differ
diff --git a/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215128.JPG b/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215128.JPG
new file mode 100644
index 00000000..2c916263
Binary files /dev/null and b/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215128.JPG differ
diff --git a/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215521.JPG b/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215521.JPG
new file mode 100644
index 00000000..4c8ac243
Binary files /dev/null and b/fybhp/practice5/iphone5/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215521.JPG differ
diff --git a/fybhp/practice5/pic/[FLsnow][Fate_stay_night][02][BDrip][1080p][AVC_FLAC]_2015731214139.JPG b/fybhp/practice5/pic/[FLsnow][Fate_stay_night][02][BDrip][1080p][AVC_FLAC]_2015731214139.JPG
new file mode 100644
index 00000000..7e517672
Binary files /dev/null and b/fybhp/practice5/pic/[FLsnow][Fate_stay_night][02][BDrip][1080p][AVC_FLAC]_2015731214139.JPG differ
diff --git a/fybhp/practice5/pic/[FLsnow][Fate_stay_night][07][BDrip][1080p][AVC_FLAC]_20158411234.JPG b/fybhp/practice5/pic/[FLsnow][Fate_stay_night][07][BDrip][1080p][AVC_FLAC]_20158411234.JPG
new file mode 100644
index 00000000..83509845
Binary files /dev/null and b/fybhp/practice5/pic/[FLsnow][Fate_stay_night][07][BDrip][1080p][AVC_FLAC]_20158411234.JPG differ
diff --git a/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215121.JPG b/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215121.JPG
new file mode 100644
index 00000000..d6aaa475
Binary files /dev/null and b/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215121.JPG differ
diff --git a/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215128.JPG b/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215128.JPG
new file mode 100644
index 00000000..ea2ebd33
Binary files /dev/null and b/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215128.JPG differ
diff --git a/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215521.JPG b/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215521.JPG
new file mode 100644
index 00000000..cd628dfd
Binary files /dev/null and b/fybhp/practice5/pic/[LAC][Gintama][Gekijouban_Gintama_Kanketsuhen_Yorozuya_yo_Eien_Nare][x264_aac][GB][720P]_201559215521.JPG differ
diff --git a/fybhp/practice5/practice5.py b/fybhp/practice5/practice5.py
new file mode 100644
index 00000000..b498d599
--- /dev/null
+++ b/fybhp/practice5/practice5.py
@@ -0,0 +1,39 @@
+# -*- coding:utf-8 -*-
+from __future__ import division
+from PIL import Image
+import os
+
+#按比例缩放
+picdir = r'./pic'
+file_list = os.walk(picdir)
+thumbdir = r'./iphone5/'
+ip5lo = 1136
+ip5sh = 640
+if not os.path.exists(thumbdir):
+ os.mkdir(thumbdir)
+for root, dirs, files in file_list:
+ #print file
+ for file in files:
+ filedir = os.path.join(picdir,file)
+ img = Image.open(filedir)
+ imgSize = img.size
+ lo = max(imgSize)
+ sh = min(imgSize)
+ rate = lo/sh
+ newfiledir = os.path.join(thumbdir,file)
+ if sh > ip5sh or lo > ip5lo :
+ #此处亦有两种方法 sh2 = ip5lo/rate,再进行四种分类。
+ #可将两方法相比,计算收缩比率,收缩比率小的获胜,有必要时再如此处理吧。
+ lo2 = ip5sh*rate
+ print lo2
+ if lo2 > ip5lo and imgSize[0] > imgSize[1]:
+ new_img = img.resize((ip5lo,int(ip5lo/rate)),Image.ANTIALIAS)
+ elif lo2 > ip5lo and imgSize[0] < imgSize[1]:
+ new_img = img.resize((int(ip5lo/rate),ip5lo),Image.ANTIALIAS)
+ elif lo2 < ip5lo and imgSize[0] > imgSize[1]:
+ new_img = img.resize((int(lo2),ip5sh),Image.ANTIALIAS)
+ else:
+ new_img = img.resize((ip5sh,int(lo2)),Image.ANTIALIAS)
+ new_img.save(newfiledir,quality = 100)
+ else:
+ img.save(newfiledir,quality = 100)
diff --git a/fybhp/practice6/diary/diary1.txt b/fybhp/practice6/diary/diary1.txt
new file mode 100644
index 00000000..41fc2673
--- /dev/null
+++ b/fybhp/practice6/diary/diary1.txt
@@ -0,0 +1,9 @@
+You are watching a film in which two men are having a fight. They hit one another hard. At the start they only fight with their fists. But soon they begin hitting one another over the heads with chairs. And so it goes on until one of the men crashes through a window and falls thirty feet to the ground below. He is deadOf course he isn't really dead. With any luck he isn't even hurt. Why? Because the men who fall out of high windows or jump from fast moving trains, who crash cars of even catch fire, are professionals. They do this for a living. These men are called stuntmen. That is to say, they perform tricks.There are two sides to their work. They actually do most of the things you see on the screen. For example, they fall from a high building. However, they do not fall on to hard ground but on to empty cardboard boxes covered with a mattress . Again, when they hit one another with chairs, the chairs are made of soft wood and when they crash through windows, the glass is made of sugar!But although their work depends on trick of this sort, it also requires a high degree of skill and training. Often a stuntman' s success depends on careful timing. For example, when he is "blown up" in a battle scene, he has to jump out of the way of the explosion just at the right moment.
+
+Naturally stuntmen are well paid for their work, but they lead dangerous lives. They often get seriously injured, and sometimes killed. A Norwegian stuntman, for example, skied over the edge of a cliff a thousand feet high. His parachute failed to open, and he was killed. In spite of all the risks, this is no longer a profession for men only. Men no longer dress up as women when actresses have to perform some dangerous action. For nowadays there are stuntgirls tool.
+In some ways, the United States has made some progress. Fires no longer destroy 18,000 buildings as they did in the Great Chicago Fire of 1871, or kill half a town of 2,400 people, as they did the same night in Peshtigo, Wisconsin. Other than the Beverly Hill Supper Club fire in Kentucky in 1977, it has been four decades since more than 100 Americans died in a fire.
+
+But even with such successes, the United States still has one of the worst fire death rates in the world. Safety experts say the problem is neither money nor technology, but the indifference of a country that just will not take fires seriously enough.
+
+American fire departments are some of the world's fastest and best-equipped. They have to be. The United States has twice Japan's population, and 40 times as many fires. It spends far less on preventing fires than on fighting them. And American fire -safety lessons are aimed almost entirely at children, who die in large numbers in fires but who, against popular beliefs, start very few of them.
+
diff --git a/fybhp/practice6/diary/diary2.txt b/fybhp/practice6/diary/diary2.txt
new file mode 100644
index 00000000..3d00bd58
--- /dev/null
+++ b/fybhp/practice6/diary/diary2.txt
@@ -0,0 +1,6 @@
+Experts say the error is an opinion that fires are not really anyone's fault. That is not so in other countries, where both public education and the law treat fires as either a personal failing or a crime. Japan has many wood houses; of the 48 fires in world history that burned more than 10,000 buildings, Japan has had 27. Punishment for causing a big fire can be as severe as life imprisonment.
+
+In the United States, most education dollars are spent in elementary schools. But, the lessons are aimed at too limited a number of people; just 9 percent of all fire deaths are caused by children playing with matches.
+
+The United States continues to depend more on technology than laws or social pressure. There are smoke detectors in 85 percent of all homes. Some local building laws now require home sprinklers . New heaters and irons shut themselves off if they are tipped.
+Today is the date of that afternoon in April a year ago when I first saw the strange and attractive doll in the window of Abe Sheftel's toy shop on Third Avenue near Fifteenth Street, just around the corner from my office, where the plate on the door reads. Dr Samuel Amory. I remember just how it was that day: the first sign of spring floated across the East River, mixing with the soft - coal smoke from the factories and the street smells of the poor neighbourhood. As I turned the corner on my way to work and came to Sheftel's, I was made once more known of the poor collection of toys in the dusty window, and I remembered the coming birthday of a small niece of mine in Cleveland, to whom I was in the habit of sending small gifts. Therefore, I stopped and examined the window to see if there might be anything suitable, and looked at the collection of unattractive objects--a red toy fire engine, some lead soldiers, cheap baseballs, bottles of ink, pens, yellowed envelopes, and advertisements for soft - drinks. And thus it was that my eyes finally came to rest upon the doll stored away in one corner, a doll with the strangest, most charming expression on her face. I could not wholly make her out, due to the shadows and the film of dust through which I was looking, but I was sure that a deep impression had been made upon me as though I had run into a person, as one does sometimes with a stranger, with whose personality one is deeply impressed.
\ No newline at end of file
diff --git a/fybhp/practice6/diary/diary3.txt b/fybhp/practice6/diary/diary3.txt
new file mode 100644
index 00000000..39ca7e6f
--- /dev/null
+++ b/fybhp/practice6/diary/diary3.txt
@@ -0,0 +1 @@
+the and to to to. to'
\ No newline at end of file
diff --git a/fybhp/practice6/practice6.py b/fybhp/practice6/practice6.py
new file mode 100644
index 00000000..d66f4fad
--- /dev/null
+++ b/fybhp/practice6/practice6.py
@@ -0,0 +1,51 @@
+# -*- coding:utf-8 -*-
+import os
+
+'''practice5中遍历目录中文件的方法,读取所有文件,
+practice4中对单词计数的方法,对所有词进行计数,
+完成对map字典的排序即可。'''
+diarydir = r'./diary/'
+file_list = os.walk(diarydir)
+s = set()
+map = {}
+
+def pre(i,s):
+ if not i in s:
+ map[i] = 1
+ s.add(i)
+ else:
+ map[i] += 1
+
+def parselines(allLines):
+ for eachLine in allLines:
+ #将set置于此处,控制其作用域。
+ s = set()
+ alist = eachLine.split()
+ if alist != []:
+ for i in alist:
+ i = i.lower()
+ if i[-1] == '.' or i[-1] == ',' or i[-1] == "'" or i[-1] == '?' :
+ i = i[:-1]
+ if i == '':
+ continue
+ if '.' in i:
+ a = i.split('.')
+ for j in a:
+ pre(j,s)
+ continue
+ pre(i,s)
+ else:
+ pass
+
+for root, dirs, files in file_list:
+ for file in files:
+ map = {}
+ filedir = os.path.join(diarydir,file)
+ diary = open(filedir,'r')
+ allLines = diary.readlines()
+ parselines(allLines)
+ #黑科技。
+ dict= sorted(map.iteritems(), key=lambda d:d[1], reverse = True)
+ print str(file)+'\n'
+ print dict
+ del map
\ No newline at end of file
diff --git a/fybhp/practice7/practice7.py b/fybhp/practice7/practice7.py
new file mode 100644
index 00000000..5252536d
--- /dev/null
+++ b/fybhp/practice7/practice7.py
@@ -0,0 +1,32 @@
+# -*- coding:utf-8 -*-
+import os
+
+#用字典结构表示,更为清晰。
+map = {}
+map['blank'] = 0
+map['annotation'] = 0
+map['all'] = 0
+dir = r'E://somegit/pracpro/'
+file_list = os.walk(dir)
+
+def parsefile(filedir):
+ #可以此控制计算的文件类型,如加上'.sql'等,都很容易。
+ if filedir[-3:] == '.py':
+ h = open(filedir,'r')
+ allLines = h.readlines()
+ for line in allLines:
+ line = line.strip()
+ if line == '':
+ map['blank'] += 1
+ elif line[0] == '#':
+ map['annotation'] += 1
+ map['all'] += len(allLines)
+
+#这几行很重要。
+for root, dirs, files in file_list:
+ for name in files:
+ #特别是这一行。
+ filedir = root+'/'+name
+ parsefile(filedir)
+
+print map
\ No newline at end of file
diff --git a/fybhp/practice8/AGitPro.html b/fybhp/practice8/AGitPro.html
new file mode 100644
index 00000000..119983d8
--- /dev/null
+++ b/fybhp/practice8/AGitPro.html
@@ -0,0 +1,878 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GitHub - Yixiaohan/show-me-the-code: Python 练习册,每天一个小程序
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to content
+
+
+
+
第 0024 题: 使用 Python 的 Web 框架,做一个 Web 版本 TodoList 应用。
+
+
+
+
+
+
第 0025 题: 使用 Python 实现:对着电脑吼一声,自动打开浏览器中的默认网站。
+
+
例如,对着笔记本电脑吼一声“百度”,浏览器自动打开百度首页。
+
+关键字:Speech to Text
+
+
+
参考思路:
+1:获取电脑录音-->WAV文件
+ python record wav
+
+
2:录音文件-->文本
+
+
STT: Speech to Text
+
+STT API Google API
+
+
+
3:文本-->电脑命令
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Something went wrong with that request. Please try again.
+
+
+
+
+
+ You signed in with another tab or window. Reload to refresh your session.
+ You signed out in another tab or window. Reload to refresh your session.
+
第 0024 题: 使用 Python 的 Web 框架,做一个 Web 版本 TodoList 应用。
+
+
+
+
+
+
第 0025 题: 使用 Python 实现:对着电脑吼一声,自动打开浏览器中的默认网站。
+
+
例如,对着笔记本电脑吼一声“百度”,浏览器自动打开百度首页。
+
+关键字:Speech to Text
+
+
+
参考思路:
+1:获取电脑录音-->WAV文件
+ python record wav
+
+
2:录音文件-->文本
+
+
STT: Speech to Text
+
+STT API Google API
+
+
+
3:文本-->电脑命令
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Something went wrong with that request. Please try again.
+
+
+
+
+
+ You signed in with another tab or window. Reload to refresh your session.
+ You signed out in another tab or window. Reload to refresh your session.
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/fybhp/practice9/practice9.py b/fybhp/practice9/practice9.py
new file mode 100644
index 00000000..c5adc3d4
--- /dev/null
+++ b/fybhp/practice9/practice9.py
@@ -0,0 +1,6 @@
+# -*- coding:utf-8 -*-
+from bs4 import BeautifulSoup
+
+soup = BeautifulSoup(open('AGitPro.html'),'lxml')
+for link in soup.find_all('a'):
+ print link['href']
\ No newline at end of file
diff --git a/hooting/0011/0011.py b/hooting/0011/0011.py
new file mode 100644
index 00000000..b9ca6211
--- /dev/null
+++ b/hooting/0011/0011.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+__author__ = 'hooting'
+with open('filtered_words.txt','r')as f:
+ filter = [line.rstrip() for line in f]
+
+while True:
+ text = raw_input("please input:")
+ for x in filter:
+ if x in text:
+ print "Freedom"
+ break
+ else:
+ print "Human Rights"
diff --git a/hooting/0011/filtered_words.txt b/hooting/0011/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/hooting/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/hooting/0012/0012.py b/hooting/0012/0012.py
new file mode 100644
index 00000000..4cb26925
--- /dev/null
+++ b/hooting/0012/0012.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+__author__ = 'hooting'
+with open('filtered_words.txt','r')as f:
+ filter = [line.rstrip() for line in f]
+
+while True:
+ text = raw_input("please input:")
+ for x in filter:
+ if x in text:
+ print len(x)
+ text = text.replace(x, '*'*len(x))
+ print text
diff --git a/hooting/0012/filtered_words.txt b/hooting/0012/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/hooting/0012/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/houshengandt/readme.md b/houshengandt/readme.md
new file mode 100644
index 00000000..8d260923
--- /dev/null
+++ b/houshengandt/readme.md
@@ -0,0 +1,28 @@
+#My Repository
+##My-Solutions-For-Show-Me-the-Code
+https://github.com/houshengandt/My-Solutions-For-Show-Me-The-Code
+##关于第0025题百度语音解法
+https://github.com/houshengandt/My-Solutions-For-Show-Me-The-Code/blob/master/0025/help.md
+
+###使用方法
+`python3 0025.py`
+
+在 输出 正在录音...... 时喊出你想打开的网站,录音时间有5秒,之后会上传。
+目前支持“百度”“微博”“谷歌”,可以在代码中的dict website 里添加你想要的网站,但注意识别不是百分百准确,每个人口音也有差异,根据识别结果来调整value值。
+
+######题目
+[Python 练习册,每天一个小程序](https://github.com/Yixiaohan/show-me-the-code)
+>第 0025 题: 使用Python实现:对着电脑吼一声,自动打开浏览器中的默认网站。
+>
+>例如,对着笔记本电脑吼一声“百度”,浏览器自动打开百度首页。
+>
+> 关键字:Speech to Text
+
+
+
+PyAudio是唯一一个用到的外部库,用来录制音频文件,官方的[录音实例](http://people.csail.mit.edu/hubert/pyaudio/#record-example)可以直接拿来使用。
+
+使用 百度语音识别 REST API:
+* [官方文档](http://yuyin.baidu.com/docs/asr/56)
+* [access_token的获取](http://developer.baidu.com/wiki/index.php?title=docs/oauth/client)
+* 注意,“百度”会被识别为“baidu,”,即使返回“百渡”也不回“百度”,遇到相同问题的不要太纠结。
diff --git a/jennydai2011/0000/0000-01-result-wechat_number.jpg b/jennydai2011/0000/0000-01-result-wechat_number.jpg
new file mode 100644
index 00000000..48e1da46
Binary files /dev/null and b/jennydai2011/0000/0000-01-result-wechat_number.jpg differ
diff --git a/jennydai2011/0000/0000-02-result.jpg b/jennydai2011/0000/0000-02-result.jpg
new file mode 100644
index 00000000..12857aa8
Binary files /dev/null and b/jennydai2011/0000/0000-02-result.jpg differ
diff --git a/jennydai2011/0000/0000-02.py b/jennydai2011/0000/0000-02.py
new file mode 100644
index 00000000..2f7f520e
--- /dev/null
+++ b/jennydai2011/0000/0000-02.py
@@ -0,0 +1,19 @@
+#!"C:\Python34\python.exe"
+
+from PIL import Image, ImageDraw, ImageFont
+import sys, os, random
+
+num = str(random.randint(1,99))
+def add_num(img):
+ draw = ImageDraw.Draw(img)
+ myfont = ImageFont.truetype('c:/windows/fonts/Arial.ttf', size=40)
+ fillcolor = "#ff0000"
+ width, height = img.size
+ draw.text((width-40, 0), num, font=myfont, fill=fillcolor)
+ img.save('C:/java/pythonProjects/Learning/YixiaohanDailyTask/0000/0000-02-result.jpg', 'jpeg')
+
+ return 0
+
+if __name__ == '__main__':
+ image = Image.open('C:/java/pythonProjects/Learning/YixiaohanDailyTask/0000/image.jpg')
+ add_num(image)
\ No newline at end of file
diff --git a/jennydai2011/0000/0000.py b/jennydai2011/0000/0000.py
new file mode 100644
index 00000000..e69a6e55
--- /dev/null
+++ b/jennydai2011/0000/0000.py
@@ -0,0 +1,28 @@
+#!"C:\Python34\python.exe"
+#import Image
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+import sys, os, random
+
+num = str(random.randint(1,99))
+imagePath =os.path.join(sys.path[0], 'wechat.jpg')
+savePath=os.path.join(sys.path[0], '0000-01-result-wechat_number.jpg')
+
+def add_num(im, wDraw, hDraw):
+ font = ImageFont.truetype('arial.ttf', 30)
+ draw = ImageDraw.Draw(im)
+ draw.ellipse(
+ (radioX, radioY, radioX + 30, radioY + 30), fill ='red', outline='red')
+ draw.text((wDraw, hDraw), num, font=font, fill='white')
+ im.save(savePath, 'jpeg')
+
+if __name__ == '__main__':
+ im = Image.open(imagePath)
+ w, h = im.size
+ print('Original image size: %sx%s' %(w,h))
+ wDraw = int(0.8 * w)
+ hDraw = int(0.01 * h)
+ radioX = wDraw
+ radioY = hDraw
+ print('radioX:', radioX)
+ print('radioY:', radioY)
+ add_num(im, wDraw, hDraw)
\ No newline at end of file
diff --git a/jennydai2011/0000/arial.ttf b/jennydai2011/0000/arial.ttf
new file mode 100644
index 00000000..ad7d8eab
Binary files /dev/null and b/jennydai2011/0000/arial.ttf differ
diff --git a/jennydai2011/0000/image.jpg b/jennydai2011/0000/image.jpg
new file mode 100644
index 00000000..61803e7c
Binary files /dev/null and b/jennydai2011/0000/image.jpg differ
diff --git a/jennydai2011/0000/wechat.jpg b/jennydai2011/0000/wechat.jpg
new file mode 100644
index 00000000..12bc5429
Binary files /dev/null and b/jennydai2011/0000/wechat.jpg differ
diff --git a/jessun1990/README.MD b/jessun1990/README.MD
new file mode 100644
index 00000000..55f2d0ee
--- /dev/null
+++ b/jessun1990/README.MD
@@ -0,0 +1,4 @@
+# My Repository
+
+My python-homework is here: [ https://github.com/jessun1990/python-homework ](https://github.com/jessun1990/python-homework)
+
diff --git a/jhgdike/0004/solution.py b/jhgdike/0004/solution.py
new file mode 100644
index 00000000..f794c5b2
--- /dev/null
+++ b/jhgdike/0004/solution.py
@@ -0,0 +1,14 @@
+# coding: utf-8
+
+import re
+from collections import Counter
+
+
+def word_count(txt):
+ word_pattern = r'[a-zA-Z-]+'
+ words = re.findall(word_pattern, txt)
+ return Counter(words).items()
+
+if __name__ == '__main__':
+ txt = open('test.txt', 'r').read().lower()
+ print word_count(txt)
diff --git a/jhgdike/0004/test.txt b/jhgdike/0004/test.txt
new file mode 100644
index 00000000..bdd031c4
--- /dev/null
+++ b/jhgdike/0004/test.txt
@@ -0,0 +1 @@
+Henry was a pen name used by an American writer of short stories. His real name was William Sydney Porter. He was born in North Carolina in 1862. As a young boy he lived an exciting life. He did not go to school for very long, but he managed to teach himself everything he needed to know. When he was about 20 years old, O. Henry went to Texas, where he tried different jobs. He first worked on a newspaper, and then had a job in a bank, when some money went missing from the bank O. Henry was believed to have stolen it. Because of that, he was sent to prison. During the three years in prison, he learned to write short stories. After he got out of prison, he went to New York and continued writing. He wrote mostly about New York and the life of the poor there. People liked his stories, because simple as the tales were, they would finish with a sudden change at the end, to the reader¡¯s surprise.
diff --git a/jiangqideng/.gitignore b/jiangqideng/.gitignore
new file mode 100644
index 00000000..f73806eb
--- /dev/null
+++ b/jiangqideng/.gitignore
@@ -0,0 +1 @@
+.ipynb_checkpoints/
\ No newline at end of file
diff --git "a/jiangqideng/python\347\273\203\344\271\240\351\242\230\345\217\212\347\255\224\346\241\210-\357\274\2100000\351\242\230-0025\351\242\230\357\274\211-html\351\242\204\350\247\210\347\211\210.html" "b/jiangqideng/python\347\273\203\344\271\240\351\242\230\345\217\212\347\255\224\346\241\210-\357\274\2100000\351\242\230-0025\351\242\230\357\274\211-html\351\242\204\350\247\210\347\211\210.html"
new file mode 100644
index 00000000..cbac536a
--- /dev/null
+++ "b/jiangqideng/python\347\273\203\344\271\240\351\242\230\345\217\212\347\255\224\346\241\210-\357\274\2100000\351\242\230-0025\351\242\230\357\274\211-html\351\242\204\350\247\210\347\211\210.html"
@@ -0,0 +1,16493 @@
+
+
+
+python练习题及答案-(0000题-0025题)-ipython-notebook版本
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+