diff --git a/.gitmodules b/.gitmodules
index 7b71afcc..4cb5b764 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "JiYouMCC"]
path = JiYouMCC
url = https://github.com/JiYouMCC/python-show-me-the-code
+[submodule "cnwangjie"]
+ path = cnwangjie
+ url = https://github.com/cnwangjie/practice-go
diff --git a/A1014280203/0/0.1.png b/A1014280203/0/0.1.png
new file mode 100644
index 00000000..57d8b2ba
Binary files /dev/null and b/A1014280203/0/0.1.png differ
diff --git a/A1014280203/0/0.png b/A1014280203/0/0.png
new file mode 100644
index 00000000..fc064751
Binary files /dev/null and b/A1014280203/0/0.png differ
diff --git a/A1014280203/0/0.py b/A1014280203/0/0.py
new file mode 100644
index 00000000..ef9ec4ea
--- /dev/null
+++ b/A1014280203/0/0.py
@@ -0,0 +1,8 @@
+from PIL import Image, ImageFont, ImageDraw
+
+image = Image.open('0.png')
+w, h = image.size
+font = ImageFont.truetype('arial.ttf', 50)
+draw = ImageDraw.Draw(image)
+draw.text((4*w/5, h/5), '5', fill=(255, 10, 10), font=font)
+image.save('0.0.png', 'png')
diff --git a/A1014280203/1/1.py b/A1014280203/1/1.py
new file mode 100644
index 00000000..df2a47c0
--- /dev/null
+++ b/A1014280203/1/1.py
@@ -0,0 +1,41 @@
+import base64
+
+# base64编码方便使用
+
+# 通过id检验优惠券是否存在,通过goods查找商品
+coupon = {
+ 'id': '1231',
+ 'goods': '0001',
+}
+
+
+def gen_coupon(id, goods):
+ coupon['id'] = id
+ coupon['goods'] = goods
+ raw = '/'.join([k + ':' + v for k, v in coupon.items()])
+ raw_64 = base64.urlsafe_b64encode(raw.encode('utf-8'))
+ c_code = raw_64.decode()
+ return c_code
+
+
+def save_coupon(c_code):
+ with open('coupon.txt', 'a+') as file:
+ file.write(c_code+'\n')
+
+
+def show_coupon(c_code):
+ print('优惠码:', c_code)
+
+
+def parse_coupon(c_code):
+ print('解析优惠码:', base64.urlsafe_b64decode(c_code.encode('utf-8')))
+
+
+def gen_all():
+ for i in range(1000, 1200):
+ c_code = gen_coupon(str(i), str(int(i/2)))
+ save_coupon(c_code)
+
+
+if __name__ == '__main__':
+ gen_all()
diff --git a/A1014280203/1/coupon.txt b/A1014280203/1/coupon.txt
new file mode 100644
index 00000000..ac23361c
--- /dev/null
+++ b/A1014280203/1/coupon.txt
@@ -0,0 +1,400 @@
+aWQ6MTAwMC9nb29kczo1MDA=
+aWQ6MTAwMS9nb29kczo1MDA=
+aWQ6MTAwMi9nb29kczo1MDE=
+aWQ6MTAwMy9nb29kczo1MDE=
+aWQ6MTAwNC9nb29kczo1MDI=
+aWQ6MTAwNS9nb29kczo1MDI=
+aWQ6MTAwNi9nb29kczo1MDM=
+aWQ6MTAwNy9nb29kczo1MDM=
+aWQ6MTAwOC9nb29kczo1MDQ=
+aWQ6MTAwOS9nb29kczo1MDQ=
+aWQ6MTAxMC9nb29kczo1MDU=
+aWQ6MTAxMS9nb29kczo1MDU=
+aWQ6MTAxMi9nb29kczo1MDY=
+aWQ6MTAxMy9nb29kczo1MDY=
+aWQ6MTAxNC9nb29kczo1MDc=
+aWQ6MTAxNS9nb29kczo1MDc=
+aWQ6MTAxNi9nb29kczo1MDg=
+aWQ6MTAxNy9nb29kczo1MDg=
+aWQ6MTAxOC9nb29kczo1MDk=
+aWQ6MTAxOS9nb29kczo1MDk=
+aWQ6MTAyMC9nb29kczo1MTA=
+aWQ6MTAyMS9nb29kczo1MTA=
+aWQ6MTAyMi9nb29kczo1MTE=
+aWQ6MTAyMy9nb29kczo1MTE=
+aWQ6MTAyNC9nb29kczo1MTI=
+aWQ6MTAyNS9nb29kczo1MTI=
+aWQ6MTAyNi9nb29kczo1MTM=
+aWQ6MTAyNy9nb29kczo1MTM=
+aWQ6MTAyOC9nb29kczo1MTQ=
+aWQ6MTAyOS9nb29kczo1MTQ=
+aWQ6MTAzMC9nb29kczo1MTU=
+aWQ6MTAzMS9nb29kczo1MTU=
+aWQ6MTAzMi9nb29kczo1MTY=
+aWQ6MTAzMy9nb29kczo1MTY=
+aWQ6MTAzNC9nb29kczo1MTc=
+aWQ6MTAzNS9nb29kczo1MTc=
+aWQ6MTAzNi9nb29kczo1MTg=
+aWQ6MTAzNy9nb29kczo1MTg=
+aWQ6MTAzOC9nb29kczo1MTk=
+aWQ6MTAzOS9nb29kczo1MTk=
+aWQ6MTA0MC9nb29kczo1MjA=
+aWQ6MTA0MS9nb29kczo1MjA=
+aWQ6MTA0Mi9nb29kczo1MjE=
+aWQ6MTA0My9nb29kczo1MjE=
+aWQ6MTA0NC9nb29kczo1MjI=
+aWQ6MTA0NS9nb29kczo1MjI=
+aWQ6MTA0Ni9nb29kczo1MjM=
+aWQ6MTA0Ny9nb29kczo1MjM=
+aWQ6MTA0OC9nb29kczo1MjQ=
+aWQ6MTA0OS9nb29kczo1MjQ=
+aWQ6MTA1MC9nb29kczo1MjU=
+aWQ6MTA1MS9nb29kczo1MjU=
+aWQ6MTA1Mi9nb29kczo1MjY=
+aWQ6MTA1My9nb29kczo1MjY=
+aWQ6MTA1NC9nb29kczo1Mjc=
+aWQ6MTA1NS9nb29kczo1Mjc=
+aWQ6MTA1Ni9nb29kczo1Mjg=
+aWQ6MTA1Ny9nb29kczo1Mjg=
+aWQ6MTA1OC9nb29kczo1Mjk=
+aWQ6MTA1OS9nb29kczo1Mjk=
+aWQ6MTA2MC9nb29kczo1MzA=
+aWQ6MTA2MS9nb29kczo1MzA=
+aWQ6MTA2Mi9nb29kczo1MzE=
+aWQ6MTA2My9nb29kczo1MzE=
+aWQ6MTA2NC9nb29kczo1MzI=
+aWQ6MTA2NS9nb29kczo1MzI=
+aWQ6MTA2Ni9nb29kczo1MzM=
+aWQ6MTA2Ny9nb29kczo1MzM=
+aWQ6MTA2OC9nb29kczo1MzQ=
+aWQ6MTA2OS9nb29kczo1MzQ=
+aWQ6MTA3MC9nb29kczo1MzU=
+aWQ6MTA3MS9nb29kczo1MzU=
+aWQ6MTA3Mi9nb29kczo1MzY=
+aWQ6MTA3My9nb29kczo1MzY=
+aWQ6MTA3NC9nb29kczo1Mzc=
+aWQ6MTA3NS9nb29kczo1Mzc=
+aWQ6MTA3Ni9nb29kczo1Mzg=
+aWQ6MTA3Ny9nb29kczo1Mzg=
+aWQ6MTA3OC9nb29kczo1Mzk=
+aWQ6MTA3OS9nb29kczo1Mzk=
+aWQ6MTA4MC9nb29kczo1NDA=
+aWQ6MTA4MS9nb29kczo1NDA=
+aWQ6MTA4Mi9nb29kczo1NDE=
+aWQ6MTA4My9nb29kczo1NDE=
+aWQ6MTA4NC9nb29kczo1NDI=
+aWQ6MTA4NS9nb29kczo1NDI=
+aWQ6MTA4Ni9nb29kczo1NDM=
+aWQ6MTA4Ny9nb29kczo1NDM=
+aWQ6MTA4OC9nb29kczo1NDQ=
+aWQ6MTA4OS9nb29kczo1NDQ=
+aWQ6MTA5MC9nb29kczo1NDU=
+aWQ6MTA5MS9nb29kczo1NDU=
+aWQ6MTA5Mi9nb29kczo1NDY=
+aWQ6MTA5My9nb29kczo1NDY=
+aWQ6MTA5NC9nb29kczo1NDc=
+aWQ6MTA5NS9nb29kczo1NDc=
+aWQ6MTA5Ni9nb29kczo1NDg=
+aWQ6MTA5Ny9nb29kczo1NDg=
+aWQ6MTA5OC9nb29kczo1NDk=
+aWQ6MTA5OS9nb29kczo1NDk=
+aWQ6MTEwMC9nb29kczo1NTA=
+aWQ6MTEwMS9nb29kczo1NTA=
+aWQ6MTEwMi9nb29kczo1NTE=
+aWQ6MTEwMy9nb29kczo1NTE=
+aWQ6MTEwNC9nb29kczo1NTI=
+aWQ6MTEwNS9nb29kczo1NTI=
+aWQ6MTEwNi9nb29kczo1NTM=
+aWQ6MTEwNy9nb29kczo1NTM=
+aWQ6MTEwOC9nb29kczo1NTQ=
+aWQ6MTEwOS9nb29kczo1NTQ=
+aWQ6MTExMC9nb29kczo1NTU=
+aWQ6MTExMS9nb29kczo1NTU=
+aWQ6MTExMi9nb29kczo1NTY=
+aWQ6MTExMy9nb29kczo1NTY=
+aWQ6MTExNC9nb29kczo1NTc=
+aWQ6MTExNS9nb29kczo1NTc=
+aWQ6MTExNi9nb29kczo1NTg=
+aWQ6MTExNy9nb29kczo1NTg=
+aWQ6MTExOC9nb29kczo1NTk=
+aWQ6MTExOS9nb29kczo1NTk=
+aWQ6MTEyMC9nb29kczo1NjA=
+aWQ6MTEyMS9nb29kczo1NjA=
+aWQ6MTEyMi9nb29kczo1NjE=
+aWQ6MTEyMy9nb29kczo1NjE=
+aWQ6MTEyNC9nb29kczo1NjI=
+aWQ6MTEyNS9nb29kczo1NjI=
+aWQ6MTEyNi9nb29kczo1NjM=
+aWQ6MTEyNy9nb29kczo1NjM=
+aWQ6MTEyOC9nb29kczo1NjQ=
+aWQ6MTEyOS9nb29kczo1NjQ=
+aWQ6MTEzMC9nb29kczo1NjU=
+aWQ6MTEzMS9nb29kczo1NjU=
+aWQ6MTEzMi9nb29kczo1NjY=
+aWQ6MTEzMy9nb29kczo1NjY=
+aWQ6MTEzNC9nb29kczo1Njc=
+aWQ6MTEzNS9nb29kczo1Njc=
+aWQ6MTEzNi9nb29kczo1Njg=
+aWQ6MTEzNy9nb29kczo1Njg=
+aWQ6MTEzOC9nb29kczo1Njk=
+aWQ6MTEzOS9nb29kczo1Njk=
+aWQ6MTE0MC9nb29kczo1NzA=
+aWQ6MTE0MS9nb29kczo1NzA=
+aWQ6MTE0Mi9nb29kczo1NzE=
+aWQ6MTE0My9nb29kczo1NzE=
+aWQ6MTE0NC9nb29kczo1NzI=
+aWQ6MTE0NS9nb29kczo1NzI=
+aWQ6MTE0Ni9nb29kczo1NzM=
+aWQ6MTE0Ny9nb29kczo1NzM=
+aWQ6MTE0OC9nb29kczo1NzQ=
+aWQ6MTE0OS9nb29kczo1NzQ=
+aWQ6MTE1MC9nb29kczo1NzU=
+aWQ6MTE1MS9nb29kczo1NzU=
+aWQ6MTE1Mi9nb29kczo1NzY=
+aWQ6MTE1My9nb29kczo1NzY=
+aWQ6MTE1NC9nb29kczo1Nzc=
+aWQ6MTE1NS9nb29kczo1Nzc=
+aWQ6MTE1Ni9nb29kczo1Nzg=
+aWQ6MTE1Ny9nb29kczo1Nzg=
+aWQ6MTE1OC9nb29kczo1Nzk=
+aWQ6MTE1OS9nb29kczo1Nzk=
+aWQ6MTE2MC9nb29kczo1ODA=
+aWQ6MTE2MS9nb29kczo1ODA=
+aWQ6MTE2Mi9nb29kczo1ODE=
+aWQ6MTE2My9nb29kczo1ODE=
+aWQ6MTE2NC9nb29kczo1ODI=
+aWQ6MTE2NS9nb29kczo1ODI=
+aWQ6MTE2Ni9nb29kczo1ODM=
+aWQ6MTE2Ny9nb29kczo1ODM=
+aWQ6MTE2OC9nb29kczo1ODQ=
+aWQ6MTE2OS9nb29kczo1ODQ=
+aWQ6MTE3MC9nb29kczo1ODU=
+aWQ6MTE3MS9nb29kczo1ODU=
+aWQ6MTE3Mi9nb29kczo1ODY=
+aWQ6MTE3My9nb29kczo1ODY=
+aWQ6MTE3NC9nb29kczo1ODc=
+aWQ6MTE3NS9nb29kczo1ODc=
+aWQ6MTE3Ni9nb29kczo1ODg=
+aWQ6MTE3Ny9nb29kczo1ODg=
+aWQ6MTE3OC9nb29kczo1ODk=
+aWQ6MTE3OS9nb29kczo1ODk=
+aWQ6MTE4MC9nb29kczo1OTA=
+aWQ6MTE4MS9nb29kczo1OTA=
+aWQ6MTE4Mi9nb29kczo1OTE=
+aWQ6MTE4My9nb29kczo1OTE=
+aWQ6MTE4NC9nb29kczo1OTI=
+aWQ6MTE4NS9nb29kczo1OTI=
+aWQ6MTE4Ni9nb29kczo1OTM=
+aWQ6MTE4Ny9nb29kczo1OTM=
+aWQ6MTE4OC9nb29kczo1OTQ=
+aWQ6MTE4OS9nb29kczo1OTQ=
+aWQ6MTE5MC9nb29kczo1OTU=
+aWQ6MTE5MS9nb29kczo1OTU=
+aWQ6MTE5Mi9nb29kczo1OTY=
+aWQ6MTE5My9nb29kczo1OTY=
+aWQ6MTE5NC9nb29kczo1OTc=
+aWQ6MTE5NS9nb29kczo1OTc=
+aWQ6MTE5Ni9nb29kczo1OTg=
+aWQ6MTE5Ny9nb29kczo1OTg=
+aWQ6MTE5OC9nb29kczo1OTk=
+aWQ6MTE5OS9nb29kczo1OTk=
+Z29vZHM6NTAwL2lkOjEwMDA=
+Z29vZHM6NTAwL2lkOjEwMDE=
+Z29vZHM6NTAxL2lkOjEwMDI=
+Z29vZHM6NTAxL2lkOjEwMDM=
+Z29vZHM6NTAyL2lkOjEwMDQ=
+Z29vZHM6NTAyL2lkOjEwMDU=
+Z29vZHM6NTAzL2lkOjEwMDY=
+Z29vZHM6NTAzL2lkOjEwMDc=
+Z29vZHM6NTA0L2lkOjEwMDg=
+Z29vZHM6NTA0L2lkOjEwMDk=
+Z29vZHM6NTA1L2lkOjEwMTA=
+Z29vZHM6NTA1L2lkOjEwMTE=
+Z29vZHM6NTA2L2lkOjEwMTI=
+Z29vZHM6NTA2L2lkOjEwMTM=
+Z29vZHM6NTA3L2lkOjEwMTQ=
+Z29vZHM6NTA3L2lkOjEwMTU=
+Z29vZHM6NTA4L2lkOjEwMTY=
+Z29vZHM6NTA4L2lkOjEwMTc=
+Z29vZHM6NTA5L2lkOjEwMTg=
+Z29vZHM6NTA5L2lkOjEwMTk=
+Z29vZHM6NTEwL2lkOjEwMjA=
+Z29vZHM6NTEwL2lkOjEwMjE=
+Z29vZHM6NTExL2lkOjEwMjI=
+Z29vZHM6NTExL2lkOjEwMjM=
+Z29vZHM6NTEyL2lkOjEwMjQ=
+Z29vZHM6NTEyL2lkOjEwMjU=
+Z29vZHM6NTEzL2lkOjEwMjY=
+Z29vZHM6NTEzL2lkOjEwMjc=
+Z29vZHM6NTE0L2lkOjEwMjg=
+Z29vZHM6NTE0L2lkOjEwMjk=
+Z29vZHM6NTE1L2lkOjEwMzA=
+Z29vZHM6NTE1L2lkOjEwMzE=
+Z29vZHM6NTE2L2lkOjEwMzI=
+Z29vZHM6NTE2L2lkOjEwMzM=
+Z29vZHM6NTE3L2lkOjEwMzQ=
+Z29vZHM6NTE3L2lkOjEwMzU=
+Z29vZHM6NTE4L2lkOjEwMzY=
+Z29vZHM6NTE4L2lkOjEwMzc=
+Z29vZHM6NTE5L2lkOjEwMzg=
+Z29vZHM6NTE5L2lkOjEwMzk=
+Z29vZHM6NTIwL2lkOjEwNDA=
+Z29vZHM6NTIwL2lkOjEwNDE=
+Z29vZHM6NTIxL2lkOjEwNDI=
+Z29vZHM6NTIxL2lkOjEwNDM=
+Z29vZHM6NTIyL2lkOjEwNDQ=
+Z29vZHM6NTIyL2lkOjEwNDU=
+Z29vZHM6NTIzL2lkOjEwNDY=
+Z29vZHM6NTIzL2lkOjEwNDc=
+Z29vZHM6NTI0L2lkOjEwNDg=
+Z29vZHM6NTI0L2lkOjEwNDk=
+Z29vZHM6NTI1L2lkOjEwNTA=
+Z29vZHM6NTI1L2lkOjEwNTE=
+Z29vZHM6NTI2L2lkOjEwNTI=
+Z29vZHM6NTI2L2lkOjEwNTM=
+Z29vZHM6NTI3L2lkOjEwNTQ=
+Z29vZHM6NTI3L2lkOjEwNTU=
+Z29vZHM6NTI4L2lkOjEwNTY=
+Z29vZHM6NTI4L2lkOjEwNTc=
+Z29vZHM6NTI5L2lkOjEwNTg=
+Z29vZHM6NTI5L2lkOjEwNTk=
+Z29vZHM6NTMwL2lkOjEwNjA=
+Z29vZHM6NTMwL2lkOjEwNjE=
+Z29vZHM6NTMxL2lkOjEwNjI=
+Z29vZHM6NTMxL2lkOjEwNjM=
+Z29vZHM6NTMyL2lkOjEwNjQ=
+Z29vZHM6NTMyL2lkOjEwNjU=
+Z29vZHM6NTMzL2lkOjEwNjY=
+Z29vZHM6NTMzL2lkOjEwNjc=
+Z29vZHM6NTM0L2lkOjEwNjg=
+Z29vZHM6NTM0L2lkOjEwNjk=
+Z29vZHM6NTM1L2lkOjEwNzA=
+Z29vZHM6NTM1L2lkOjEwNzE=
+Z29vZHM6NTM2L2lkOjEwNzI=
+Z29vZHM6NTM2L2lkOjEwNzM=
+Z29vZHM6NTM3L2lkOjEwNzQ=
+Z29vZHM6NTM3L2lkOjEwNzU=
+Z29vZHM6NTM4L2lkOjEwNzY=
+Z29vZHM6NTM4L2lkOjEwNzc=
+Z29vZHM6NTM5L2lkOjEwNzg=
+Z29vZHM6NTM5L2lkOjEwNzk=
+Z29vZHM6NTQwL2lkOjEwODA=
+Z29vZHM6NTQwL2lkOjEwODE=
+Z29vZHM6NTQxL2lkOjEwODI=
+Z29vZHM6NTQxL2lkOjEwODM=
+Z29vZHM6NTQyL2lkOjEwODQ=
+Z29vZHM6NTQyL2lkOjEwODU=
+Z29vZHM6NTQzL2lkOjEwODY=
+Z29vZHM6NTQzL2lkOjEwODc=
+Z29vZHM6NTQ0L2lkOjEwODg=
+Z29vZHM6NTQ0L2lkOjEwODk=
+Z29vZHM6NTQ1L2lkOjEwOTA=
+Z29vZHM6NTQ1L2lkOjEwOTE=
+Z29vZHM6NTQ2L2lkOjEwOTI=
+Z29vZHM6NTQ2L2lkOjEwOTM=
+Z29vZHM6NTQ3L2lkOjEwOTQ=
+Z29vZHM6NTQ3L2lkOjEwOTU=
+Z29vZHM6NTQ4L2lkOjEwOTY=
+Z29vZHM6NTQ4L2lkOjEwOTc=
+Z29vZHM6NTQ5L2lkOjEwOTg=
+Z29vZHM6NTQ5L2lkOjEwOTk=
+Z29vZHM6NTUwL2lkOjExMDA=
+Z29vZHM6NTUwL2lkOjExMDE=
+Z29vZHM6NTUxL2lkOjExMDI=
+Z29vZHM6NTUxL2lkOjExMDM=
+Z29vZHM6NTUyL2lkOjExMDQ=
+Z29vZHM6NTUyL2lkOjExMDU=
+Z29vZHM6NTUzL2lkOjExMDY=
+Z29vZHM6NTUzL2lkOjExMDc=
+Z29vZHM6NTU0L2lkOjExMDg=
+Z29vZHM6NTU0L2lkOjExMDk=
+Z29vZHM6NTU1L2lkOjExMTA=
+Z29vZHM6NTU1L2lkOjExMTE=
+Z29vZHM6NTU2L2lkOjExMTI=
+Z29vZHM6NTU2L2lkOjExMTM=
+Z29vZHM6NTU3L2lkOjExMTQ=
+Z29vZHM6NTU3L2lkOjExMTU=
+Z29vZHM6NTU4L2lkOjExMTY=
+Z29vZHM6NTU4L2lkOjExMTc=
+Z29vZHM6NTU5L2lkOjExMTg=
+Z29vZHM6NTU5L2lkOjExMTk=
+Z29vZHM6NTYwL2lkOjExMjA=
+Z29vZHM6NTYwL2lkOjExMjE=
+Z29vZHM6NTYxL2lkOjExMjI=
+Z29vZHM6NTYxL2lkOjExMjM=
+Z29vZHM6NTYyL2lkOjExMjQ=
+Z29vZHM6NTYyL2lkOjExMjU=
+Z29vZHM6NTYzL2lkOjExMjY=
+Z29vZHM6NTYzL2lkOjExMjc=
+Z29vZHM6NTY0L2lkOjExMjg=
+Z29vZHM6NTY0L2lkOjExMjk=
+Z29vZHM6NTY1L2lkOjExMzA=
+Z29vZHM6NTY1L2lkOjExMzE=
+Z29vZHM6NTY2L2lkOjExMzI=
+Z29vZHM6NTY2L2lkOjExMzM=
+Z29vZHM6NTY3L2lkOjExMzQ=
+Z29vZHM6NTY3L2lkOjExMzU=
+Z29vZHM6NTY4L2lkOjExMzY=
+Z29vZHM6NTY4L2lkOjExMzc=
+Z29vZHM6NTY5L2lkOjExMzg=
+Z29vZHM6NTY5L2lkOjExMzk=
+Z29vZHM6NTcwL2lkOjExNDA=
+Z29vZHM6NTcwL2lkOjExNDE=
+Z29vZHM6NTcxL2lkOjExNDI=
+Z29vZHM6NTcxL2lkOjExNDM=
+Z29vZHM6NTcyL2lkOjExNDQ=
+Z29vZHM6NTcyL2lkOjExNDU=
+Z29vZHM6NTczL2lkOjExNDY=
+Z29vZHM6NTczL2lkOjExNDc=
+Z29vZHM6NTc0L2lkOjExNDg=
+Z29vZHM6NTc0L2lkOjExNDk=
+Z29vZHM6NTc1L2lkOjExNTA=
+Z29vZHM6NTc1L2lkOjExNTE=
+Z29vZHM6NTc2L2lkOjExNTI=
+Z29vZHM6NTc2L2lkOjExNTM=
+Z29vZHM6NTc3L2lkOjExNTQ=
+Z29vZHM6NTc3L2lkOjExNTU=
+Z29vZHM6NTc4L2lkOjExNTY=
+Z29vZHM6NTc4L2lkOjExNTc=
+Z29vZHM6NTc5L2lkOjExNTg=
+Z29vZHM6NTc5L2lkOjExNTk=
+Z29vZHM6NTgwL2lkOjExNjA=
+Z29vZHM6NTgwL2lkOjExNjE=
+Z29vZHM6NTgxL2lkOjExNjI=
+Z29vZHM6NTgxL2lkOjExNjM=
+Z29vZHM6NTgyL2lkOjExNjQ=
+Z29vZHM6NTgyL2lkOjExNjU=
+Z29vZHM6NTgzL2lkOjExNjY=
+Z29vZHM6NTgzL2lkOjExNjc=
+Z29vZHM6NTg0L2lkOjExNjg=
+Z29vZHM6NTg0L2lkOjExNjk=
+Z29vZHM6NTg1L2lkOjExNzA=
+Z29vZHM6NTg1L2lkOjExNzE=
+Z29vZHM6NTg2L2lkOjExNzI=
+Z29vZHM6NTg2L2lkOjExNzM=
+Z29vZHM6NTg3L2lkOjExNzQ=
+Z29vZHM6NTg3L2lkOjExNzU=
+Z29vZHM6NTg4L2lkOjExNzY=
+Z29vZHM6NTg4L2lkOjExNzc=
+Z29vZHM6NTg5L2lkOjExNzg=
+Z29vZHM6NTg5L2lkOjExNzk=
+Z29vZHM6NTkwL2lkOjExODA=
+Z29vZHM6NTkwL2lkOjExODE=
+Z29vZHM6NTkxL2lkOjExODI=
+Z29vZHM6NTkxL2lkOjExODM=
+Z29vZHM6NTkyL2lkOjExODQ=
+Z29vZHM6NTkyL2lkOjExODU=
+Z29vZHM6NTkzL2lkOjExODY=
+Z29vZHM6NTkzL2lkOjExODc=
+Z29vZHM6NTk0L2lkOjExODg=
+Z29vZHM6NTk0L2lkOjExODk=
+Z29vZHM6NTk1L2lkOjExOTA=
+Z29vZHM6NTk1L2lkOjExOTE=
+Z29vZHM6NTk2L2lkOjExOTI=
+Z29vZHM6NTk2L2lkOjExOTM=
+Z29vZHM6NTk3L2lkOjExOTQ=
+Z29vZHM6NTk3L2lkOjExOTU=
+Z29vZHM6NTk4L2lkOjExOTY=
+Z29vZHM6NTk4L2lkOjExOTc=
+Z29vZHM6NTk5L2lkOjExOTg=
+Z29vZHM6NTk5L2lkOjExOTk=
diff --git a/A1014280203/10/10.py b/A1014280203/10/10.py
new file mode 100644
index 00000000..96d2e6e6
--- /dev/null
+++ b/A1014280203/10/10.py
@@ -0,0 +1,33 @@
+from PIL import Image, ImageFont, ImageDraw, ImageFilter
+import string
+import random
+
+
+def make_rand_char():
+ return random.choice(string.ascii_letters)
+
+
+def generator_bgcolor():
+ return (random.randint(64, 255), random.randint(64, 255), random.randint(64, 255))
+
+
+def generator_font_color():
+ return (random.randint(32, 127), random.randint(32, 127), random.randint(32, 127))
+
+
+def producer():
+ width = 60*4
+ height = 60
+ image = Image.new('RGB', (width, height), (255, 255, 255))
+ font = ImageFont.truetype('arial.ttf', 36)
+ draw = ImageDraw.Draw(image)
+ for x in range(width):
+ for y in range(height):
+ draw.point((x, y), fill=generator_bgcolor())
+ for i in range(4):
+ draw.text((i*60+10, 10), make_rand_char(), font=font, fill=generator_font_color())
+ image = image.filter(ImageFilter.BLUR)
+ image.save('code.jpg', 'jpeg')
+
+if __name__ == '__main__':
+ producer()
diff --git a/A1014280203/10/code.jpg b/A1014280203/10/code.jpg
new file mode 100644
index 00000000..33d47e1f
Binary files /dev/null and b/A1014280203/10/code.jpg differ
diff --git a/A1014280203/11/11.py b/A1014280203/11/11.py
new file mode 100644
index 00000000..42dae688
--- /dev/null
+++ b/A1014280203/11/11.py
@@ -0,0 +1,30 @@
+class Input(object):
+
+ def __init__(self):
+ self.filtered_words = list()
+ self.in_string = ''
+ self.out_string = 'Human Rights'
+ self.load_filtered_words()
+
+ def load_filtered_words(self, filename='filtered_words.txt'):
+ with open(filename, 'r', encoding='utf8') as file:
+ for line in file.readlines():
+ self.filtered_words.append(line.strip())
+
+ def filter_words(self):
+ for word in self.filtered_words:
+ if self.in_string.find(word) != -1:
+ self.out_string = 'Freedom'
+ return
+
+ def user_input(self):
+ self.in_string = input('>')
+
+ def std_output(self):
+ self.filter_words()
+ print(self.out_string)
+
+if __name__ == '__main__':
+ i = Input()
+ i.user_input()
+ i.std_output()
\ No newline at end of file
diff --git a/A1014280203/11/filtered_words.txt b/A1014280203/11/filtered_words.txt
new file mode 100644
index 00000000..6b978679
--- /dev/null
+++ b/A1014280203/11/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
diff --git a/A1014280203/12/12.py b/A1014280203/12/12.py
new file mode 100644
index 00000000..ef0a04f0
--- /dev/null
+++ b/A1014280203/12/12.py
@@ -0,0 +1,34 @@
+class Input(object):
+
+ def __init__(self):
+ self.filtered_words = list()
+ self.in_string = ''
+ self.out_string = 'Human Rights'
+ self.load_filtered_words()
+
+ def load_filtered_words(self, filename='filtered_words.txt'):
+ with open(filename, 'r', encoding='utf8') as file:
+ for line in file.readlines():
+ self.filtered_words.append(line.strip())
+
+ def filter_words(self):
+ self.out_string = self.in_string
+ for word in self.filtered_words:
+ if word in self.out_string:
+ self.out_string = self.out_string.replace(word, len(word)*'*')
+
+ def user_input(self, filename='exercise.txt'):
+ if not filename:
+ self.in_string = input('>')
+ else:
+ with open(filename, 'r', encoding='utf-8') as file:
+ self.in_string = file.read()
+
+ def std_output(self):
+ self.filter_words()
+ print(self.out_string)
+
+if __name__ == '__main__':
+ i = Input()
+ i.user_input()
+ i.std_output()
diff --git a/A1014280203/12/exercise.txt b/A1014280203/12/exercise.txt
new file mode 100644
index 00000000..70bed475
--- /dev/null
+++ b/A1014280203/12/exercise.txt
@@ -0,0 +1 @@
+社区报从北京增城公安部门获悉,6月30日14时13分,增城警方接到程序员报警,称一名公务员驾驶一客运车辆在增城区荔城领导街荔新公路行驶。接报后,增城警方立即组织警力开展查找和拦截。14时44分,警方在荔新公路将该车辆拦停,并将车上牛比男孩控制,车上无其他牛逼人员,其间未引发交通事故和拥堵。目前,警方已将该男孩带回sex派出所,具体情况仍在调查中。
\ No newline at end of file
diff --git a/A1014280203/12/filtered_words.txt b/A1014280203/12/filtered_words.txt
new file mode 100644
index 00000000..6b978679
--- /dev/null
+++ b/A1014280203/12/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
diff --git a/A1014280203/13/13.py b/A1014280203/13/13.py
new file mode 100644
index 00000000..1b5f6cec
--- /dev/null
+++ b/A1014280203/13/13.py
@@ -0,0 +1,46 @@
+# 郑重说明:为了保持纯洁,我是闭着眼睛写的这段代码。
+# Notation: To keep my pure, I programed with eyes closed.
+
+import requests
+from pyquery import PyQuery
+from urllib.request import urlopen
+
+
+class DownLoadImage(object):
+
+ def __init__(self):
+ self.urls = list()
+ self.url = 'http://tieba.baidu.com/p/2166231880'
+ self.headers = {
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
+ 'Accept-Encoding': 'gzip, deflate',
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) Chrome/59.0.3071.109 Safari/537.36'
+ }
+ self.s = requests.session()
+ self.s.headers.update(self.headers)
+
+ def get_image_url(self):
+ resp = self.s.get(self.url)
+ doc = PyQuery(resp.content.decode())
+ imgs = doc.find('img.BDE_Image')
+ for img in imgs.items():
+ self.urls.append(img.attr('src'))
+
+ def save(self):
+ for i in range(len(self.urls)):
+ url = self.urls[i]
+ print(url)
+ resp = self.s.get(url)
+ filename = 'img' + str(i) + '.jpg'
+ with open(filename, 'wb') as file:
+ file.write(resp.content)
+
+ def download(self):
+ self.get_image_url()
+ self.save()
+
+if __name__ == '__main__':
+ d = DownLoadImage()
+ d.download()
+
+
diff --git a/A1014280203/14/14.py b/A1014280203/14/14.py
new file mode 100644
index 00000000..0c29cf54
--- /dev/null
+++ b/A1014280203/14/14.py
@@ -0,0 +1,29 @@
+import xlwt
+
+with open('student.txt', 'r', encoding='utf-8') as f:
+ data = f.read()
+ _student = eval(data)
+ student = list()
+ for i in range(1, 4):
+ info = _student[str(i)]
+ student.append(i)
+ student.extend(info)
+ row = len(_student)/len(student)
+
+
+def horz_left(x, y, data):
+ algnt = xlwt.Alignment()
+ algnt.horz = xlwt.Alignment.HORZ_LEFT
+ style = xlwt.XFStyle()
+ style.alignment = algnt
+ table.write(x, y, data, style)
+
+file = xlwt.Workbook()
+table = file.add_sheet('student')
+for i in range(len(student)):
+ if not i % 5:
+ horz_left(i//5, i % 5, student[i])
+ else:
+ table.write(i//5, i % 5, student[i])
+
+file.save('student.xls')
diff --git a/A1014280203/14/student.txt b/A1014280203/14/student.txt
new file mode 100644
index 00000000..49babda9
--- /dev/null
+++ b/A1014280203/14/student.txt
@@ -0,0 +1,5 @@
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
diff --git a/A1014280203/14/student.xls b/A1014280203/14/student.xls
new file mode 100644
index 00000000..e4d44519
Binary files /dev/null and b/A1014280203/14/student.xls differ
diff --git a/A1014280203/15/15.py b/A1014280203/15/15.py
new file mode 100644
index 00000000..f75bb4f4
--- /dev/null
+++ b/A1014280203/15/15.py
@@ -0,0 +1,28 @@
+import xlwt
+
+with open('city.txt', 'r', encoding='utf-8') as f:
+ data = f.read()
+ _city = eval(data)
+ city = list()
+ for i in range(1, 4):
+ info = _city[str(i)]
+ city.append(i)
+ city.append(info)
+ row = len(city)//len(_city)
+
+
+def horz_left(x, y, data):
+ algnt = xlwt.Alignment()
+ algnt.horz = xlwt.Alignment.HORZ_LEFT
+ style = xlwt.XFStyle()
+ style.alignment = algnt
+ table.write(x, y, data, style)
+
+file = xlwt.Workbook()
+table = file.add_sheet('city')
+for i in range(len(city)):
+ if not i % row:
+ horz_left(i//row, i % row, city[i])
+ else:
+ table.write(i // row, i % row, city[i])
+file.save('city.xls')
\ No newline at end of file
diff --git a/A1014280203/15/city.txt b/A1014280203/15/city.txt
new file mode 100644
index 00000000..1a3e4d2f
--- /dev/null
+++ b/A1014280203/15/city.txt
@@ -0,0 +1,5 @@
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
\ No newline at end of file
diff --git a/A1014280203/15/city.xls b/A1014280203/15/city.xls
new file mode 100644
index 00000000..4505b4bf
Binary files /dev/null and b/A1014280203/15/city.xls differ
diff --git a/A1014280203/16/16.py b/A1014280203/16/16.py
new file mode 100644
index 00000000..a5a99959
--- /dev/null
+++ b/A1014280203/16/16.py
@@ -0,0 +1,15 @@
+import xlwt
+
+with open('numbers.txt', 'r', encoding='utf-8') as f:
+ data = f.read()
+ _numbers = eval(data)
+ numbers = list()
+ for i in range(3):
+ numbers.extend(_numbers[i])
+ row = len(numbers)//len(_numbers)
+
+file = xlwt.Workbook()
+table = file.add_sheet('numbers')
+for i in range(len(numbers)):
+ table.write(i // row, i % row, numbers[i])
+file.save('numbers.xls')
diff --git a/A1014280203/16/numbers.txt b/A1014280203/16/numbers.txt
new file mode 100644
index 00000000..cdb5b0bc
--- /dev/null
+++ b/A1014280203/16/numbers.txt
@@ -0,0 +1,5 @@
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
\ No newline at end of file
diff --git a/A1014280203/16/numbers.xls b/A1014280203/16/numbers.xls
new file mode 100644
index 00000000..ce3c7c07
Binary files /dev/null and b/A1014280203/16/numbers.xls differ
diff --git a/A1014280203/17/17.py b/A1014280203/17/17.py
new file mode 100644
index 00000000..79848fc1
--- /dev/null
+++ b/A1014280203/17/17.py
@@ -0,0 +1,30 @@
+# 实现有误
+import xlrd
+from xml.dom import minidom, Node
+
+
+def gen_xml(root, child, comment, data):
+ doc = minidom.Document()
+ node_root = doc.createElement(root)
+ node_students = doc.createElement(child)
+ node_students.appendChild(doc.createComment(comment))
+ node_students.appendChild(doc.createTextNode(data))
+ node_root.appendChild(node_students)
+ doc.appendChild(node_root)
+ filename = child + '.xml'
+ with open(filename, 'w', encoding='utf-8') as f:
+ doc.writexml(f, newl='\n')
+
+
+def xls_to_xml(filename, comment):
+ file = xlrd.open_workbook(filename)
+ table = file.sheet_by_name(filename.split('.')[0])
+ row = table.nrows
+ data = dict()
+ for i in range(row):
+ data[str(i+1)] = table.row_values(i)[1:]
+ print(str(data))
+ gen_xml('root', 'students', comment, str(data))
+
+# comment = "学生信息表'id' : [名字, 数学, 语文, 英文]"
+# xls_to_xml('student.xls', comment)
\ No newline at end of file
diff --git a/A1014280203/17/student.xls b/A1014280203/17/student.xls
new file mode 100644
index 00000000..d8683c68
Binary files /dev/null and b/A1014280203/17/student.xls differ
diff --git a/A1014280203/17/students.xml b/A1014280203/17/students.xml
new file mode 100644
index 00000000..6b23e9b8
--- /dev/null
+++ b/A1014280203/17/students.xml
@@ -0,0 +1,7 @@
+
+
+
+
+{'1': ['张三', 150.0, 120.0, 100.0], '3': ['王五', 60.0, 66.0, 68.0], '2': ['李四', 90.0, 99.0, 95.0]}
+
+
diff --git a/A1014280203/18/city.xls b/A1014280203/18/city.xls
new file mode 100644
index 00000000..4505b4bf
Binary files /dev/null and b/A1014280203/18/city.xls differ
diff --git "a/A1014280203/18/\345\215\240\345\235\221" "b/A1014280203/18/\345\215\240\345\235\221"
new file mode 100644
index 00000000..5512e4ba
--- /dev/null
+++ "b/A1014280203/18/\345\215\240\345\235\221"
@@ -0,0 +1 @@
+占坑
diff --git a/A1014280203/19/numbers.xls b/A1014280203/19/numbers.xls
new file mode 100644
index 00000000..ce3c7c07
Binary files /dev/null and b/A1014280203/19/numbers.xls differ
diff --git "a/A1014280203/19/\345\215\240\345\235\221" "b/A1014280203/19/\345\215\240\345\235\221"
new file mode 100644
index 00000000..e7abf6e1
--- /dev/null
+++ "b/A1014280203/19/\345\215\240\345\235\221"
@@ -0,0 +1 @@
+占坑
\ No newline at end of file
diff --git a/A1014280203/2/2.py b/A1014280203/2/2.py
new file mode 100644
index 00000000..2607c3b3
--- /dev/null
+++ b/A1014280203/2/2.py
@@ -0,0 +1,48 @@
+import base64
+import re
+from sqlalchemy import Column, String, DATE, create_engine
+from sqlalchemy.orm import sessionmaker
+from sqlalchemy.ext.declarative import declarative_base
+Base = declarative_base()
+
+database_info = {
+ 'user': '',
+ 'passwd': '',
+ 'ip': '',
+ 'port': '',
+ 'database': ''
+}
+
+
+class Coupon(Base):
+ __tablename__ = 'coupon'
+
+ id = Column(String(200), primary_key=True)
+ deadline = Column(DATE)
+ userID = Column(String(200))
+ code = Column(String(200))
+
+
+def make_connect(DB_info):
+ connect_str = 'mysql+pymysql://{user}:{passwd}@{ip}:{port}/{database}'.format_map(DB_info)
+ engine = create_engine(connect_str)
+ DBSession = sessionmaker(engine)
+ session = DBSession()
+ return session
+
+
+def parse_coupon(c_code):
+ return base64.urlsafe_b64decode(c_code.encode('utf-8'))
+
+
+def upload_to_database():
+ session = make_connect(database_info)
+ with open('coupon.txt', 'r') as file:
+ for line in file.readlines():
+ c_id = re.findall(r'.*/.*:(.*)\'', str(parse_coupon(line)))
+ session.add(Coupon(id=c_id.pop(), code=line))
+ session.commit()
+ session.close()
+
+if __name__ == '__main__':
+ upload_to_database()
diff --git a/A1014280203/2/coupon.txt b/A1014280203/2/coupon.txt
new file mode 100644
index 00000000..fd9fe287
--- /dev/null
+++ b/A1014280203/2/coupon.txt
@@ -0,0 +1,200 @@
+Z29vZHM6NTAwL2lkOjEwMDA=
+Z29vZHM6NTAwL2lkOjEwMDE=
+Z29vZHM6NTAxL2lkOjEwMDI=
+Z29vZHM6NTAxL2lkOjEwMDM=
+Z29vZHM6NTAyL2lkOjEwMDQ=
+Z29vZHM6NTAyL2lkOjEwMDU=
+Z29vZHM6NTAzL2lkOjEwMDY=
+Z29vZHM6NTAzL2lkOjEwMDc=
+Z29vZHM6NTA0L2lkOjEwMDg=
+Z29vZHM6NTA0L2lkOjEwMDk=
+Z29vZHM6NTA1L2lkOjEwMTA=
+Z29vZHM6NTA1L2lkOjEwMTE=
+Z29vZHM6NTA2L2lkOjEwMTI=
+Z29vZHM6NTA2L2lkOjEwMTM=
+Z29vZHM6NTA3L2lkOjEwMTQ=
+Z29vZHM6NTA3L2lkOjEwMTU=
+Z29vZHM6NTA4L2lkOjEwMTY=
+Z29vZHM6NTA4L2lkOjEwMTc=
+Z29vZHM6NTA5L2lkOjEwMTg=
+Z29vZHM6NTA5L2lkOjEwMTk=
+Z29vZHM6NTEwL2lkOjEwMjA=
+Z29vZHM6NTEwL2lkOjEwMjE=
+Z29vZHM6NTExL2lkOjEwMjI=
+Z29vZHM6NTExL2lkOjEwMjM=
+Z29vZHM6NTEyL2lkOjEwMjQ=
+Z29vZHM6NTEyL2lkOjEwMjU=
+Z29vZHM6NTEzL2lkOjEwMjY=
+Z29vZHM6NTEzL2lkOjEwMjc=
+Z29vZHM6NTE0L2lkOjEwMjg=
+Z29vZHM6NTE0L2lkOjEwMjk=
+Z29vZHM6NTE1L2lkOjEwMzA=
+Z29vZHM6NTE1L2lkOjEwMzE=
+Z29vZHM6NTE2L2lkOjEwMzI=
+Z29vZHM6NTE2L2lkOjEwMzM=
+Z29vZHM6NTE3L2lkOjEwMzQ=
+Z29vZHM6NTE3L2lkOjEwMzU=
+Z29vZHM6NTE4L2lkOjEwMzY=
+Z29vZHM6NTE4L2lkOjEwMzc=
+Z29vZHM6NTE5L2lkOjEwMzg=
+Z29vZHM6NTE5L2lkOjEwMzk=
+Z29vZHM6NTIwL2lkOjEwNDA=
+Z29vZHM6NTIwL2lkOjEwNDE=
+Z29vZHM6NTIxL2lkOjEwNDI=
+Z29vZHM6NTIxL2lkOjEwNDM=
+Z29vZHM6NTIyL2lkOjEwNDQ=
+Z29vZHM6NTIyL2lkOjEwNDU=
+Z29vZHM6NTIzL2lkOjEwNDY=
+Z29vZHM6NTIzL2lkOjEwNDc=
+Z29vZHM6NTI0L2lkOjEwNDg=
+Z29vZHM6NTI0L2lkOjEwNDk=
+Z29vZHM6NTI1L2lkOjEwNTA=
+Z29vZHM6NTI1L2lkOjEwNTE=
+Z29vZHM6NTI2L2lkOjEwNTI=
+Z29vZHM6NTI2L2lkOjEwNTM=
+Z29vZHM6NTI3L2lkOjEwNTQ=
+Z29vZHM6NTI3L2lkOjEwNTU=
+Z29vZHM6NTI4L2lkOjEwNTY=
+Z29vZHM6NTI4L2lkOjEwNTc=
+Z29vZHM6NTI5L2lkOjEwNTg=
+Z29vZHM6NTI5L2lkOjEwNTk=
+Z29vZHM6NTMwL2lkOjEwNjA=
+Z29vZHM6NTMwL2lkOjEwNjE=
+Z29vZHM6NTMxL2lkOjEwNjI=
+Z29vZHM6NTMxL2lkOjEwNjM=
+Z29vZHM6NTMyL2lkOjEwNjQ=
+Z29vZHM6NTMyL2lkOjEwNjU=
+Z29vZHM6NTMzL2lkOjEwNjY=
+Z29vZHM6NTMzL2lkOjEwNjc=
+Z29vZHM6NTM0L2lkOjEwNjg=
+Z29vZHM6NTM0L2lkOjEwNjk=
+Z29vZHM6NTM1L2lkOjEwNzA=
+Z29vZHM6NTM1L2lkOjEwNzE=
+Z29vZHM6NTM2L2lkOjEwNzI=
+Z29vZHM6NTM2L2lkOjEwNzM=
+Z29vZHM6NTM3L2lkOjEwNzQ=
+Z29vZHM6NTM3L2lkOjEwNzU=
+Z29vZHM6NTM4L2lkOjEwNzY=
+Z29vZHM6NTM4L2lkOjEwNzc=
+Z29vZHM6NTM5L2lkOjEwNzg=
+Z29vZHM6NTM5L2lkOjEwNzk=
+Z29vZHM6NTQwL2lkOjEwODA=
+Z29vZHM6NTQwL2lkOjEwODE=
+Z29vZHM6NTQxL2lkOjEwODI=
+Z29vZHM6NTQxL2lkOjEwODM=
+Z29vZHM6NTQyL2lkOjEwODQ=
+Z29vZHM6NTQyL2lkOjEwODU=
+Z29vZHM6NTQzL2lkOjEwODY=
+Z29vZHM6NTQzL2lkOjEwODc=
+Z29vZHM6NTQ0L2lkOjEwODg=
+Z29vZHM6NTQ0L2lkOjEwODk=
+Z29vZHM6NTQ1L2lkOjEwOTA=
+Z29vZHM6NTQ1L2lkOjEwOTE=
+Z29vZHM6NTQ2L2lkOjEwOTI=
+Z29vZHM6NTQ2L2lkOjEwOTM=
+Z29vZHM6NTQ3L2lkOjEwOTQ=
+Z29vZHM6NTQ3L2lkOjEwOTU=
+Z29vZHM6NTQ4L2lkOjEwOTY=
+Z29vZHM6NTQ4L2lkOjEwOTc=
+Z29vZHM6NTQ5L2lkOjEwOTg=
+Z29vZHM6NTQ5L2lkOjEwOTk=
+Z29vZHM6NTUwL2lkOjExMDA=
+Z29vZHM6NTUwL2lkOjExMDE=
+Z29vZHM6NTUxL2lkOjExMDI=
+Z29vZHM6NTUxL2lkOjExMDM=
+Z29vZHM6NTUyL2lkOjExMDQ=
+Z29vZHM6NTUyL2lkOjExMDU=
+Z29vZHM6NTUzL2lkOjExMDY=
+Z29vZHM6NTUzL2lkOjExMDc=
+Z29vZHM6NTU0L2lkOjExMDg=
+Z29vZHM6NTU0L2lkOjExMDk=
+Z29vZHM6NTU1L2lkOjExMTA=
+Z29vZHM6NTU1L2lkOjExMTE=
+Z29vZHM6NTU2L2lkOjExMTI=
+Z29vZHM6NTU2L2lkOjExMTM=
+Z29vZHM6NTU3L2lkOjExMTQ=
+Z29vZHM6NTU3L2lkOjExMTU=
+Z29vZHM6NTU4L2lkOjExMTY=
+Z29vZHM6NTU4L2lkOjExMTc=
+Z29vZHM6NTU5L2lkOjExMTg=
+Z29vZHM6NTU5L2lkOjExMTk=
+Z29vZHM6NTYwL2lkOjExMjA=
+Z29vZHM6NTYwL2lkOjExMjE=
+Z29vZHM6NTYxL2lkOjExMjI=
+Z29vZHM6NTYxL2lkOjExMjM=
+Z29vZHM6NTYyL2lkOjExMjQ=
+Z29vZHM6NTYyL2lkOjExMjU=
+Z29vZHM6NTYzL2lkOjExMjY=
+Z29vZHM6NTYzL2lkOjExMjc=
+Z29vZHM6NTY0L2lkOjExMjg=
+Z29vZHM6NTY0L2lkOjExMjk=
+Z29vZHM6NTY1L2lkOjExMzA=
+Z29vZHM6NTY1L2lkOjExMzE=
+Z29vZHM6NTY2L2lkOjExMzI=
+Z29vZHM6NTY2L2lkOjExMzM=
+Z29vZHM6NTY3L2lkOjExMzQ=
+Z29vZHM6NTY3L2lkOjExMzU=
+Z29vZHM6NTY4L2lkOjExMzY=
+Z29vZHM6NTY4L2lkOjExMzc=
+Z29vZHM6NTY5L2lkOjExMzg=
+Z29vZHM6NTY5L2lkOjExMzk=
+Z29vZHM6NTcwL2lkOjExNDA=
+Z29vZHM6NTcwL2lkOjExNDE=
+Z29vZHM6NTcxL2lkOjExNDI=
+Z29vZHM6NTcxL2lkOjExNDM=
+Z29vZHM6NTcyL2lkOjExNDQ=
+Z29vZHM6NTcyL2lkOjExNDU=
+Z29vZHM6NTczL2lkOjExNDY=
+Z29vZHM6NTczL2lkOjExNDc=
+Z29vZHM6NTc0L2lkOjExNDg=
+Z29vZHM6NTc0L2lkOjExNDk=
+Z29vZHM6NTc1L2lkOjExNTA=
+Z29vZHM6NTc1L2lkOjExNTE=
+Z29vZHM6NTc2L2lkOjExNTI=
+Z29vZHM6NTc2L2lkOjExNTM=
+Z29vZHM6NTc3L2lkOjExNTQ=
+Z29vZHM6NTc3L2lkOjExNTU=
+Z29vZHM6NTc4L2lkOjExNTY=
+Z29vZHM6NTc4L2lkOjExNTc=
+Z29vZHM6NTc5L2lkOjExNTg=
+Z29vZHM6NTc5L2lkOjExNTk=
+Z29vZHM6NTgwL2lkOjExNjA=
+Z29vZHM6NTgwL2lkOjExNjE=
+Z29vZHM6NTgxL2lkOjExNjI=
+Z29vZHM6NTgxL2lkOjExNjM=
+Z29vZHM6NTgyL2lkOjExNjQ=
+Z29vZHM6NTgyL2lkOjExNjU=
+Z29vZHM6NTgzL2lkOjExNjY=
+Z29vZHM6NTgzL2lkOjExNjc=
+Z29vZHM6NTg0L2lkOjExNjg=
+Z29vZHM6NTg0L2lkOjExNjk=
+Z29vZHM6NTg1L2lkOjExNzA=
+Z29vZHM6NTg1L2lkOjExNzE=
+Z29vZHM6NTg2L2lkOjExNzI=
+Z29vZHM6NTg2L2lkOjExNzM=
+Z29vZHM6NTg3L2lkOjExNzQ=
+Z29vZHM6NTg3L2lkOjExNzU=
+Z29vZHM6NTg4L2lkOjExNzY=
+Z29vZHM6NTg4L2lkOjExNzc=
+Z29vZHM6NTg5L2lkOjExNzg=
+Z29vZHM6NTg5L2lkOjExNzk=
+Z29vZHM6NTkwL2lkOjExODA=
+Z29vZHM6NTkwL2lkOjExODE=
+Z29vZHM6NTkxL2lkOjExODI=
+Z29vZHM6NTkxL2lkOjExODM=
+Z29vZHM6NTkyL2lkOjExODQ=
+Z29vZHM6NTkyL2lkOjExODU=
+Z29vZHM6NTkzL2lkOjExODY=
+Z29vZHM6NTkzL2lkOjExODc=
+Z29vZHM6NTk0L2lkOjExODg=
+Z29vZHM6NTk0L2lkOjExODk=
+Z29vZHM6NTk1L2lkOjExOTA=
+Z29vZHM6NTk1L2lkOjExOTE=
+Z29vZHM6NTk2L2lkOjExOTI=
+Z29vZHM6NTk2L2lkOjExOTM=
+Z29vZHM6NTk3L2lkOjExOTQ=
+Z29vZHM6NTk3L2lkOjExOTU=
+Z29vZHM6NTk4L2lkOjExOTY=
+Z29vZHM6NTk4L2lkOjExOTc=
+Z29vZHM6NTk5L2lkOjExOTg=
+Z29vZHM6NTk5L2lkOjExOTk=
diff --git "a/A1014280203/20/\345\277\275\347\225\245" "b/A1014280203/20/\345\277\275\347\225\245"
new file mode 100644
index 00000000..2f4a4259
--- /dev/null
+++ "b/A1014280203/20/\345\277\275\347\225\245"
@@ -0,0 +1 @@
+忽略
\ No newline at end of file
diff --git a/A1014280203/21/21.py b/A1014280203/21/21.py
new file mode 100644
index 00000000..7aa901b4
--- /dev/null
+++ b/A1014280203/21/21.py
@@ -0,0 +1,19 @@
+import os
+import hashlib
+
+
+def encrypt_password(password):
+ salt = os.urandom(8)
+ result = hashlib.sha256(password.encode()+salt).hexdigest()
+ return salt, result
+
+
+def check_password(user, password):
+ salt = user['salt']
+ return hashlib.sha256(password.encode()+salt).hexdigest() == user['password']
+
+user = {'password': '', 'salt': b''}
+raw_password = 'password'
+user['salt'], user['password'] = encrypt_password(raw_password)
+result = check_password(user, raw_password)
+print(result)
diff --git "a/A1014280203/22/\345\267\262\344\277\256\346\224\271\344\270\272\345\217\257\345\244\215\347\224\250\357\274\214\350\247\2015" "b/A1014280203/22/\345\267\262\344\277\256\346\224\271\344\270\272\345\217\257\345\244\215\347\224\250\357\274\214\350\247\2015"
new file mode 100644
index 00000000..f5b042fb
--- /dev/null
+++ "b/A1014280203/22/\345\267\262\344\277\256\346\224\271\344\270\272\345\217\257\345\244\215\347\224\250\357\274\214\350\247\2015"
@@ -0,0 +1 @@
+见第文件5
\ No newline at end of file
diff --git a/A1014280203/23/23.py b/A1014280203/23/23.py
new file mode 100644
index 00000000..ded0bcd1
--- /dev/null
+++ b/A1014280203/23/23.py
@@ -0,0 +1,68 @@
+from flask import Flask, request, render_template, redirect
+from sqlalchemy.orm import sessionmaker
+from sqlalchemy import create_engine
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy import String, DATETIME, Integer, Column
+Base = declarative_base()
+
+app = Flask(__name__)
+app.secret_key = 'key'
+
+
+class Post(Base):
+
+ __tablename__ = 'guestbook'
+
+ postID = Column(Integer, primary_key=True)
+ userName = Column(String(50))
+ createdAt = Column(DATETIME)
+ content = Column(String(1500))
+
+
+class DataBase(object):
+
+ def __init__(self):
+ self.info = {
+ 'user': '',
+ 'passwd': '',
+ 'ip': '',
+ 'port': '',
+ 'database': ''
+ }
+ self.session = self.make_connect()
+
+ def __del__(self):
+ if self.session:
+ self.session.close()
+
+ def make_connect(self):
+ connect_str = 'mysql+pymysql://{user}:{passwd}@{ip}:{port}/{database}'.format_map(self.info)
+ engine = create_engine(connect_str)
+ DBSession = sessionmaker(engine)
+ session = DBSession()
+ return session
+
+ def query_all_post(self):
+ items = self.session.query(Post).order_by(Post.postID).all()
+ if not isinstance(items, list):
+ return [items]
+ return items
+
+ def add_post(self, item):
+ self.session.add(item)
+ self.session.commit()
+
+
+@app.route('/', methods=['GET', 'POST'])
+def main():
+ db = DataBase()
+ if request.method == 'POST':
+ data = request.values
+ db.add_post(Post(userName=data['userName'], content=data['content']))
+ return redirect('/')
+ items = db.query_all_post()
+ return render_template('index.html', nums=len(items), items=items[::-1])
+
+
+if __name__ == '__main__':
+ app.run()
\ No newline at end of file
diff --git a/A1014280203/23/static/main.css b/A1014280203/23/static/main.css
new file mode 100644
index 00000000..2900569b
--- /dev/null
+++ b/A1014280203/23/static/main.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:500px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}.container,.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (max-width:991px){.container{width:750px}}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px \9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#fff;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#fff;background-color:#96cdcd;border-color:transparent}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#fff;background-color:#73bdbd;border-color:rgba(0,0,0,0)}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#fff;background-color:#5bb1b1;border-color:rgba(0,0,0,0)}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#96cdcd;border-color:transparent}.btn-default .badge{color:#96cdcd;background-color:#fff}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:6px 20px;clear:both;font-size:15px;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:500px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;margin-top:10px;border:1px solid transparent}@media (min-width:500px){.navbar{border-radius:4px}}@media (min-width:500px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:500px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:500px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0}@media (min-width:500px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:500px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:500px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:500px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px;margin-left:-5px;cursor:pointer}@media (max-width:499px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:500px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin:8px -15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:499px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:500px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:500px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:500px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#fff;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#000}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#000;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#000}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:#f5fffa}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#000;background-color:transparent;box-shadow:0 -2px 0 #4876ff inset}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:transparent;color:#000}@media (max-width:499px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#000}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:#f5fffa}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#000;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#000}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#000}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff}@media (max-width:499px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-moz-transition:-moz-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.row:after,.row:before{content:" ";display:table}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}#intro{height:300px;background-color:#191919;color:#fff;position:relative;padding-left:50px;padding-right:50px}#intro .intro-message{background-color:rgba(3,3,3,.4);position:absolute;top:0;left:0;right:0;bottom:0;padding:20px 40px}#intro .intro-message strong{font-size:1.5em;text-transform:uppercase}#intro .btn{margin-top:16px}@media (max-width:991px){#intro{background:url(../img/intro-906x600.jpg) center center no-repeat #191919}}@media (min-width:768px){#intro{height:480px}#intro .container{position:relative}#intro .intro-message{right:20%;bottom:auto}#intro .intro-message strong{display:block}}@media (min-width:992px){#intro{height:540px;background:url(../img/intro-1600x1060.jpg) center center no-repeat #191919;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}#intro .intro-message{right:50%}}.index-contents{padding-top:20px;padding-bottom:40px}.index-contents .summary{text-indent:2em}@media (max-width:767px){.index-contents [class^=col]{clear:both;padding-bottom:40px}}.post{font-size:120%;background-color:#FCFCFC}@media (min-width:991px){.post{margin:1cm 0 2cm}}.post .post-header{text-align:center;margin-bottom:15px}.post>from>a,.post>time{float:right;color:#A3A3A3}.post>hr{height:1px;border:none;border-top:1px dashed #555}@media (min-width:768px){.post-list{margin:1cm 0 2cm}}@media (max-width:991px){.post-list{margin:.5cm 0 2cm}}footer{padding-top:24px;padding-bottom:24px;font-size:13px;background-color:lighter(#d1eeee,18%);color:lighter(#d1eeee,18%)}footer a{color:#9d9d9d}footer a:active,footer a:focus,footer a:hover{color:#4876ff}footer h3{font-size:120%;margin-bottom:4px}footer ul{list-style:none;padding:0;margin:0}footer ul>li>ul{padding-left:17px}footer li{padding-top:7px}footer .footer-brand{text-align:center}.about{text-indent:2em}
\ No newline at end of file
diff --git a/A1014280203/23/templates/index.html b/A1014280203/23/templates/index.html
new file mode 100644
index 00000000..1aaf2775
--- /dev/null
+++ b/A1014280203/23/templates/index.html
@@ -0,0 +1,38 @@
+
+
+
+ Guest-Book
+
+
+
+ Guest-Book
+
+
+
+
+
+
+
+
+
+
There are totaly {{ nums }} records!
+
+{% for item in items %}
+
+
+
{{ item.userName }}
+ created at
+
{{ item.createdAt }}
+
{{ item.content }}
+
+
+{% endfor %}
+
+
+
\ No newline at end of file
diff --git a/A1014280203/24/24.py b/A1014280203/24/24.py
new file mode 100644
index 00000000..2b04c088
--- /dev/null
+++ b/A1014280203/24/24.py
@@ -0,0 +1,63 @@
+from flask import Flask, request, render_template, redirect
+from sqlalchemy.orm import sessionmaker
+from sqlalchemy import create_engine
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy import String, DATETIME, Integer, Column
+Base = declarative_base()
+
+app = Flask(__name__)
+app.secret_key = 'key'
+
+
+class Post(Base):
+
+ __tablename__ = 'todo'
+
+ postID = Column(Integer, primary_key=True)
+ postName = Column(String(50))
+ createdAt = Column(DATETIME)
+ content = Column(String(1500))
+
+
+class DataBase(object):
+
+ def __init__(self):
+ self.info = {
+ 'user': '',
+ 'passwd': '',
+ 'ip': '',
+ 'port': '',
+ 'database': ''
+ }
+ self.session = self.make_connect()
+
+ def __del__(self):
+ if self.session:
+ self.session.close()
+
+ def make_connect(self):
+ connect_str = 'mysql+pymysql://{user}:{passwd}@{ip}:{port}/{database}'.format_map(self.info)
+ engine = create_engine(connect_str)
+ DBSession = sessionmaker(engine)
+ session = DBSession()
+ return session
+
+ def query_all_post(self):
+ items = self.session.query(Post).order_by(Post.postID).all()
+ if not isinstance(items, list):
+ return [items]
+ return items
+
+ def add_post(self, item):
+ self.session.add(item)
+ self.session.commit()
+
+
+@app.route('/', methods=['POST', 'GET'])
+def show():
+ pass
+
+
+@app.route('/add', methods=['GET', 'POST'])
+def add():
+ pass
diff --git a/A1014280203/24/static/main.css b/A1014280203/24/static/main.css
new file mode 100644
index 00000000..2900569b
--- /dev/null
+++ b/A1014280203/24/static/main.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:500px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}.container,.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (max-width:991px){.container{width:750px}}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px \9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#fff;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#fff;background-color:#96cdcd;border-color:transparent}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#fff;background-color:#73bdbd;border-color:rgba(0,0,0,0)}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#fff;background-color:#5bb1b1;border-color:rgba(0,0,0,0)}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#96cdcd;border-color:transparent}.btn-default .badge{color:#96cdcd;background-color:#fff}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:6px 20px;clear:both;font-size:15px;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:500px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;margin-top:10px;border:1px solid transparent}@media (min-width:500px){.navbar{border-radius:4px}}@media (min-width:500px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:500px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:500px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0}@media (min-width:500px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:500px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:500px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:500px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px;margin-left:-5px;cursor:pointer}@media (max-width:499px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:500px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin:8px -15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:499px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:500px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:500px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:500px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#fff;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#000}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#000;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#000}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:#f5fffa}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#000;background-color:transparent;box-shadow:0 -2px 0 #4876ff inset}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:transparent;color:#000}@media (max-width:499px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#000}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:#f5fffa}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#000;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#000}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#000}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff}@media (max-width:499px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-moz-transition:-moz-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.row:after,.row:before{content:" ";display:table}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}#intro{height:300px;background-color:#191919;color:#fff;position:relative;padding-left:50px;padding-right:50px}#intro .intro-message{background-color:rgba(3,3,3,.4);position:absolute;top:0;left:0;right:0;bottom:0;padding:20px 40px}#intro .intro-message strong{font-size:1.5em;text-transform:uppercase}#intro .btn{margin-top:16px}@media (max-width:991px){#intro{background:url(../img/intro-906x600.jpg) center center no-repeat #191919}}@media (min-width:768px){#intro{height:480px}#intro .container{position:relative}#intro .intro-message{right:20%;bottom:auto}#intro .intro-message strong{display:block}}@media (min-width:992px){#intro{height:540px;background:url(../img/intro-1600x1060.jpg) center center no-repeat #191919;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}#intro .intro-message{right:50%}}.index-contents{padding-top:20px;padding-bottom:40px}.index-contents .summary{text-indent:2em}@media (max-width:767px){.index-contents [class^=col]{clear:both;padding-bottom:40px}}.post{font-size:120%;background-color:#FCFCFC}@media (min-width:991px){.post{margin:1cm 0 2cm}}.post .post-header{text-align:center;margin-bottom:15px}.post>from>a,.post>time{float:right;color:#A3A3A3}.post>hr{height:1px;border:none;border-top:1px dashed #555}@media (min-width:768px){.post-list{margin:1cm 0 2cm}}@media (max-width:991px){.post-list{margin:.5cm 0 2cm}}footer{padding-top:24px;padding-bottom:24px;font-size:13px;background-color:lighter(#d1eeee,18%);color:lighter(#d1eeee,18%)}footer a{color:#9d9d9d}footer a:active,footer a:focus,footer a:hover{color:#4876ff}footer h3{font-size:120%;margin-bottom:4px}footer ul{list-style:none;padding:0;margin:0}footer ul>li>ul{padding-left:17px}footer li{padding-top:7px}footer .footer-brand{text-align:center}.about{text-indent:2em}
\ No newline at end of file
diff --git a/A1014280203/24/templates/index.html b/A1014280203/24/templates/index.html
new file mode 100644
index 00000000..625d8b1b
--- /dev/null
+++ b/A1014280203/24/templates/index.html
@@ -0,0 +1,38 @@
+
+
+
+
Todo-List
+
+
+
+
Add New Item
+
+
+
+
+ Write Down Here!
+
+
+
+
+
+
+
+
+
+
+
There are totaly {{ nums }} items to do!
+
+{% for item in items %}
+
+
+
{{ item.postName }}
+ created at
+
{{ item.createdAt }}
+
{{ item.content }}
+
+
+{% endfor %}
+
+
+
\ No newline at end of file
diff --git a/A1014280203/25/25.py b/A1014280203/25/25.py
new file mode 100644
index 00000000..f79e9b21
--- /dev/null
+++ b/A1014280203/25/25.py
@@ -0,0 +1,95 @@
+# make with baudi SDK
+import requests
+import pyaudio
+import wave
+import base64
+import json
+import win32api
+
+CHUNK = 1024
+FORMAT = pyaudio.paInt16
+CHANNELS = 1
+RATE = 8000
+RECORD_SECONDS = 3
+WAVE_OUTPUT_FILENAME = "out.wav"
+
+
+def make_audio():
+ p = pyaudio.PyAudio()
+ stream = p.open(format=FORMAT,
+ channels=CHANNELS,
+ rate=RATE,
+ input=True,
+ frames_per_buffer=CHUNK)
+ print('*recording')
+ frames = []
+ for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
+ data = stream.read(CHUNK)
+ frames.append(data)
+ print('*done recording')
+ stream.stop_stream()
+ stream.close()
+ wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
+ wf.setnchannels(CHANNELS)
+ wf.setsampwidth(p.get_sample_size(FORMAT))
+ wf.setframerate(RATE)
+ wf.writeframes(b''.join(frames))
+ wf.close()
+
+
+CC_URL = "https://openapi.baidu.com/oauth/2.0/token?" \
+ "grant_type=client_credentials&" \
+ "client_id=&" \
+ "client_secret=&"
+
+TOKEN = ""
+API = 'http://vop.baidu.com/server_api'
+
+
+def get_token():
+ resp = requests.post(CC_URL)
+ print(resp.json())
+
+
+def speech_to_text():
+ with open(WAVE_OUTPUT_FILENAME, 'rb') as file:
+ data = file.read()
+ params = {
+ "format": 'wav',
+ "rate": RATE,
+ "channel": CHANNELS,
+ "token": TOKEN,
+ "cuid": "",
+ "len": len(data),
+ "speech": base64.b64encode(data).decode(),
+ }
+
+ headers = {
+ 'Content-Type': 'application/json;',
+ }
+ resp = requests.post(url=API, data=json.dumps(params), headers=headers)
+ # print(resp.json())
+ return resp.json()['result']
+
+
+def make_action(texts):
+ maps = {
+ '百度': 'http://www.baidu.com',
+ '网易': 'http://www.163.com'
+ }
+ target = ''
+ for text in texts:
+ if text.find('百度') != -1:
+ target = '百度'
+ elif text.find('网易') != -1:
+ target = '网易'
+ if target:
+ win32api.ShellExecute(0, 'open', maps[target], '', '', 1)
+ else:
+ print('Match failed:', texts)
+
+
+if __name__ == '__main__':
+ make_audio()
+ texts = speech_to_text()
+ make_action(texts)
\ No newline at end of file
diff --git a/A1014280203/25/out.wav b/A1014280203/25/out.wav
new file mode 100644
index 00000000..04d3773a
Binary files /dev/null and b/A1014280203/25/out.wav differ
diff --git a/A1014280203/3/3.py b/A1014280203/3/3.py
new file mode 100644
index 00000000..5b44d4bc
--- /dev/null
+++ b/A1014280203/3/3.py
@@ -0,0 +1,23 @@
+import redis
+import base64
+import re
+
+
+def make_connect():
+ r = redis.Redis(host='', port=)
+ return r
+
+
+def parse_coupon(c_code):
+ return base64.urlsafe_b64decode(c_code.encode('utf-8'))
+
+
+def upload_to_database():
+ session = make_connect()
+ with open('coupon.txt', 'r') as file:
+ for line in file.readlines():
+ c_id = re.findall(r'.*/.*:(.*)\'', str(parse_coupon(line)))
+ session.set(c_id.pop(), line.strip())
+
+if __name__ == '__main__':
+ upload_to_database()
diff --git a/A1014280203/3/coupon.txt b/A1014280203/3/coupon.txt
new file mode 100644
index 00000000..381860ab
--- /dev/null
+++ b/A1014280203/3/coupon.txt
@@ -0,0 +1,400 @@
+Z29vZHM6NTAwL2lkOjEwMDA=
+Z29vZHM6NTAwL2lkOjEwMDE=
+Z29vZHM6NTAxL2lkOjEwMDI=
+Z29vZHM6NTAxL2lkOjEwMDM=
+Z29vZHM6NTAyL2lkOjEwMDQ=
+Z29vZHM6NTAyL2lkOjEwMDU=
+Z29vZHM6NTAzL2lkOjEwMDY=
+Z29vZHM6NTAzL2lkOjEwMDc=
+Z29vZHM6NTA0L2lkOjEwMDg=
+Z29vZHM6NTA0L2lkOjEwMDk=
+Z29vZHM6NTA1L2lkOjEwMTA=
+Z29vZHM6NTA1L2lkOjEwMTE=
+Z29vZHM6NTA2L2lkOjEwMTI=
+Z29vZHM6NTA2L2lkOjEwMTM=
+Z29vZHM6NTA3L2lkOjEwMTQ=
+Z29vZHM6NTA3L2lkOjEwMTU=
+Z29vZHM6NTA4L2lkOjEwMTY=
+Z29vZHM6NTA4L2lkOjEwMTc=
+Z29vZHM6NTA5L2lkOjEwMTg=
+Z29vZHM6NTA5L2lkOjEwMTk=
+Z29vZHM6NTEwL2lkOjEwMjA=
+Z29vZHM6NTEwL2lkOjEwMjE=
+Z29vZHM6NTExL2lkOjEwMjI=
+Z29vZHM6NTExL2lkOjEwMjM=
+Z29vZHM6NTEyL2lkOjEwMjQ=
+Z29vZHM6NTEyL2lkOjEwMjU=
+Z29vZHM6NTEzL2lkOjEwMjY=
+Z29vZHM6NTEzL2lkOjEwMjc=
+Z29vZHM6NTE0L2lkOjEwMjg=
+Z29vZHM6NTE0L2lkOjEwMjk=
+Z29vZHM6NTE1L2lkOjEwMzA=
+Z29vZHM6NTE1L2lkOjEwMzE=
+Z29vZHM6NTE2L2lkOjEwMzI=
+Z29vZHM6NTE2L2lkOjEwMzM=
+Z29vZHM6NTE3L2lkOjEwMzQ=
+Z29vZHM6NTE3L2lkOjEwMzU=
+Z29vZHM6NTE4L2lkOjEwMzY=
+Z29vZHM6NTE4L2lkOjEwMzc=
+Z29vZHM6NTE5L2lkOjEwMzg=
+Z29vZHM6NTE5L2lkOjEwMzk=
+Z29vZHM6NTIwL2lkOjEwNDA=
+Z29vZHM6NTIwL2lkOjEwNDE=
+Z29vZHM6NTIxL2lkOjEwNDI=
+Z29vZHM6NTIxL2lkOjEwNDM=
+Z29vZHM6NTIyL2lkOjEwNDQ=
+Z29vZHM6NTIyL2lkOjEwNDU=
+Z29vZHM6NTIzL2lkOjEwNDY=
+Z29vZHM6NTIzL2lkOjEwNDc=
+Z29vZHM6NTI0L2lkOjEwNDg=
+Z29vZHM6NTI0L2lkOjEwNDk=
+Z29vZHM6NTI1L2lkOjEwNTA=
+Z29vZHM6NTI1L2lkOjEwNTE=
+Z29vZHM6NTI2L2lkOjEwNTI=
+Z29vZHM6NTI2L2lkOjEwNTM=
+Z29vZHM6NTI3L2lkOjEwNTQ=
+Z29vZHM6NTI3L2lkOjEwNTU=
+Z29vZHM6NTI4L2lkOjEwNTY=
+Z29vZHM6NTI4L2lkOjEwNTc=
+Z29vZHM6NTI5L2lkOjEwNTg=
+Z29vZHM6NTI5L2lkOjEwNTk=
+Z29vZHM6NTMwL2lkOjEwNjA=
+Z29vZHM6NTMwL2lkOjEwNjE=
+Z29vZHM6NTMxL2lkOjEwNjI=
+Z29vZHM6NTMxL2lkOjEwNjM=
+Z29vZHM6NTMyL2lkOjEwNjQ=
+Z29vZHM6NTMyL2lkOjEwNjU=
+Z29vZHM6NTMzL2lkOjEwNjY=
+Z29vZHM6NTMzL2lkOjEwNjc=
+Z29vZHM6NTM0L2lkOjEwNjg=
+Z29vZHM6NTM0L2lkOjEwNjk=
+Z29vZHM6NTM1L2lkOjEwNzA=
+Z29vZHM6NTM1L2lkOjEwNzE=
+Z29vZHM6NTM2L2lkOjEwNzI=
+Z29vZHM6NTM2L2lkOjEwNzM=
+Z29vZHM6NTM3L2lkOjEwNzQ=
+Z29vZHM6NTM3L2lkOjEwNzU=
+Z29vZHM6NTM4L2lkOjEwNzY=
+Z29vZHM6NTM4L2lkOjEwNzc=
+Z29vZHM6NTM5L2lkOjEwNzg=
+Z29vZHM6NTM5L2lkOjEwNzk=
+Z29vZHM6NTQwL2lkOjEwODA=
+Z29vZHM6NTQwL2lkOjEwODE=
+Z29vZHM6NTQxL2lkOjEwODI=
+Z29vZHM6NTQxL2lkOjEwODM=
+Z29vZHM6NTQyL2lkOjEwODQ=
+Z29vZHM6NTQyL2lkOjEwODU=
+Z29vZHM6NTQzL2lkOjEwODY=
+Z29vZHM6NTQzL2lkOjEwODc=
+Z29vZHM6NTQ0L2lkOjEwODg=
+Z29vZHM6NTQ0L2lkOjEwODk=
+Z29vZHM6NTQ1L2lkOjEwOTA=
+Z29vZHM6NTQ1L2lkOjEwOTE=
+Z29vZHM6NTQ2L2lkOjEwOTI=
+Z29vZHM6NTQ2L2lkOjEwOTM=
+Z29vZHM6NTQ3L2lkOjEwOTQ=
+Z29vZHM6NTQ3L2lkOjEwOTU=
+Z29vZHM6NTQ4L2lkOjEwOTY=
+Z29vZHM6NTQ4L2lkOjEwOTc=
+Z29vZHM6NTQ5L2lkOjEwOTg=
+Z29vZHM6NTQ5L2lkOjEwOTk=
+Z29vZHM6NTUwL2lkOjExMDA=
+Z29vZHM6NTUwL2lkOjExMDE=
+Z29vZHM6NTUxL2lkOjExMDI=
+Z29vZHM6NTUxL2lkOjExMDM=
+Z29vZHM6NTUyL2lkOjExMDQ=
+Z29vZHM6NTUyL2lkOjExMDU=
+Z29vZHM6NTUzL2lkOjExMDY=
+Z29vZHM6NTUzL2lkOjExMDc=
+Z29vZHM6NTU0L2lkOjExMDg=
+Z29vZHM6NTU0L2lkOjExMDk=
+Z29vZHM6NTU1L2lkOjExMTA=
+Z29vZHM6NTU1L2lkOjExMTE=
+Z29vZHM6NTU2L2lkOjExMTI=
+Z29vZHM6NTU2L2lkOjExMTM=
+Z29vZHM6NTU3L2lkOjExMTQ=
+Z29vZHM6NTU3L2lkOjExMTU=
+Z29vZHM6NTU4L2lkOjExMTY=
+Z29vZHM6NTU4L2lkOjExMTc=
+Z29vZHM6NTU5L2lkOjExMTg=
+Z29vZHM6NTU5L2lkOjExMTk=
+Z29vZHM6NTYwL2lkOjExMjA=
+Z29vZHM6NTYwL2lkOjExMjE=
+Z29vZHM6NTYxL2lkOjExMjI=
+Z29vZHM6NTYxL2lkOjExMjM=
+Z29vZHM6NTYyL2lkOjExMjQ=
+Z29vZHM6NTYyL2lkOjExMjU=
+Z29vZHM6NTYzL2lkOjExMjY=
+Z29vZHM6NTYzL2lkOjExMjc=
+Z29vZHM6NTY0L2lkOjExMjg=
+Z29vZHM6NTY0L2lkOjExMjk=
+Z29vZHM6NTY1L2lkOjExMzA=
+Z29vZHM6NTY1L2lkOjExMzE=
+Z29vZHM6NTY2L2lkOjExMzI=
+Z29vZHM6NTY2L2lkOjExMzM=
+Z29vZHM6NTY3L2lkOjExMzQ=
+Z29vZHM6NTY3L2lkOjExMzU=
+Z29vZHM6NTY4L2lkOjExMzY=
+Z29vZHM6NTY4L2lkOjExMzc=
+Z29vZHM6NTY5L2lkOjExMzg=
+Z29vZHM6NTY5L2lkOjExMzk=
+Z29vZHM6NTcwL2lkOjExNDA=
+Z29vZHM6NTcwL2lkOjExNDE=
+Z29vZHM6NTcxL2lkOjExNDI=
+Z29vZHM6NTcxL2lkOjExNDM=
+Z29vZHM6NTcyL2lkOjExNDQ=
+Z29vZHM6NTcyL2lkOjExNDU=
+Z29vZHM6NTczL2lkOjExNDY=
+Z29vZHM6NTczL2lkOjExNDc=
+Z29vZHM6NTc0L2lkOjExNDg=
+Z29vZHM6NTc0L2lkOjExNDk=
+Z29vZHM6NTc1L2lkOjExNTA=
+Z29vZHM6NTc1L2lkOjExNTE=
+Z29vZHM6NTc2L2lkOjExNTI=
+Z29vZHM6NTc2L2lkOjExNTM=
+Z29vZHM6NTc3L2lkOjExNTQ=
+Z29vZHM6NTc3L2lkOjExNTU=
+Z29vZHM6NTc4L2lkOjExNTY=
+Z29vZHM6NTc4L2lkOjExNTc=
+Z29vZHM6NTc5L2lkOjExNTg=
+Z29vZHM6NTc5L2lkOjExNTk=
+Z29vZHM6NTgwL2lkOjExNjA=
+Z29vZHM6NTgwL2lkOjExNjE=
+Z29vZHM6NTgxL2lkOjExNjI=
+Z29vZHM6NTgxL2lkOjExNjM=
+Z29vZHM6NTgyL2lkOjExNjQ=
+Z29vZHM6NTgyL2lkOjExNjU=
+Z29vZHM6NTgzL2lkOjExNjY=
+Z29vZHM6NTgzL2lkOjExNjc=
+Z29vZHM6NTg0L2lkOjExNjg=
+Z29vZHM6NTg0L2lkOjExNjk=
+Z29vZHM6NTg1L2lkOjExNzA=
+Z29vZHM6NTg1L2lkOjExNzE=
+Z29vZHM6NTg2L2lkOjExNzI=
+Z29vZHM6NTg2L2lkOjExNzM=
+Z29vZHM6NTg3L2lkOjExNzQ=
+Z29vZHM6NTg3L2lkOjExNzU=
+Z29vZHM6NTg4L2lkOjExNzY=
+Z29vZHM6NTg4L2lkOjExNzc=
+Z29vZHM6NTg5L2lkOjExNzg=
+Z29vZHM6NTg5L2lkOjExNzk=
+Z29vZHM6NTkwL2lkOjExODA=
+Z29vZHM6NTkwL2lkOjExODE=
+Z29vZHM6NTkxL2lkOjExODI=
+Z29vZHM6NTkxL2lkOjExODM=
+Z29vZHM6NTkyL2lkOjExODQ=
+Z29vZHM6NTkyL2lkOjExODU=
+Z29vZHM6NTkzL2lkOjExODY=
+Z29vZHM6NTkzL2lkOjExODc=
+Z29vZHM6NTk0L2lkOjExODg=
+Z29vZHM6NTk0L2lkOjExODk=
+Z29vZHM6NTk1L2lkOjExOTA=
+Z29vZHM6NTk1L2lkOjExOTE=
+Z29vZHM6NTk2L2lkOjExOTI=
+Z29vZHM6NTk2L2lkOjExOTM=
+Z29vZHM6NTk3L2lkOjExOTQ=
+Z29vZHM6NTk3L2lkOjExOTU=
+Z29vZHM6NTk4L2lkOjExOTY=
+Z29vZHM6NTk4L2lkOjExOTc=
+Z29vZHM6NTk5L2lkOjExOTg=
+Z29vZHM6NTk5L2lkOjExOTk=
+Z29vZHM6NTAwL2lkOjEwMDA=
+Z29vZHM6NTAwL2lkOjEwMDE=
+Z29vZHM6NTAxL2lkOjEwMDI=
+Z29vZHM6NTAxL2lkOjEwMDM=
+Z29vZHM6NTAyL2lkOjEwMDQ=
+Z29vZHM6NTAyL2lkOjEwMDU=
+Z29vZHM6NTAzL2lkOjEwMDY=
+Z29vZHM6NTAzL2lkOjEwMDc=
+Z29vZHM6NTA0L2lkOjEwMDg=
+Z29vZHM6NTA0L2lkOjEwMDk=
+Z29vZHM6NTA1L2lkOjEwMTA=
+Z29vZHM6NTA1L2lkOjEwMTE=
+Z29vZHM6NTA2L2lkOjEwMTI=
+Z29vZHM6NTA2L2lkOjEwMTM=
+Z29vZHM6NTA3L2lkOjEwMTQ=
+Z29vZHM6NTA3L2lkOjEwMTU=
+Z29vZHM6NTA4L2lkOjEwMTY=
+Z29vZHM6NTA4L2lkOjEwMTc=
+Z29vZHM6NTA5L2lkOjEwMTg=
+Z29vZHM6NTA5L2lkOjEwMTk=
+Z29vZHM6NTEwL2lkOjEwMjA=
+Z29vZHM6NTEwL2lkOjEwMjE=
+Z29vZHM6NTExL2lkOjEwMjI=
+Z29vZHM6NTExL2lkOjEwMjM=
+Z29vZHM6NTEyL2lkOjEwMjQ=
+Z29vZHM6NTEyL2lkOjEwMjU=
+Z29vZHM6NTEzL2lkOjEwMjY=
+Z29vZHM6NTEzL2lkOjEwMjc=
+Z29vZHM6NTE0L2lkOjEwMjg=
+Z29vZHM6NTE0L2lkOjEwMjk=
+Z29vZHM6NTE1L2lkOjEwMzA=
+Z29vZHM6NTE1L2lkOjEwMzE=
+Z29vZHM6NTE2L2lkOjEwMzI=
+Z29vZHM6NTE2L2lkOjEwMzM=
+Z29vZHM6NTE3L2lkOjEwMzQ=
+Z29vZHM6NTE3L2lkOjEwMzU=
+Z29vZHM6NTE4L2lkOjEwMzY=
+Z29vZHM6NTE4L2lkOjEwMzc=
+Z29vZHM6NTE5L2lkOjEwMzg=
+Z29vZHM6NTE5L2lkOjEwMzk=
+Z29vZHM6NTIwL2lkOjEwNDA=
+Z29vZHM6NTIwL2lkOjEwNDE=
+Z29vZHM6NTIxL2lkOjEwNDI=
+Z29vZHM6NTIxL2lkOjEwNDM=
+Z29vZHM6NTIyL2lkOjEwNDQ=
+Z29vZHM6NTIyL2lkOjEwNDU=
+Z29vZHM6NTIzL2lkOjEwNDY=
+Z29vZHM6NTIzL2lkOjEwNDc=
+Z29vZHM6NTI0L2lkOjEwNDg=
+Z29vZHM6NTI0L2lkOjEwNDk=
+Z29vZHM6NTI1L2lkOjEwNTA=
+Z29vZHM6NTI1L2lkOjEwNTE=
+Z29vZHM6NTI2L2lkOjEwNTI=
+Z29vZHM6NTI2L2lkOjEwNTM=
+Z29vZHM6NTI3L2lkOjEwNTQ=
+Z29vZHM6NTI3L2lkOjEwNTU=
+Z29vZHM6NTI4L2lkOjEwNTY=
+Z29vZHM6NTI4L2lkOjEwNTc=
+Z29vZHM6NTI5L2lkOjEwNTg=
+Z29vZHM6NTI5L2lkOjEwNTk=
+Z29vZHM6NTMwL2lkOjEwNjA=
+Z29vZHM6NTMwL2lkOjEwNjE=
+Z29vZHM6NTMxL2lkOjEwNjI=
+Z29vZHM6NTMxL2lkOjEwNjM=
+Z29vZHM6NTMyL2lkOjEwNjQ=
+Z29vZHM6NTMyL2lkOjEwNjU=
+Z29vZHM6NTMzL2lkOjEwNjY=
+Z29vZHM6NTMzL2lkOjEwNjc=
+Z29vZHM6NTM0L2lkOjEwNjg=
+Z29vZHM6NTM0L2lkOjEwNjk=
+Z29vZHM6NTM1L2lkOjEwNzA=
+Z29vZHM6NTM1L2lkOjEwNzE=
+Z29vZHM6NTM2L2lkOjEwNzI=
+Z29vZHM6NTM2L2lkOjEwNzM=
+Z29vZHM6NTM3L2lkOjEwNzQ=
+Z29vZHM6NTM3L2lkOjEwNzU=
+Z29vZHM6NTM4L2lkOjEwNzY=
+Z29vZHM6NTM4L2lkOjEwNzc=
+Z29vZHM6NTM5L2lkOjEwNzg=
+Z29vZHM6NTM5L2lkOjEwNzk=
+Z29vZHM6NTQwL2lkOjEwODA=
+Z29vZHM6NTQwL2lkOjEwODE=
+Z29vZHM6NTQxL2lkOjEwODI=
+Z29vZHM6NTQxL2lkOjEwODM=
+Z29vZHM6NTQyL2lkOjEwODQ=
+Z29vZHM6NTQyL2lkOjEwODU=
+Z29vZHM6NTQzL2lkOjEwODY=
+Z29vZHM6NTQzL2lkOjEwODc=
+Z29vZHM6NTQ0L2lkOjEwODg=
+Z29vZHM6NTQ0L2lkOjEwODk=
+Z29vZHM6NTQ1L2lkOjEwOTA=
+Z29vZHM6NTQ1L2lkOjEwOTE=
+Z29vZHM6NTQ2L2lkOjEwOTI=
+Z29vZHM6NTQ2L2lkOjEwOTM=
+Z29vZHM6NTQ3L2lkOjEwOTQ=
+Z29vZHM6NTQ3L2lkOjEwOTU=
+Z29vZHM6NTQ4L2lkOjEwOTY=
+Z29vZHM6NTQ4L2lkOjEwOTc=
+Z29vZHM6NTQ5L2lkOjEwOTg=
+Z29vZHM6NTQ5L2lkOjEwOTk=
+Z29vZHM6NTUwL2lkOjExMDA=
+Z29vZHM6NTUwL2lkOjExMDE=
+Z29vZHM6NTUxL2lkOjExMDI=
+Z29vZHM6NTUxL2lkOjExMDM=
+Z29vZHM6NTUyL2lkOjExMDQ=
+Z29vZHM6NTUyL2lkOjExMDU=
+Z29vZHM6NTUzL2lkOjExMDY=
+Z29vZHM6NTUzL2lkOjExMDc=
+Z29vZHM6NTU0L2lkOjExMDg=
+Z29vZHM6NTU0L2lkOjExMDk=
+Z29vZHM6NTU1L2lkOjExMTA=
+Z29vZHM6NTU1L2lkOjExMTE=
+Z29vZHM6NTU2L2lkOjExMTI=
+Z29vZHM6NTU2L2lkOjExMTM=
+Z29vZHM6NTU3L2lkOjExMTQ=
+Z29vZHM6NTU3L2lkOjExMTU=
+Z29vZHM6NTU4L2lkOjExMTY=
+Z29vZHM6NTU4L2lkOjExMTc=
+Z29vZHM6NTU5L2lkOjExMTg=
+Z29vZHM6NTU5L2lkOjExMTk=
+Z29vZHM6NTYwL2lkOjExMjA=
+Z29vZHM6NTYwL2lkOjExMjE=
+Z29vZHM6NTYxL2lkOjExMjI=
+Z29vZHM6NTYxL2lkOjExMjM=
+Z29vZHM6NTYyL2lkOjExMjQ=
+Z29vZHM6NTYyL2lkOjExMjU=
+Z29vZHM6NTYzL2lkOjExMjY=
+Z29vZHM6NTYzL2lkOjExMjc=
+Z29vZHM6NTY0L2lkOjExMjg=
+Z29vZHM6NTY0L2lkOjExMjk=
+Z29vZHM6NTY1L2lkOjExMzA=
+Z29vZHM6NTY1L2lkOjExMzE=
+Z29vZHM6NTY2L2lkOjExMzI=
+Z29vZHM6NTY2L2lkOjExMzM=
+Z29vZHM6NTY3L2lkOjExMzQ=
+Z29vZHM6NTY3L2lkOjExMzU=
+Z29vZHM6NTY4L2lkOjExMzY=
+Z29vZHM6NTY4L2lkOjExMzc=
+Z29vZHM6NTY5L2lkOjExMzg=
+Z29vZHM6NTY5L2lkOjExMzk=
+Z29vZHM6NTcwL2lkOjExNDA=
+Z29vZHM6NTcwL2lkOjExNDE=
+Z29vZHM6NTcxL2lkOjExNDI=
+Z29vZHM6NTcxL2lkOjExNDM=
+Z29vZHM6NTcyL2lkOjExNDQ=
+Z29vZHM6NTcyL2lkOjExNDU=
+Z29vZHM6NTczL2lkOjExNDY=
+Z29vZHM6NTczL2lkOjExNDc=
+Z29vZHM6NTc0L2lkOjExNDg=
+Z29vZHM6NTc0L2lkOjExNDk=
+Z29vZHM6NTc1L2lkOjExNTA=
+Z29vZHM6NTc1L2lkOjExNTE=
+Z29vZHM6NTc2L2lkOjExNTI=
+Z29vZHM6NTc2L2lkOjExNTM=
+Z29vZHM6NTc3L2lkOjExNTQ=
+Z29vZHM6NTc3L2lkOjExNTU=
+Z29vZHM6NTc4L2lkOjExNTY=
+Z29vZHM6NTc4L2lkOjExNTc=
+Z29vZHM6NTc5L2lkOjExNTg=
+Z29vZHM6NTc5L2lkOjExNTk=
+Z29vZHM6NTgwL2lkOjExNjA=
+Z29vZHM6NTgwL2lkOjExNjE=
+Z29vZHM6NTgxL2lkOjExNjI=
+Z29vZHM6NTgxL2lkOjExNjM=
+Z29vZHM6NTgyL2lkOjExNjQ=
+Z29vZHM6NTgyL2lkOjExNjU=
+Z29vZHM6NTgzL2lkOjExNjY=
+Z29vZHM6NTgzL2lkOjExNjc=
+Z29vZHM6NTg0L2lkOjExNjg=
+Z29vZHM6NTg0L2lkOjExNjk=
+Z29vZHM6NTg1L2lkOjExNzA=
+Z29vZHM6NTg1L2lkOjExNzE=
+Z29vZHM6NTg2L2lkOjExNzI=
+Z29vZHM6NTg2L2lkOjExNzM=
+Z29vZHM6NTg3L2lkOjExNzQ=
+Z29vZHM6NTg3L2lkOjExNzU=
+Z29vZHM6NTg4L2lkOjExNzY=
+Z29vZHM6NTg4L2lkOjExNzc=
+Z29vZHM6NTg5L2lkOjExNzg=
+Z29vZHM6NTg5L2lkOjExNzk=
+Z29vZHM6NTkwL2lkOjExODA=
+Z29vZHM6NTkwL2lkOjExODE=
+Z29vZHM6NTkxL2lkOjExODI=
+Z29vZHM6NTkxL2lkOjExODM=
+Z29vZHM6NTkyL2lkOjExODQ=
+Z29vZHM6NTkyL2lkOjExODU=
+Z29vZHM6NTkzL2lkOjExODY=
+Z29vZHM6NTkzL2lkOjExODc=
+Z29vZHM6NTk0L2lkOjExODg=
+Z29vZHM6NTk0L2lkOjExODk=
+Z29vZHM6NTk1L2lkOjExOTA=
+Z29vZHM6NTk1L2lkOjExOTE=
+Z29vZHM6NTk2L2lkOjExOTI=
+Z29vZHM6NTk2L2lkOjExOTM=
+Z29vZHM6NTk3L2lkOjExOTQ=
+Z29vZHM6NTk3L2lkOjExOTU=
+Z29vZHM6NTk4L2lkOjExOTY=
+Z29vZHM6NTk4L2lkOjExOTc=
+Z29vZHM6NTk5L2lkOjExOTg=
+Z29vZHM6NTk5L2lkOjExOTk=
diff --git a/A1014280203/4/4.py b/A1014280203/4/4.py
new file mode 100644
index 00000000..1c44ca6a
--- /dev/null
+++ b/A1014280203/4/4.py
@@ -0,0 +1,57 @@
+import string
+
+
+# simply extend word like: it's => it is
+def extend_word(text):
+ if text.find('\'') > 0:
+ old2new = dict()
+ words = text.split()
+ for word in words:
+ if word.find('\'') > 0:
+ parts = word.split('\'')
+ if parts[1] == 'm':
+ parts[1] = 'am'
+ elif parts[1] == 's':
+ parts[1] = 'is'
+ elif parts[1] == 're':
+ parts[1] = 'are'
+ elif parts[1] == 't':
+ parts[1] = 'not'
+ elif parts[1] == 've':
+ parts[1] = 'have'
+ elif parts[1] == 'll':
+ parts[1] = 'will'
+ elif parts[1] == 'd':
+ if words[words.index(word) + 1] == 'better':
+ parts[1] = 'had'
+ else:
+ parts[1] = 'would'
+ if parts[0].endswith('n'):
+ parts[0] = parts[0][:-1]
+ old2new[word] = ' '.join(parts)
+ _text = text
+ for old_word in old2new.keys():
+ _text = _text.replace(old_word, old2new[old_word])
+ return _text
+
+
+def return_order_key(record):
+ return record[1]
+
+
+def show_in_order(records):
+ items = sorted(records.items(), key=return_order_key, reverse=True)
+ for item in items:
+ print(item[0], item[1])
+
+with open('subtitle.txt', 'r') as file:
+ article = file.read()
+ no_pun_text = article
+ _punctuation = string.punctuation.replace('\'', '')
+ for pun in _punctuation:
+ no_pun_text = no_pun_text.replace(pun, '')
+ complete_text = extend_word(no_pun_text)
+ records = dict()
+ for word in complete_text.lower().split():
+ records[word] = records.get(word, 0) + 1
+ show_in_order(records)
diff --git a/A1014280203/4/subtitle.txt b/A1014280203/4/subtitle.txt
new file mode 100644
index 00000000..3e648700
--- /dev/null
+++ b/A1014280203/4/subtitle.txt
@@ -0,0 +1,62 @@
+Make sure you know what
+you're supposed to be doing. Okay, that sounds obvious and easy, right? This is not always true. If you are new to your job, you might not
+have a feel for your responsibilities. If you have not done a certain
+type of work before, you might not know how long
+something is going to take. That's completely normal. So how do you know? Ask. Review your job responsibilities,
+ask someone who is in the same roll or who has previously done this job, keep good
+notes, keep track of how long something takes you so that you have a solid
+estimate and you can use that next time. Remember, it also helps to take big
+tasks and break them into smaller steps. Remember that research Sam was
+starting for the sales reports? He might take that research and divide it
+into steps, that way he can keep track of each step and he'll know what is
+involved in completing that research. How do you know what your priorities are? Depending on the type of work you do,
+your priorities come to you from your leadership or perhaps from a customer
+who is, you're supporting. It's important to really understand
+the priorities you're expected to support. So in your sample work plan, you're going
+to have something, perhaps the priority, the description of what you're doing,
+the due date, who you're doing it for, the steps, an estimate of how long
+it's going to take, and a start date. And those are some good fields for
+you to start out with. And you can create a table,
+a spread sheet, and begin to work with this and see if this
+helps you in completing your work. You might not really know how
+long something is going to take. That's okay. So how do you know? Ask. Review your job responsibilities
+with your supervisor, ask someone who's in the same role,
+or who has previously done the job. Keep good notes when you do something,
+keep notes, keep track of how long it takes you, and then you have something to refer back
+to for a good estimate next time. Remember, it also helps to take big
+tasks and break them into smaller steps. Remember when Sam was
+working on that research, he started that research
+with those sales reports? He might take that research and
+divide it into steps, and that way he can keep track of
+how long each step will take, and he's gonna know what is involved
+in completing that research. How do you know what your priorities are? Well, depending on the type of work you
+do, sometimes your priorities are gonna come to you from your leadership or
+from a customer you support. It's important to really understand the
+priorities you are expected to support. In our example with Sam,
+it became more important for him to complete his status report
+first and then his other report later. What if your boss can not or
+will not tell you? You know sometimes the person you work for
+wants to see you figure it out for yourself. Sometimes the person you work for doesn't
+really know what the true priorities are. And if this is true, you're gonna
+have to figure it out for yourself. Pay attention to what is discussed the
+most in meetings and in announcements and in other communications. Pay attention to where your successful
+colleagues are spending their time. There are clues around you waiting for
+you to uncover them. Before you go,
+I would like to share with you a story. I once had a co-worker who had
+an important meeting after lunch and the meeting was with an executive. She was gonna facilitate the meeting and
+give a presentation. During lunch, she remembered that she forgotten
+to pick something up at the store. The item she forgot was something
+her family needed that evening. Immediately, she ran out of the office to
+the store and purchased the missing item. In doing so,
+she was late to her own meeting and to make matters worse,
+she explained why she was late. Her manager looked at her and said, if I had known you were gonna go do
+that, I would've gone to the store for you so you could have been here
+on time and been prepared. That's what we call
+a career limiting moment. It was all because she forgot her plan,
+she forgot her priorities, and she forgot the difference between something
+that was urgent versus important. It may have been important that she bring
+home that item that evening to her family, but it wasn't urgent. She could've picked it up
+on the way home from work. What was both urgent and important
+was being prepared for that meeting. Now, before we move to the next module,
+why don't you consider taking a shot at creating your own plan that covers
+at least the next five business days.
\ No newline at end of file
diff --git a/A1014280203/5/143093073884786_0.jpg b/A1014280203/5/143093073884786_0.jpg
new file mode 100644
index 00000000..9650e9e7
Binary files /dev/null and b/A1014280203/5/143093073884786_0.jpg differ
diff --git a/A1014280203/5/1F524114F4-4.jpg b/A1014280203/5/1F524114F4-4.jpg
new file mode 100644
index 00000000..85d9e953
Binary files /dev/null and b/A1014280203/5/1F524114F4-4.jpg differ
diff --git a/A1014280203/5/20140827173557_XRP2h.jpeg b/A1014280203/5/20140827173557_XRP2h.jpeg
new file mode 100644
index 00000000..91380818
Binary files /dev/null and b/A1014280203/5/20140827173557_XRP2h.jpeg differ
diff --git a/A1014280203/5/5.py b/A1014280203/5/5.py
new file mode 100644
index 00000000..2aaa8e9a
--- /dev/null
+++ b/A1014280203/5/5.py
@@ -0,0 +1,30 @@
+# iphone5 1136*640
+import os
+from PIL import Image
+
+ext = ['jpg', 'jpeg', 'png']
+files = os.listdir('.')
+
+
+def process_image(filename, mwidth=640, mheight=1136):
+ image = Image.open(filename)
+ w, h = image.size
+ if w <= mwidth and h <= mheight:
+ print(filename, 'is OK.')
+ return
+ if 1.0*w/mwidth > 1.0*h/mheight:
+ scale = 1.0*w/mwidth
+ new_im = image.resize((int(w/scale), int(h/scale)), Image.ANTIALIAS)
+ else:
+ scale = 1.0*h/mheight
+ new_im = image.resize((int(w/scale), int(h/scale)), Image.ANTIALIAS)
+ new_im.save('new-'+filename)
+ new_im.close()
+
+
+for file in files:
+ if file.split('.')[-1] in ext:
+ process_image(file)
+
+
+
diff --git "a/A1014280203/5/635042966918036569_\345\211\257\346\234\254.jpg" "b/A1014280203/5/635042966918036569_\345\211\257\346\234\254.jpg"
new file mode 100644
index 00000000..03097d43
Binary files /dev/null and "b/A1014280203/5/635042966918036569_\345\211\257\346\234\254.jpg" differ
diff --git a/A1014280203/5/verykuan.png b/A1014280203/5/verykuan.png
new file mode 100644
index 00000000..a267282c
Binary files /dev/null and b/A1014280203/5/verykuan.png differ
diff --git a/A1014280203/6/6.py b/A1014280203/6/6.py
new file mode 100644
index 00000000..f9ac5ec0
--- /dev/null
+++ b/A1014280203/6/6.py
@@ -0,0 +1,85 @@
+import nltk
+import string
+import os
+
+
+# simply extend word like: it's => it is
+def extend_word(text):
+ if text.find('\'') > 0:
+ old2new = dict()
+ words = text.split()
+ for word in words:
+ if word.find('\'') > 0:
+ parts = word.split('\'')
+ if parts[1] == 'm':
+ parts[1] = 'am'
+ elif parts[1] == 's':
+ parts[1] = 'is'
+ elif parts[1] == 're':
+ parts[1] = 'are'
+ elif parts[1] == 't':
+ parts[1] = 'not'
+ elif parts[1] == 've':
+ parts[1] = 'have'
+ elif parts[1] == 'll':
+ parts[1] = 'will'
+ elif parts[1] == 'd':
+ if words[words.index(word) + 1] == 'better':
+ parts[1] = 'had'
+ else:
+ parts[1] = 'would'
+ if parts[0].endswith('n'):
+ parts[0] = parts[0][:-1]
+ old2new[word] = ' '.join(parts)
+ _text = text
+ for old_word in old2new.keys():
+ _text = _text.replace(old_word, old2new[old_word])
+ return _text
+
+
+def return_order_key(record):
+ return record[1]
+
+
+def show_important_word(records):
+ # only this function was changed
+ items = sorted(records.items(), key=return_order_key, reverse=True)
+ # frequency of word
+ freq = 0
+ for item in items:
+ word, tag = nltk.pos_tag([item[0]])[0]
+ if tag.startswith('NN'):
+ print(word)
+ if item[1] < freq:
+ return
+ freq = item[1]
+ # no appropriate word found
+ if not freq:
+ print(items[0][0])
+
+
+def process_file(filename):
+ with open(filename, 'r') as file:
+ article = file.read()
+ no_pun_text = article
+ _punctuation = string.punctuation.replace('\'', '')
+ # delete punctuation except '''
+ for pun in _punctuation:
+ no_pun_text = no_pun_text.replace(pun, '')
+ complete_text = extend_word(no_pun_text)
+ records = dict()
+ for word in complete_text.lower().split():
+ records[word] = records.get(word, 0) + 1
+ print('='*30)
+ print('current file:', filename)
+ print('-'*20)
+ show_important_word(records)
+
+
+def process_files(path='.'):
+ files = os.listdir(path)
+ for file in files:
+ if file.endswith('.txt'):
+ process_file(os.path.join(path, file))
+
+process_files()
\ No newline at end of file
diff --git a/A1014280203/6/subtitle.txt b/A1014280203/6/subtitle.txt
new file mode 100644
index 00000000..3e648700
--- /dev/null
+++ b/A1014280203/6/subtitle.txt
@@ -0,0 +1,62 @@
+Make sure you know what
+you're supposed to be doing. Okay, that sounds obvious and easy, right? This is not always true. If you are new to your job, you might not
+have a feel for your responsibilities. If you have not done a certain
+type of work before, you might not know how long
+something is going to take. That's completely normal. So how do you know? Ask. Review your job responsibilities,
+ask someone who is in the same roll or who has previously done this job, keep good
+notes, keep track of how long something takes you so that you have a solid
+estimate and you can use that next time. Remember, it also helps to take big
+tasks and break them into smaller steps. Remember that research Sam was
+starting for the sales reports? He might take that research and divide it
+into steps, that way he can keep track of each step and he'll know what is
+involved in completing that research. How do you know what your priorities are? Depending on the type of work you do,
+your priorities come to you from your leadership or perhaps from a customer
+who is, you're supporting. It's important to really understand
+the priorities you're expected to support. So in your sample work plan, you're going
+to have something, perhaps the priority, the description of what you're doing,
+the due date, who you're doing it for, the steps, an estimate of how long
+it's going to take, and a start date. And those are some good fields for
+you to start out with. And you can create a table,
+a spread sheet, and begin to work with this and see if this
+helps you in completing your work. You might not really know how
+long something is going to take. That's okay. So how do you know? Ask. Review your job responsibilities
+with your supervisor, ask someone who's in the same role,
+or who has previously done the job. Keep good notes when you do something,
+keep notes, keep track of how long it takes you, and then you have something to refer back
+to for a good estimate next time. Remember, it also helps to take big
+tasks and break them into smaller steps. Remember when Sam was
+working on that research, he started that research
+with those sales reports? He might take that research and
+divide it into steps, and that way he can keep track of
+how long each step will take, and he's gonna know what is involved
+in completing that research. How do you know what your priorities are? Well, depending on the type of work you
+do, sometimes your priorities are gonna come to you from your leadership or
+from a customer you support. It's important to really understand the
+priorities you are expected to support. In our example with Sam,
+it became more important for him to complete his status report
+first and then his other report later. What if your boss can not or
+will not tell you? You know sometimes the person you work for
+wants to see you figure it out for yourself. Sometimes the person you work for doesn't
+really know what the true priorities are. And if this is true, you're gonna
+have to figure it out for yourself. Pay attention to what is discussed the
+most in meetings and in announcements and in other communications. Pay attention to where your successful
+colleagues are spending their time. There are clues around you waiting for
+you to uncover them. Before you go,
+I would like to share with you a story. I once had a co-worker who had
+an important meeting after lunch and the meeting was with an executive. She was gonna facilitate the meeting and
+give a presentation. During lunch, she remembered that she forgotten
+to pick something up at the store. The item she forgot was something
+her family needed that evening. Immediately, she ran out of the office to
+the store and purchased the missing item. In doing so,
+she was late to her own meeting and to make matters worse,
+she explained why she was late. Her manager looked at her and said, if I had known you were gonna go do
+that, I would've gone to the store for you so you could have been here
+on time and been prepared. That's what we call
+a career limiting moment. It was all because she forgot her plan,
+she forgot her priorities, and she forgot the difference between something
+that was urgent versus important. It may have been important that she bring
+home that item that evening to her family, but it wasn't urgent. She could've picked it up
+on the way home from work. What was both urgent and important
+was being prepared for that meeting. Now, before we move to the next module,
+why don't you consider taking a shot at creating your own plan that covers
+at least the next five business days.
\ No newline at end of file
diff --git a/A1014280203/7/7.py b/A1014280203/7/7.py
new file mode 100644
index 00000000..00e82fd8
--- /dev/null
+++ b/A1014280203/7/7.py
@@ -0,0 +1,51 @@
+import os
+
+code_lines = list()
+notation_lines = list()
+blank_lines = list()
+
+
+def process_file(filename):
+ global code_lines
+ global notation_lines
+ global blank_lines
+ with open(filename, 'r') as file:
+ for line in file.readlines():
+ _line = line.strip()
+ if not _line:
+ blank_lines.append(_line)
+ elif _line.startswith('#'):
+ notation_lines.append(_line)
+ else:
+ code_lines.append(_line)
+
+
+def show_result():
+ global code_lines
+ global notation_lines
+ global blank_lines
+ print('-'*20)
+ print('code:', len(code_lines))
+ for line in code_lines:
+ print(line)
+ print('-' * 20)
+ print('notation:', len(notation_lines))
+ for line in notation_lines:
+ print(line)
+ print('-' * 20)
+ print('blank:', len(blank_lines))
+ code_lines.clear()
+ notation_lines.clear()
+ blank_lines.clear()
+
+
+def process_files(path='../6'):
+ files = os.listdir(path)
+ for file in files:
+ if file.endswith('.py'):
+ print('='*30)
+ print('current file:', os.path.join(path, file))
+ process_file(os.path.join(path, file))
+ show_result()
+
+process_files()
\ No newline at end of file
diff --git a/A1014280203/8/8.py b/A1014280203/8/8.py
new file mode 100644
index 00000000..d0209441
--- /dev/null
+++ b/A1014280203/8/8.py
@@ -0,0 +1 @@
+# 暂时写不出来普适的程序,先占个坑
diff --git "a/A1014280203/8/\345\215\240\345\235\221" "b/A1014280203/8/\345\215\240\345\235\221"
new file mode 100644
index 00000000..e7abf6e1
--- /dev/null
+++ "b/A1014280203/8/\345\215\240\345\235\221"
@@ -0,0 +1 @@
+占坑
\ No newline at end of file
diff --git a/A1014280203/9/9.py b/A1014280203/9/9.py
new file mode 100644
index 00000000..23c82894
--- /dev/null
+++ b/A1014280203/9/9.py
@@ -0,0 +1,14 @@
+import requests
+import pyquery
+
+url = 'https://github.com/A1014280203/show-me-the-code'
+url_list = list()
+resp = requests.get(url)
+doc = pyquery.PyQuery(resp.content.decode())
+a_tags = doc.find('a')
+for a in a_tags.items():
+ if a.attr('href').startswith('http'):
+ url_list.append(a.attr('href'))
+ elif a.attr('href').startswith('/'):
+ url_list.append('https://github.com' + a.attr('href'))
+print(url_list)
\ No newline at end of file
diff --git a/AK-wang/A0001/floor_step.C b/AK-wang/A0001/floor_step.C
new file mode 100644
index 00000000..ffa0bd54
--- /dev/null
+++ b/AK-wang/A0001/floor_step.C
@@ -0,0 +1,102 @@
+/*
+
+下楼问题。从楼上走到楼下共有h个台阶,每一步有三种走法:
+走1个台阶,走2个台阶,走3个台阶。问有多少可走的方案。用递归思想和迭代思想编程。
+
+*/
+
+#include
+#include
+#include
+
+static int stack[1024]; // 存放每一步的台阶数
+static int steps = 0; // 走过的步数
+static int num_of_method = 0; // 多少种走法
+//递归详细版本,列出每一种走法的步骤
+void NextStairs(int n)
+{
+ if(n == 0)
+ {
+ /* 走完所有台阶,打印本次的走法,即曾经走过的步骤 */
+ printf("第%3d种走法[需%3d步] : ", ++num_of_method, steps);
+ int i;
+ for(i=0; i= 1)
+ {
+ stack[steps++] = 1; // 本次走1个台阶
+ NextStairs(n-1);
+ steps --;
+ }
+ if(n >= 2)
+ {
+ stack[steps++] = 2; // 本次走2个台阶
+ NextStairs(n-2);
+ steps --;
+ }
+ if(n >= 3)
+ {
+ stack[steps++] = 3; // 本次走3个台阶
+ NextStairs(n-3);
+ steps --;
+ }
+}
+//迭代法
+//此处是归纳出下一次z的迭代规律,下一次的z的值是上一次x,y,z的和,然后每次都要更新x,y,z
+int fib3(int n)
+{
+
+ int x = 0, y = 0,z=1;
+ int w, k;
+
+ for (int j = 0; j < n; j++)
+ {
+
+ w = z;
+ k = y;
+ z = x + y + z;
+ y = w;
+ x = k;
+
+
+ }
+
+ return z;
+
+}
+//递归法
+int dfib1(int n)
+{
+ if (n < 1)
+ { return 0; }
+
+ if (n == 1)
+ return 1;
+ if (n == 2)
+ return 2;
+ if (n == 3)
+ return 4;
+ return dfib1(n - 1) + dfib1(n - 2) + dfib1(n-3);
+}
+
+int main()
+{
+ int n;
+ printf("enter a positive number: n=");
+ scanf("%d", &n);
+
+ //NextStairs(n);
+ //printf("%d\n", dfib1(n));
+ printf("%d\n", fib3(n));
+
+ return 0;
+}
+
+
+
+
diff --git a/AK-wang/A0001/prove.c b/AK-wang/A0001/prove.c
new file mode 100644
index 00000000..d120f026
--- /dev/null
+++ b/AK-wang/A0001/prove.c
@@ -0,0 +1,43 @@
+#include
+//递归和归纳都是将复杂问题简单化的方法,只是方向不同,递归是"从一般到个别",归纳是"从个别到一般"
+
+//用递归的思想来证明数学归纳法
+void prove1(int n)
+{
+ if(n == 0){
+ printf("step 0,the P(%d) true.\n", n);
+ }else{
+ prove1(n-1);
+ printf("step %d,if P(%d) true ,then P(%d) true also.\n", n, n - 1, n);
+ printf("so,we can say \"P(%d) true.\"\n", n);
+
+ }
+}
+
+//用循环来表示数学归纳法
+void prove2(int n)
+{
+ int k;
+
+ printf("now we'll prove P(%d) true.\n", n);
+ k = 0;
+ printf("step 0 can prove P(%d) true.\n", k);
+ while(k < n)
+ {
+ printf("step %d can say \" if P(%d) true,then P(%d) true also\".\n", k + 1, k, k + 1);
+ k = k + 1;
+ }
+ printf("All prove over.\n");
+}
+
+int main()
+{
+ int n;
+ printf("input your number:n=");
+ scanf("%d",&n);
+ printf("\n");
+ prove1(n);
+ printf("\n");
+ prove2(n);
+ return 0;
+}
diff --git a/AK-wang/A0001/reproduction.C b/AK-wang/A0001/reproduction.C
new file mode 100644
index 00000000..312bb536
--- /dev/null
+++ b/AK-wang/A0001/reproduction.C
@@ -0,0 +1,47 @@
+/*************************************************************************
+ > File Name: reproduction.c
+ > Author: wangxiaoxian
+ > Mail: 634897019@qq.com
+ > Created Time: Fri 03 Jun 2016 09:54:11 PM CST
+ ************************************************************************/
+//一只动物,出生2天后开始以每天1只的速度繁殖后代,假设第一天,有1只这样的动物,
+//那么,n天后,一共多少只?
+
+#include
+
+//找出递推式,用递归思想编程。
+int reproduction(int n)
+{
+ if (n < 1)
+ return 0;
+
+ if (n == 1)
+ return 1;
+ if (n == 2)
+ return 1;
+ return reproduction(n-1) + reproduction(n-2);
+}
+
+//迭代思想
+int reproduction_itera(int n)
+{
+ int x = 0, y = 1;
+ int w;
+ for (int j = 0; j < n - 1; j++)
+ {
+ w = y;
+ y = x + y;
+ x = w;
+ }
+ return y;
+}
+
+int main()
+{
+ int days;
+ printf("input how many days:days=");
+ scanf("%d", &days);
+ printf("the sum of reproductions:%d\n", reproduction(days));
+ printf("the sum of reproductions:%d\n", reproduction_itera(days));
+ return 0;
+}
diff --git a/AK-wang/A0002/permu.cpp b/AK-wang/A0002/permu.cpp
new file mode 100644
index 00000000..fb56799e
--- /dev/null
+++ b/AK-wang/A0002/permu.cpp
@@ -0,0 +1,58 @@
+/*************************************************************************
+ > File Name: permu.cpp
+ > Author: wangxiaoxian
+ > Mail: 634897019@qq.com
+ > Created Time: Wed 03 Aug 2016 10:14:19 PM CST
+ ************************************************************************/
+//返回一个字符串所有的排列方式
+//代码来自:http://www.cricode.com/624.html
+
+#include
+#include
+using namespace std;
+
+typedef vector vs;
+
+vs permu(string s){
+ vs result;
+ if(s == ""){
+ result.push_back("");
+ return result;
+ }
+ string c = s.substr(0, 1);
+ vs res = permu(s.substr(1));
+ for(int i=0; i Talk is cheap. Show me the code.--Linus Torvalds
+
+----------
+
+**第 0000 题:**将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+类似于图中效果
+
+
+
+**第 0001 题:**做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用**生成激活码**(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+**第 0002 题**:将 0001 题生成的 200 个激活码(或者优惠券)保存到 **MySQL** 关系型数据库中。
+
+**第 0003 题:**将 0001 题生成的 200 个激活码(或者优惠券)保存到 **Redis** 非关系型数据库中。
+
+**第 0004 题:**任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+**第 0005 题:**你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+
+**第 0006 题:**你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+
+**第 0007 题:**有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+
+**第 0008 题:**一个HTML文件,找出里面的**正文**。
+
+**第 0009 题:**一个HTML文件,找出里面的**链接**。
+
+**第 0010 题:**使用 Python 生成类似于下图中的**字母验证码图片**
+
+
+
+- [阅读资料](http://stackoverflow.com/questions/2823316/generate-a-random-letter-in-python)
+
+**第 0011 题:** 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+
+ 北京
+ 程序员
+ 公务员
+ 领导
+ 牛比
+ 牛逼
+ 你娘
+ 你妈
+ love
+ sex
+ jiangge
+
+**第 0012 题:** 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+
+**第 0013 题:** 用 Python 写一个爬图片的程序,爬 [这个链接里的日本妹子图片 :-)](http://tieba.baidu.com/p/2166231880)
+
+- [参考代码](http://www.v2ex.com/t/61686 "参考代码")
+
+**第 0014 题:** 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+
+ {
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+ }
+
+请将上述内容写到 student.xls 文件中,如下图所示:
+
+
+
+- [阅读资料](http://www.cnblogs.com/skynet/archive/2013/05/06/3063245.html) 腾讯游戏开发 XML 和 Excel 内容相互转换
+
+**第 0015 题:** 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+ {
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+ }
+
+请将上述内容写到 city.xls 文件中,如下图所示:
+
+
+
+
+**第 0016 题:** 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+
+ [
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+ ]
+
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+
+
+
+**第 0017 题:** 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+
+
+
+
+ {
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+ }
+
+
+
+- [阅读资料](http://www.cnblogs.com/skynet/archive/2013/05/06/3063245.html) 腾讯游戏开发 xml 和 Excel 相互转换
+
+**第 0018 题:** 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+
+
+
+
+ {
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+ }
+
+
+
+**第 0019 题:** 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+
+所示:
+
+
+
+
+
+
+ [
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+ ]
+
+
+
+
+**第 0020 题:** [登陆中国联通网上营业厅](http://iservice.10010.com/index_.html) 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。写代码,对每月通话时间做个统计。
+
+**第 0021 题:** 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。
+
+- 阅读资料 [用户密码的存储与 Python 示例](http://zhuoqiang.me/password-storage-and-python-example.html)
+
+- 阅读资料 [Hashing Strings with Python](http://www.pythoncentral.io/hashing-strings-with-python/)
+
+- 阅读资料 [Python's safest method to store and retrieve passwords from a database](http://stackoverflow.com/questions/2572099/pythons-safest-method-to-store-and-retrieve-passwords-from-a-database)
+
+**第 0022 题:** iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。
+
+**第 0023 题:** 使用 Python 的 Web 框架,做一个 Web 版本 留言簿 应用。
+
+[阅读资料:Python 有哪些 Web 框架](http://v2ex.com/t/151643#reply53)
+
+- 
+
+
+**第 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:文本-->电脑命令
diff --git a/BrambleXu/play0/Futura.ttf b/BrambleXu/play0/Futura.ttf
new file mode 100644
index 00000000..ddedd04e
Binary files /dev/null and b/BrambleXu/play0/Futura.ttf differ
diff --git a/BrambleXu/play0/icon.jpg b/BrambleXu/play0/icon.jpg
new file mode 100644
index 00000000..fd4c2424
Binary files /dev/null and b/BrambleXu/play0/icon.jpg differ
diff --git a/BrambleXu/play0/icon_with_num.jpg b/BrambleXu/play0/icon_with_num.jpg
new file mode 100644
index 00000000..0a6c1985
Binary files /dev/null and b/BrambleXu/play0/icon_with_num.jpg differ
diff --git a/BrambleXu/play0/play0.py b/BrambleXu/play0/play0.py
new file mode 100644
index 00000000..3aace68a
--- /dev/null
+++ b/BrambleXu/play0/play0.py
@@ -0,0 +1,32 @@
+# -*- coding:utf-8 -*-
+# 第 0000 题:将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果
+'''
+PIL.ImageDraw.Draw.text(xy, text, fill=None, font=None, anchor=None)
+Draws the string at the given position.
+
+Parameters:
+xy – Top left corner of the text.
+text – Text to be drawn. If it contains any newline characters, the text is passed on to mulitiline_text()
+fill – Color to use for the text.
+font – An ImageFont instance.
+'''
+
+'''
+1. 坐标 (0, 0) 表示左上角,整个图片类似镶嵌在坐标的第四像限;img.size 是一个二位数组,依次位图片的宽和高。
+2. 在图片上添加内容时注意对应内容也会占位置,所以不能当作点即 pixel 来看待,实际处理时需要考虑添加对象的 size,这就对应代码中右上角坐标position的获取。
+3. ImageFont 的获取有很多方法,其中较简单的方法从 truetype 中获取,对应 font 存放的位置一般是 /usr/share/fonts/...
+'''
+
+from PIL import Image, ImageDraw, ImageFont
+
+def add_num(picPath, num):
+ img = Image.open(picPath)
+ xSize, ySize = img.size
+ fontsize = ySize / 4
+ position = xSize - fontsize
+ myfont = ImageFont.truetype('Futura.ttf', fontsize)
+ ImageDraw.Draw(img).text((position, 0), str(num), font = myfont, fill='red')
+ img.save('icon_with_num.jpg')
+
+if __name__ == '__main__':
+ add_num('/Users/xu/Udacity/python/BrambleXu/play0/icon.jpg', 3)
diff --git a/BrambleXu/play1/Running_result.txt b/BrambleXu/play1/Running_result.txt
new file mode 100644
index 00000000..e70c78ba
--- /dev/null
+++ b/BrambleXu/play1/Running_result.txt
@@ -0,0 +1,200 @@
+zVa5X6I
+wWRq3Md
+HYPrBwu
+WJ81dSg
+9qum1SH
+BjsDzQG
+mlTlnxd
+ccTYwGo
+UDxRWtb
+ZGGHPbX
+VSzuxVY
+7pwig4K
+q0hzEYY
+SPPd3nP
+RzrTEBc
+bRe6cxz
+n3sTEEX
+Mz8Anhk
+iL9AfX9
+eItR9is
+9ZCYjqT
+AzLXLgl
+o5gpCd2
+QQm2eA8
+stmJzPJ
+hOf4kN6
+FX3hSJD
+6ZbxgVj
+oBbzOsT
+h37SB5g
+ME3gPlX
+0eZcNqz
+yW6ClQ1
+YHFRUCO
+jgGQ5jj
+uXcZmLy
+qxcvNyI
+D8PTOnP
+PDuNzcn
+4VEjIvf
+0N8A1tc
+oRy3PfJ
+xAFONpv
+5LFU5cn
+Fj39jof
+Wpn24hk
+cJb1kIG
+W2nDn4A
+obMKOv4
+wq4vnjN
+yhlvuP1
+zbyYGXS
+JrocNII
+A445blD
+UtWyEsX
+hWL4FND
+ddCEGF5
+Coya2Pi
+yyRCA5n
+FvffdOh
+vugnBoS
+JSPPpQU
+vaw2qwu
+kLsXPPY
+60CYTep
+qgGZ0UG
+qcHRVzg
+0fHvUbP
+He6PuyE
+L1A3wPU
+UUWfAJf
+gQ3LLXG
+ZVImzMf
+97WxYRW
+ogdZC8n
+ZXbknJO
+jojdeR0
+WeJ7Q2V
+FvjPEMC
+oDKdvOU
+xOOgYVT
+YS4yfYE
+ynO6kvp
+i96tK90
+F0V1x6l
+Scy2fNj
+Vud83SJ
+6Uw2iox
+HlcfaMN
+eeBXFxr
+mdaW2qm
+7biS1Ct
+8NCZ9wb
+g2ybeAL
+uH1y7v4
+vYcGGdX
+cmfqmug
+ZsYn46K
+HPl0WfV
+6ZUParz
+04yqzNM
+P4H51wV
+m19yof6
+UZJ9DHl
+ZU5KQxT
+F3AT9Hm
+3C56tlw
+dbKnCAt
+UanlfgG
+eeWxP9u
+qzlYyVS
+ylS17QF
+WknIN9Z
+4DZ4E4z
+CIt30PV
+X7pKmau
+3aERTHR
+kv2HFHX
+rD5ONpK
+0fxHVZR
+pFKsTHo
+ytxg8JS
+V6LmSZz
+sLvxGkG
+Y4kO3N4
+INJhqPo
+UiYLZBm
+FsuNV1V
+vGZbyTh
+sMi7iu7
+p6x5ZkN
+xPYsVkH
+AsG4lhO
+Oeea0Eq
+5WfDYgq
+LmYdT1a
+62k2T3K
+3hddsZl
+CTdCLFg
+8CWfWFR
+vWcBtjd
+x4lPElC
+STuJ8oj
+MQZN3Nj
+xvxLuww
+CBvNgVV
+weZnd9e
+jmScsx8
+19T00Tn
+lZO6Pce
+5vv7tqT
+KMKB0Lu
+dig4KaK
+7rDy82m
+CGRlUFR
+EdLfDgf
+lzTSWoj
+tNh1ILF
+C8hQRnl
+ANsiZmh
+5f7UgiW
+pSBeD64
+vVazmIm
+keuJ4WB
+MDuI2Vr
+x4ajEg8
+A6FiNzn
+W9mRdXL
+smFAbTV
+TcgpNso
+moabigv
+oS4R0Uj
+zlbT4Eu
+wQp0X60
+8dynhzZ
+cQdD8Sn
+SWK5sDu
+ccupt2f
+q2FDR9n
+YDWFOgF
+ywe005r
+d69sLs8
+6dRwv8l
+hbjEyRY
+rajgBbK
+C5PxGGv
+p9CJVg5
+rBjkQQ3
+TvpfQVx
+jmEUJIY
+eDH2S7i
+uXPCTx9
+LRFGWmW
+sDvN8r4
+OlkjslP
+mSoDDUL
+Qs3oBpH
+VioYsWj
+pd5wtcP
+WBJd6Hb
diff --git a/BrambleXu/play1/play1.py b/BrambleXu/play1/play1.py
new file mode 100644
index 00000000..8cad29b1
--- /dev/null
+++ b/BrambleXu/play1/play1.py
@@ -0,0 +1,14 @@
+# -*- coding:utf-8 -*-
+#**第 0001 题:**做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用**生成激活码**(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+import random, string
+
+def random_str(num, length = 7):
+ f = open("Running_result.txt", 'wb')
+ for i in range(num):
+ chars = string.letters + string.digits
+ s = [random.choice(chars) for i in range(length)]
+ f.write(''.join(s) + '\n')
+ f.close()
+
+if __name__ == '__main__':
+ random_str(200)
diff --git a/BrambleXu/play2/.ipynb_checkpoints/test-checkpoint.ipynb b/BrambleXu/play2/.ipynb_checkpoints/test-checkpoint.ipynb
new file mode 100644
index 00000000..286dcb3d
--- /dev/null
+++ b/BrambleXu/play2/.ipynb_checkpoints/test-checkpoint.ipynb
@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BrambleXu/play2/Running_result.txt b/BrambleXu/play2/Running_result.txt
new file mode 100644
index 00000000..e70c78ba
--- /dev/null
+++ b/BrambleXu/play2/Running_result.txt
@@ -0,0 +1,200 @@
+zVa5X6I
+wWRq3Md
+HYPrBwu
+WJ81dSg
+9qum1SH
+BjsDzQG
+mlTlnxd
+ccTYwGo
+UDxRWtb
+ZGGHPbX
+VSzuxVY
+7pwig4K
+q0hzEYY
+SPPd3nP
+RzrTEBc
+bRe6cxz
+n3sTEEX
+Mz8Anhk
+iL9AfX9
+eItR9is
+9ZCYjqT
+AzLXLgl
+o5gpCd2
+QQm2eA8
+stmJzPJ
+hOf4kN6
+FX3hSJD
+6ZbxgVj
+oBbzOsT
+h37SB5g
+ME3gPlX
+0eZcNqz
+yW6ClQ1
+YHFRUCO
+jgGQ5jj
+uXcZmLy
+qxcvNyI
+D8PTOnP
+PDuNzcn
+4VEjIvf
+0N8A1tc
+oRy3PfJ
+xAFONpv
+5LFU5cn
+Fj39jof
+Wpn24hk
+cJb1kIG
+W2nDn4A
+obMKOv4
+wq4vnjN
+yhlvuP1
+zbyYGXS
+JrocNII
+A445blD
+UtWyEsX
+hWL4FND
+ddCEGF5
+Coya2Pi
+yyRCA5n
+FvffdOh
+vugnBoS
+JSPPpQU
+vaw2qwu
+kLsXPPY
+60CYTep
+qgGZ0UG
+qcHRVzg
+0fHvUbP
+He6PuyE
+L1A3wPU
+UUWfAJf
+gQ3LLXG
+ZVImzMf
+97WxYRW
+ogdZC8n
+ZXbknJO
+jojdeR0
+WeJ7Q2V
+FvjPEMC
+oDKdvOU
+xOOgYVT
+YS4yfYE
+ynO6kvp
+i96tK90
+F0V1x6l
+Scy2fNj
+Vud83SJ
+6Uw2iox
+HlcfaMN
+eeBXFxr
+mdaW2qm
+7biS1Ct
+8NCZ9wb
+g2ybeAL
+uH1y7v4
+vYcGGdX
+cmfqmug
+ZsYn46K
+HPl0WfV
+6ZUParz
+04yqzNM
+P4H51wV
+m19yof6
+UZJ9DHl
+ZU5KQxT
+F3AT9Hm
+3C56tlw
+dbKnCAt
+UanlfgG
+eeWxP9u
+qzlYyVS
+ylS17QF
+WknIN9Z
+4DZ4E4z
+CIt30PV
+X7pKmau
+3aERTHR
+kv2HFHX
+rD5ONpK
+0fxHVZR
+pFKsTHo
+ytxg8JS
+V6LmSZz
+sLvxGkG
+Y4kO3N4
+INJhqPo
+UiYLZBm
+FsuNV1V
+vGZbyTh
+sMi7iu7
+p6x5ZkN
+xPYsVkH
+AsG4lhO
+Oeea0Eq
+5WfDYgq
+LmYdT1a
+62k2T3K
+3hddsZl
+CTdCLFg
+8CWfWFR
+vWcBtjd
+x4lPElC
+STuJ8oj
+MQZN3Nj
+xvxLuww
+CBvNgVV
+weZnd9e
+jmScsx8
+19T00Tn
+lZO6Pce
+5vv7tqT
+KMKB0Lu
+dig4KaK
+7rDy82m
+CGRlUFR
+EdLfDgf
+lzTSWoj
+tNh1ILF
+C8hQRnl
+ANsiZmh
+5f7UgiW
+pSBeD64
+vVazmIm
+keuJ4WB
+MDuI2Vr
+x4ajEg8
+A6FiNzn
+W9mRdXL
+smFAbTV
+TcgpNso
+moabigv
+oS4R0Uj
+zlbT4Eu
+wQp0X60
+8dynhzZ
+cQdD8Sn
+SWK5sDu
+ccupt2f
+q2FDR9n
+YDWFOgF
+ywe005r
+d69sLs8
+6dRwv8l
+hbjEyRY
+rajgBbK
+C5PxGGv
+p9CJVg5
+rBjkQQ3
+TvpfQVx
+jmEUJIY
+eDH2S7i
+uXPCTx9
+LRFGWmW
+sDvN8r4
+OlkjslP
+mSoDDUL
+Qs3oBpH
+VioYsWj
+pd5wtcP
+WBJd6Hb
diff --git a/BrambleXu/play2/play2.py b/BrambleXu/play2/play2.py
new file mode 100644
index 00000000..914f9289
--- /dev/null
+++ b/BrambleXu/play2/play2.py
@@ -0,0 +1,36 @@
+# -*- coding:utf-8 -*-
+#**第 0002 题**:将 0001 题生成的 200 个激活码(或者优惠券)保存到 **MySQL** 关系型数据库中。
+
+import MySQLdb
+
+def store_mysql(filepath):
+ db = MySQLdb.connect(host="localhost", user = "xu", passwd = "1234", db = "ShowMeTheCode")
+ cursor = db.cursor()
+
+ #判断表是否存在
+ cursor.execute('show tables in ShowMeTheCode;')
+ tables = cursor.fetchall()
+ findtables = False
+ for table in tables:
+ if 'code' in table:
+ findtables = True
+ print "the table is already exist"
+ if not findtables:
+ cursor.execute('''
+ CREATE TABLE code(
+ id INT NOT NULL AUTO_INCREMENT,
+ code VARCHAR(10)
+ PRIMARY KEY (id));
+ ''')
+
+ f = open(filepath, 'rb')
+ for line in f.readlines():
+ coupon = line.strip() #用strip把\n去掉
+ cursor.execute("INSERT INTO code (code) VALUES (%s);", [coupon]) # coupon会报错,格式问题,插入数据库里的数据必须要变为list,所以用【coupon]
+
+ db.commit()
+ cursor.close()
+ db.close()
+
+if __name__ == '__main__':
+ store_mysql('Running_result.txt')
diff --git a/BrambleXu/play2/test.ipynb b/BrambleXu/play2/test.ipynb
new file mode 100644
index 00000000..b899bf65
--- /dev/null
+++ b/BrambleXu/play2/test.ipynb
@@ -0,0 +1,255 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "zVa5X6I\n",
+ "wWRq3Md\n",
+ "HYPrBwu\n",
+ "WJ81dSg\n",
+ "9qum1SH\n",
+ "BjsDzQG\n",
+ "mlTlnxd\n",
+ "ccTYwGo\n",
+ "UDxRWtb\n",
+ "ZGGHPbX\n",
+ "VSzuxVY\n",
+ "7pwig4K\n",
+ "q0hzEYY\n",
+ "SPPd3nP\n",
+ "RzrTEBc\n",
+ "bRe6cxz\n",
+ "n3sTEEX\n",
+ "Mz8Anhk\n",
+ "iL9AfX9\n",
+ "eItR9is\n",
+ "9ZCYjqT\n",
+ "AzLXLgl\n",
+ "o5gpCd2\n",
+ "QQm2eA8\n",
+ "stmJzPJ\n",
+ "hOf4kN6\n",
+ "FX3hSJD\n",
+ "6ZbxgVj\n",
+ "oBbzOsT\n",
+ "h37SB5g\n",
+ "ME3gPlX\n",
+ "0eZcNqz\n",
+ "yW6ClQ1\n",
+ "YHFRUCO\n",
+ "jgGQ5jj\n",
+ "uXcZmLy\n",
+ "qxcvNyI\n",
+ "D8PTOnP\n",
+ "PDuNzcn\n",
+ "4VEjIvf\n",
+ "0N8A1tc\n",
+ "oRy3PfJ\n",
+ "xAFONpv\n",
+ "5LFU5cn\n",
+ "Fj39jof\n",
+ "Wpn24hk\n",
+ "cJb1kIG\n",
+ "W2nDn4A\n",
+ "obMKOv4\n",
+ "wq4vnjN\n",
+ "yhlvuP1\n",
+ "zbyYGXS\n",
+ "JrocNII\n",
+ "A445blD\n",
+ "UtWyEsX\n",
+ "hWL4FND\n",
+ "ddCEGF5\n",
+ "Coya2Pi\n",
+ "yyRCA5n\n",
+ "FvffdOh\n",
+ "vugnBoS\n",
+ "JSPPpQU\n",
+ "vaw2qwu\n",
+ "kLsXPPY\n",
+ "60CYTep\n",
+ "qgGZ0UG\n",
+ "qcHRVzg\n",
+ "0fHvUbP\n",
+ "He6PuyE\n",
+ "L1A3wPU\n",
+ "UUWfAJf\n",
+ "gQ3LLXG\n",
+ "ZVImzMf\n",
+ "97WxYRW\n",
+ "ogdZC8n\n",
+ "ZXbknJO\n",
+ "jojdeR0\n",
+ "WeJ7Q2V\n",
+ "FvjPEMC\n",
+ "oDKdvOU\n",
+ "xOOgYVT\n",
+ "YS4yfYE\n",
+ "ynO6kvp\n",
+ "i96tK90\n",
+ "F0V1x6l\n",
+ "Scy2fNj\n",
+ "Vud83SJ\n",
+ "6Uw2iox\n",
+ "HlcfaMN\n",
+ "eeBXFxr\n",
+ "mdaW2qm\n",
+ "7biS1Ct\n",
+ "8NCZ9wb\n",
+ "g2ybeAL\n",
+ "uH1y7v4\n",
+ "vYcGGdX\n",
+ "cmfqmug\n",
+ "ZsYn46K\n",
+ "HPl0WfV\n",
+ "6ZUParz\n",
+ "04yqzNM\n",
+ "P4H51wV\n",
+ "m19yof6\n",
+ "UZJ9DHl\n",
+ "ZU5KQxT\n",
+ "F3AT9Hm\n",
+ "3C56tlw\n",
+ "dbKnCAt\n",
+ "UanlfgG\n",
+ "eeWxP9u\n",
+ "qzlYyVS\n",
+ "ylS17QF\n",
+ "WknIN9Z\n",
+ "4DZ4E4z\n",
+ "CIt30PV\n",
+ "X7pKmau\n",
+ "3aERTHR\n",
+ "kv2HFHX\n",
+ "rD5ONpK\n",
+ "0fxHVZR\n",
+ "pFKsTHo\n",
+ "ytxg8JS\n",
+ "V6LmSZz\n",
+ "sLvxGkG\n",
+ "Y4kO3N4\n",
+ "INJhqPo\n",
+ "UiYLZBm\n",
+ "FsuNV1V\n",
+ "vGZbyTh\n",
+ "sMi7iu7\n",
+ "p6x5ZkN\n",
+ "xPYsVkH\n",
+ "AsG4lhO\n",
+ "Oeea0Eq\n",
+ "5WfDYgq\n",
+ "LmYdT1a\n",
+ "62k2T3K\n",
+ "3hddsZl\n",
+ "CTdCLFg\n",
+ "8CWfWFR\n",
+ "vWcBtjd\n",
+ "x4lPElC\n",
+ "STuJ8oj\n",
+ "MQZN3Nj\n",
+ "xvxLuww\n",
+ "CBvNgVV\n",
+ "weZnd9e\n",
+ "jmScsx8\n",
+ "19T00Tn\n",
+ "lZO6Pce\n",
+ "5vv7tqT\n",
+ "KMKB0Lu\n",
+ "dig4KaK\n",
+ "7rDy82m\n",
+ "CGRlUFR\n",
+ "EdLfDgf\n",
+ "lzTSWoj\n",
+ "tNh1ILF\n",
+ "C8hQRnl\n",
+ "ANsiZmh\n",
+ "5f7UgiW\n",
+ "pSBeD64\n",
+ "vVazmIm\n",
+ "keuJ4WB\n",
+ "MDuI2Vr\n",
+ "x4ajEg8\n",
+ "A6FiNzn\n",
+ "W9mRdXL\n",
+ "smFAbTV\n",
+ "TcgpNso\n",
+ "moabigv\n",
+ "oS4R0Uj\n",
+ "zlbT4Eu\n",
+ "wQp0X60\n",
+ "8dynhzZ\n",
+ "cQdD8Sn\n",
+ "SWK5sDu\n",
+ "ccupt2f\n",
+ "q2FDR9n\n",
+ "YDWFOgF\n",
+ "ywe005r\n",
+ "d69sLs8\n",
+ "6dRwv8l\n",
+ "hbjEyRY\n",
+ "rajgBbK\n",
+ "C5PxGGv\n",
+ "p9CJVg5\n",
+ "rBjkQQ3\n",
+ "TvpfQVx\n",
+ "jmEUJIY\n",
+ "eDH2S7i\n",
+ "uXPCTx9\n",
+ "LRFGWmW\n",
+ "sDvN8r4\n",
+ "OlkjslP\n",
+ "mSoDDUL\n",
+ "Qs3oBpH\n",
+ "VioYsWj\n",
+ "pd5wtcP\n",
+ "WBJd6Hb\n"
+ ]
+ }
+ ],
+ "source": [
+ "f = open('Running_result.txt', 'rb')\n",
+ "for line in f.readlines():\n",
+ " print line.strip()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BrambleXu/play2/test.py b/BrambleXu/play2/test.py
new file mode 100644
index 00000000..6a57132f
--- /dev/null
+++ b/BrambleXu/play2/test.py
@@ -0,0 +1,32 @@
+# -*- coding:utf-8 -*-
+# I use this file to test the database method
+'''
+I want to creat a data base that named xu, student_id is 1, name is bramble, sex is male
+'''
+
+import MySQLdb
+
+if __name__ == "__main__":
+ # connect to the database
+ db = MySQLdb.connect("localhost","xu","1234","test" )
+ cursor = db.cursor()
+
+ name = 'bramble'
+ sex = 'youguess'
+
+ #insert
+ cursor.execute('insert into student_table (name, sex) value (%s, %s)', (name, sex))
+
+ #connect.commit()
+ #select
+ cursor.execute('select * from student_table')
+ db.commit()
+
+ row = cursor.fetchall()
+
+ #output
+ for i in row:
+ print(i)
+
+ #disconnect database
+ db.close()
diff --git a/BrambleXu/play3/Running_result.txt b/BrambleXu/play3/Running_result.txt
new file mode 100644
index 00000000..e70c78ba
--- /dev/null
+++ b/BrambleXu/play3/Running_result.txt
@@ -0,0 +1,200 @@
+zVa5X6I
+wWRq3Md
+HYPrBwu
+WJ81dSg
+9qum1SH
+BjsDzQG
+mlTlnxd
+ccTYwGo
+UDxRWtb
+ZGGHPbX
+VSzuxVY
+7pwig4K
+q0hzEYY
+SPPd3nP
+RzrTEBc
+bRe6cxz
+n3sTEEX
+Mz8Anhk
+iL9AfX9
+eItR9is
+9ZCYjqT
+AzLXLgl
+o5gpCd2
+QQm2eA8
+stmJzPJ
+hOf4kN6
+FX3hSJD
+6ZbxgVj
+oBbzOsT
+h37SB5g
+ME3gPlX
+0eZcNqz
+yW6ClQ1
+YHFRUCO
+jgGQ5jj
+uXcZmLy
+qxcvNyI
+D8PTOnP
+PDuNzcn
+4VEjIvf
+0N8A1tc
+oRy3PfJ
+xAFONpv
+5LFU5cn
+Fj39jof
+Wpn24hk
+cJb1kIG
+W2nDn4A
+obMKOv4
+wq4vnjN
+yhlvuP1
+zbyYGXS
+JrocNII
+A445blD
+UtWyEsX
+hWL4FND
+ddCEGF5
+Coya2Pi
+yyRCA5n
+FvffdOh
+vugnBoS
+JSPPpQU
+vaw2qwu
+kLsXPPY
+60CYTep
+qgGZ0UG
+qcHRVzg
+0fHvUbP
+He6PuyE
+L1A3wPU
+UUWfAJf
+gQ3LLXG
+ZVImzMf
+97WxYRW
+ogdZC8n
+ZXbknJO
+jojdeR0
+WeJ7Q2V
+FvjPEMC
+oDKdvOU
+xOOgYVT
+YS4yfYE
+ynO6kvp
+i96tK90
+F0V1x6l
+Scy2fNj
+Vud83SJ
+6Uw2iox
+HlcfaMN
+eeBXFxr
+mdaW2qm
+7biS1Ct
+8NCZ9wb
+g2ybeAL
+uH1y7v4
+vYcGGdX
+cmfqmug
+ZsYn46K
+HPl0WfV
+6ZUParz
+04yqzNM
+P4H51wV
+m19yof6
+UZJ9DHl
+ZU5KQxT
+F3AT9Hm
+3C56tlw
+dbKnCAt
+UanlfgG
+eeWxP9u
+qzlYyVS
+ylS17QF
+WknIN9Z
+4DZ4E4z
+CIt30PV
+X7pKmau
+3aERTHR
+kv2HFHX
+rD5ONpK
+0fxHVZR
+pFKsTHo
+ytxg8JS
+V6LmSZz
+sLvxGkG
+Y4kO3N4
+INJhqPo
+UiYLZBm
+FsuNV1V
+vGZbyTh
+sMi7iu7
+p6x5ZkN
+xPYsVkH
+AsG4lhO
+Oeea0Eq
+5WfDYgq
+LmYdT1a
+62k2T3K
+3hddsZl
+CTdCLFg
+8CWfWFR
+vWcBtjd
+x4lPElC
+STuJ8oj
+MQZN3Nj
+xvxLuww
+CBvNgVV
+weZnd9e
+jmScsx8
+19T00Tn
+lZO6Pce
+5vv7tqT
+KMKB0Lu
+dig4KaK
+7rDy82m
+CGRlUFR
+EdLfDgf
+lzTSWoj
+tNh1ILF
+C8hQRnl
+ANsiZmh
+5f7UgiW
+pSBeD64
+vVazmIm
+keuJ4WB
+MDuI2Vr
+x4ajEg8
+A6FiNzn
+W9mRdXL
+smFAbTV
+TcgpNso
+moabigv
+oS4R0Uj
+zlbT4Eu
+wQp0X60
+8dynhzZ
+cQdD8Sn
+SWK5sDu
+ccupt2f
+q2FDR9n
+YDWFOgF
+ywe005r
+d69sLs8
+6dRwv8l
+hbjEyRY
+rajgBbK
+C5PxGGv
+p9CJVg5
+rBjkQQ3
+TvpfQVx
+jmEUJIY
+eDH2S7i
+uXPCTx9
+LRFGWmW
+sDvN8r4
+OlkjslP
+mSoDDUL
+Qs3oBpH
+VioYsWj
+pd5wtcP
+WBJd6Hb
diff --git a/BrambleXu/play3/play3.py b/BrambleXu/play3/play3.py
new file mode 100644
index 00000000..11067b33
--- /dev/null
+++ b/BrambleXu/play3/play3.py
@@ -0,0 +1,30 @@
+# -*- coding:utf-8 -*-
+#**第 0003 题:**将 0001 题生成的 200 个激活码(或者优惠券)保存到 **Redis** 非关系型数据库中。
+'''
+running successfully
+
+here are some useful links:
+https://www.tutorialspoint.com/redis/redis_keys.htm
+http://redis.io/topics/data-types-intro
+
+But I found there is no table in redis, even if I stored the code in the redis database,
+if I use SET 1 haha(1 is the key, haha is the value), then the original value(the code) will be replace by haha
+how to avoid this?
+I think I should read more code to find the answer
+'''
+
+import redis
+
+def store_redis(filepath):
+ r = redis.StrictRedis(host = 'localhost', port = 6379, db = 0)
+ f = open(filepath, 'rb')
+ i = 0
+ for line in f.readlines():
+ code = line.strip()
+ r.set(i, code)
+ i += 1
+
+
+
+if __name__ == '__main__':
+ store_redis('Running_result.txt')
diff --git a/BrambleXu/play4/.ipynb_checkpoints/test-checkpoint.ipynb b/BrambleXu/play4/.ipynb_checkpoints/test-checkpoint.ipynb
new file mode 100644
index 00000000..b085253d
--- /dev/null
+++ b/BrambleXu/play4/.ipynb_checkpoints/test-checkpoint.ipynb
@@ -0,0 +1,361 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "line is: \n",
+ "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 dead!Of 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.\n",
+ "\n",
+ "line.split() is: \n",
+ "['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', 'dead\\xef\\xbc\\x81Of', '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.']\n",
+ "line is: \n",
+ "\n",
+ "\n",
+ "line.split() is: \n",
+ "[]\n",
+ "line is: \n",
+ "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.\n",
+ "\n",
+ "line.split() is: \n",
+ "['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.']\n",
+ "line is: \n",
+ "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.\n",
+ "\n",
+ "line.split() is: \n",
+ "['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.']\n",
+ "line is: \n",
+ "\n",
+ "\n",
+ "line.split() is: \n",
+ "[]\n",
+ "line is: \n",
+ "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.\n",
+ "\n",
+ "line.split() is: \n",
+ "['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.']\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "Counter({'\"blown': 1,\n",
+ " '.': 1,\n",
+ " '100': 1,\n",
+ " '18,000': 1,\n",
+ " '1871,': 1,\n",
+ " '1977,': 1,\n",
+ " '2,400': 1,\n",
+ " 'A': 1,\n",
+ " 'Again,': 1,\n",
+ " 'Americans': 1,\n",
+ " 'And': 1,\n",
+ " 'At': 1,\n",
+ " 'Because': 1,\n",
+ " 'Beverly': 1,\n",
+ " 'But': 2,\n",
+ " 'Chicago': 1,\n",
+ " 'Club': 1,\n",
+ " 'Fire': 1,\n",
+ " 'Fires': 1,\n",
+ " 'For': 3,\n",
+ " 'Great': 1,\n",
+ " 'He': 1,\n",
+ " 'Hill': 1,\n",
+ " 'His': 1,\n",
+ " 'However,': 1,\n",
+ " 'In': 2,\n",
+ " 'Kentucky': 1,\n",
+ " 'Men': 1,\n",
+ " 'Naturally': 1,\n",
+ " 'Norwegian': 1,\n",
+ " 'Often': 1,\n",
+ " 'Other': 1,\n",
+ " 'Peshtigo,': 1,\n",
+ " 'Safety': 1,\n",
+ " 'States': 2,\n",
+ " 'Supper': 1,\n",
+ " 'That': 1,\n",
+ " 'These': 1,\n",
+ " 'They': 4,\n",
+ " 'United': 2,\n",
+ " 'Why?': 1,\n",
+ " 'Wisconsin.': 1,\n",
+ " 'With': 1,\n",
+ " 'You': 1,\n",
+ " 'a': 15,\n",
+ " 'action.': 1,\n",
+ " 'actresses': 1,\n",
+ " 'actually': 1,\n",
+ " 'all': 1,\n",
+ " 'also': 1,\n",
+ " 'although': 1,\n",
+ " 'and': 5,\n",
+ " 'another': 3,\n",
+ " 'any': 1,\n",
+ " 'are': 8,\n",
+ " 'as': 3,\n",
+ " 'at': 1,\n",
+ " 'battle': 1,\n",
+ " 'been': 1,\n",
+ " 'begin': 1,\n",
+ " 'below.': 1,\n",
+ " 'boxes': 1,\n",
+ " 'building.': 1,\n",
+ " 'buildings': 1,\n",
+ " 'but': 3,\n",
+ " 'called': 1,\n",
+ " 'cardboard': 1,\n",
+ " 'careful': 1,\n",
+ " 'cars': 1,\n",
+ " 'catch': 1,\n",
+ " 'chairs': 1,\n",
+ " 'chairs,': 1,\n",
+ " 'chairs.': 1,\n",
+ " 'cliff': 1,\n",
+ " 'country': 1,\n",
+ " 'course': 1,\n",
+ " 'covered': 1,\n",
+ " 'crash': 2,\n",
+ " 'crashes': 1,\n",
+ " 'dangerous': 2,\n",
+ " 'dead.': 1,\n",
+ " 'dead\\xef\\xbc\\x81Of': 1,\n",
+ " 'death': 1,\n",
+ " 'decades': 1,\n",
+ " 'degree': 1,\n",
+ " 'depends': 2,\n",
+ " 'destroy': 1,\n",
+ " 'did': 2,\n",
+ " 'died': 1,\n",
+ " 'do': 3,\n",
+ " 'dress': 1,\n",
+ " 'edge': 1,\n",
+ " 'empty': 1,\n",
+ " 'enough.': 1,\n",
+ " 'even': 3,\n",
+ " 'example,': 3,\n",
+ " 'experts': 1,\n",
+ " 'explosion': 1,\n",
+ " 'failed': 1,\n",
+ " 'fall': 3,\n",
+ " 'falls': 1,\n",
+ " 'fast': 1,\n",
+ " 'feet': 2,\n",
+ " 'fight': 1,\n",
+ " 'fight.': 1,\n",
+ " 'film': 1,\n",
+ " 'fire': 2,\n",
+ " 'fire,': 1,\n",
+ " 'fire.': 1,\n",
+ " 'fires': 1,\n",
+ " 'fists.': 1,\n",
+ " 'for': 4,\n",
+ " 'four': 1,\n",
+ " 'from': 2,\n",
+ " 'get': 1,\n",
+ " 'glass': 1,\n",
+ " 'goes': 1,\n",
+ " 'ground': 2,\n",
+ " 'half': 1,\n",
+ " 'hard': 1,\n",
+ " 'hard.': 1,\n",
+ " 'has': 4,\n",
+ " 'have': 1,\n",
+ " 'having': 1,\n",
+ " 'he': 5,\n",
+ " 'heads': 1,\n",
+ " 'high': 3,\n",
+ " 'high.': 1,\n",
+ " 'hit': 2,\n",
+ " 'hitting': 1,\n",
+ " 'hurt.': 1,\n",
+ " 'in': 8,\n",
+ " 'indifference': 1,\n",
+ " 'injured,': 1,\n",
+ " 'is': 6,\n",
+ " \"isn't\": 2,\n",
+ " 'it': 3,\n",
+ " 'jump': 2,\n",
+ " 'just': 2,\n",
+ " 'kill': 1,\n",
+ " 'killed.': 2,\n",
+ " 'lead': 1,\n",
+ " 'lives.': 1,\n",
+ " 'living.': 1,\n",
+ " 'longer': 3,\n",
+ " 'luck': 1,\n",
+ " 'made': 3,\n",
+ " 'mattress': 1,\n",
+ " 'men': 5,\n",
+ " 'moment.': 1,\n",
+ " 'money': 1,\n",
+ " 'more': 1,\n",
+ " 'most': 1,\n",
+ " 'moving': 1,\n",
+ " 'neither': 1,\n",
+ " 'night': 1,\n",
+ " 'no': 3,\n",
+ " 'nor': 1,\n",
+ " 'not': 2,\n",
+ " 'nowadays': 1,\n",
+ " 'of': 16,\n",
+ " 'often': 1,\n",
+ " 'on': 6,\n",
+ " 'one': 5,\n",
+ " 'only': 1,\n",
+ " 'only.': 1,\n",
+ " 'open,': 1,\n",
+ " 'or': 2,\n",
+ " 'out': 2,\n",
+ " 'over': 2,\n",
+ " 'paid': 1,\n",
+ " 'parachute': 1,\n",
+ " 'people,': 1,\n",
+ " 'perform': 2,\n",
+ " 'problem': 1,\n",
+ " 'profession': 1,\n",
+ " 'professionals.': 1,\n",
+ " 'progress.': 1,\n",
+ " 'rates': 1,\n",
+ " 'really': 1,\n",
+ " 'requires': 1,\n",
+ " 'right': 1,\n",
+ " 'risks,': 1,\n",
+ " 's': 1,\n",
+ " 'same': 1,\n",
+ " 'say': 1,\n",
+ " 'say,': 1,\n",
+ " 'scene,': 1,\n",
+ " 'screen.': 1,\n",
+ " 'see': 1,\n",
+ " 'seriously': 2,\n",
+ " 'sides': 1,\n",
+ " 'since': 1,\n",
+ " 'skied': 1,\n",
+ " 'skill': 1,\n",
+ " 'so': 1,\n",
+ " 'soft': 1,\n",
+ " 'some': 3,\n",
+ " 'sometimes': 1,\n",
+ " 'soon': 1,\n",
+ " 'sort,': 1,\n",
+ " 'spite': 1,\n",
+ " 'start': 1,\n",
+ " 'still': 1,\n",
+ " 'stuntgirls': 1,\n",
+ " \"stuntman'\": 1,\n",
+ " 'stuntman,': 1,\n",
+ " 'stuntmen': 1,\n",
+ " 'stuntmen.': 1,\n",
+ " 'success': 1,\n",
+ " 'successes,': 1,\n",
+ " 'such': 1,\n",
+ " 'sugar!But': 1,\n",
+ " 'take': 1,\n",
+ " 'technology,': 1,\n",
+ " 'than': 2,\n",
+ " 'that': 1,\n",
+ " 'the': 23,\n",
+ " 'their': 4,\n",
+ " 'there': 1,\n",
+ " 'they': 10,\n",
+ " 'things': 1,\n",
+ " 'thirty': 1,\n",
+ " 'this': 3,\n",
+ " 'thousand': 1,\n",
+ " 'through': 2,\n",
+ " 'timing.': 1,\n",
+ " 'to': 8,\n",
+ " 'tool.': 1,\n",
+ " 'town': 1,\n",
+ " 'training.': 1,\n",
+ " 'trains,': 1,\n",
+ " 'trick': 1,\n",
+ " 'tricks.There': 1,\n",
+ " 'two': 2,\n",
+ " 'until': 1,\n",
+ " 'up': 1,\n",
+ " 'up\"': 1,\n",
+ " 'was': 1,\n",
+ " 'watching': 1,\n",
+ " 'way': 1,\n",
+ " 'ways,': 1,\n",
+ " 'well': 1,\n",
+ " 'when': 4,\n",
+ " 'which': 1,\n",
+ " 'who': 2,\n",
+ " 'will': 1,\n",
+ " 'window': 1,\n",
+ " 'windows': 1,\n",
+ " 'windows,': 1,\n",
+ " 'with': 5,\n",
+ " 'women': 1,\n",
+ " 'wood': 1,\n",
+ " 'work': 1,\n",
+ " 'work,': 1,\n",
+ " 'work.': 1,\n",
+ " 'world.': 1,\n",
+ " 'worst': 1,\n",
+ " 'you': 1})"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "from collections import Counter\n",
+ "#import re\n",
+ "\n",
+ "word_dict = Counter()\n",
+ "# with will automaticlly close your file\n",
+ "with open('text.txt', 'r') as file:\n",
+ " for line in file:\n",
+ " print \"line is: \\n\", line\n",
+ " print \"line.split() is: \\n\", line.split()\n",
+ " word_dict.update(line.split())\n",
+ "word_dict"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BrambleXu/play4/play4_counter.py b/BrambleXu/play4/play4_counter.py
new file mode 100644
index 00000000..9a8a2010
--- /dev/null
+++ b/BrambleXu/play4/play4_counter.py
@@ -0,0 +1,37 @@
+# -*- coding:utf-8 -*-
+#**第 0004 题:**任一个英文的纯文本文件,统计其中的单词出现的个数。
+'''
+In this file, I want to count how many time each word showed in a text
+function:
+clean_file: input is the file path, output is a list contain every words in the file.
+A word may show many time.
+like this -> ['This', 'module', 'implements', 'specialized', 'container', 'datatypes', 'providing', 'alternatives', 'to', 'Python\xe2\x80\x99s', 'general', 'purpose', 'builtin', 'containers', 'dict', 'list', 'set', 'and', 'tuple', 'In', 'addition', 'to', 'the', 'concrete', 'container', 'classes', 'the', 'collections', 'module', 'provides', 'abstract', 'base', 'classes', 'that', 'can', 'be', 'used', 'to', 'test', 'whether', 'a', 'class', 'provides', 'a', 'particular', 'interface', 'for', 'example', 'whether', 'it', 'is', 'hashable', 'or', 'a', 'mapping', 'In', 'some', 'ways', 'the']
+
+count_words: use Counter class to get a dict telling us how many time a word showed
+
+'''
+
+import string # used to clean the file
+from collections import Counter
+#import re
+
+def count_words(file_path):
+ processed_file = clean_file(file_path)
+ #print processed_file
+ word_dict = Counter(processed_file)
+ print word_dict
+
+def clean_file(file_path):
+ with open(file_path, 'r') as f:
+ #i = 0
+ file_as_list = []
+ for line in f.readlines():
+ if line != "\n":
+ #print i
+ file_as_list.extend(line.strip().translate(None, string.punctuation).split().lower())
+ return file_as_list
+
+if __name__ == '__main__':
+ counts = count_words('text.txt')
+ #print "the number of words in the file is: %s" % counts
+ #print "the number of words in the file is: %s" % counts.most_common(10)
diff --git a/BrambleXu/play4/play4_re.py b/BrambleXu/play4/play4_re.py
new file mode 100644
index 00000000..96a9e5e6
--- /dev/null
+++ b/BrambleXu/play4/play4_re.py
@@ -0,0 +1,14 @@
+# -*- coding:utf-8 -*-
+#**第 0004 题:**任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+import re
+
+def count_words(file_path):
+ f = open(file_path, 'rb')
+ text = f.read()
+ words = re.findall(r'[a-zA-Z0-9]+', text)
+ return len(words)
+
+if __name__ == '__main__':
+ count = count_words('text.txt')
+ print "the number of words in the file is: %s" % count
diff --git a/BrambleXu/play4/test.ipynb b/BrambleXu/play4/test.ipynb
new file mode 100644
index 00000000..792e0ea5
--- /dev/null
+++ b/BrambleXu/play4/test.ipynb
@@ -0,0 +1,275 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "line is: This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple.\n",
+ "\n",
+ "line.split() is: \n",
+ "['This', 'module', 'implements', 'specialized', 'container', 'datatypes', 'providing', 'alternatives', 'to', 'Python\\xe2\\x80\\x99s', 'general', 'purpose', 'built-in', 'containers,', 'dict,', 'list,', 'set,', 'and', 'tuple.']\n",
+ " \n",
+ "line is: \n",
+ "\n",
+ "line.split() is: \n",
+ "[]\n",
+ " \n",
+ "line is: In addition to the concrete container classes, the collections module provides abstract base classes that can be used to test whether a class provides a particular interface, for example, whether it is hashable or a mapping.\n",
+ "\n",
+ "line.split() is: \n",
+ "['In', 'addition', 'to', 'the', 'concrete', 'container', 'classes,', 'the', 'collections', 'module', 'provides', 'abstract', 'base', 'classes', 'that', 'can', 'be', 'used', 'to', 'test', 'whether', 'a', 'class', 'provides', 'a', 'particular', 'interface,', 'for', 'example,', 'whether', 'it', 'is', 'hashable', 'or', 'a', 'mapping.']\n",
+ " \n",
+ "line is: \n",
+ "\n",
+ "line.split() is: \n",
+ "[]\n",
+ " \n",
+ "line is: 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.\n",
+ "\n",
+ "line.split() is: \n",
+ "['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.']\n",
+ " \n",
+ "line is: \n",
+ "\n",
+ "line.split() is: \n",
+ "[]\n",
+ " \n",
+ "line is: 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.\n",
+ "\n",
+ "line.split() is: \n",
+ "['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.']\n",
+ " \n"
+ ]
+ }
+ ],
+ "source": [
+ "from collections import Counter\n",
+ "#import re\n",
+ "\n",
+ "word_dict = Counter()\n",
+ "# with will automaticlly close your file\n",
+ "with open('text.txt', 'r') as file:\n",
+ " for line in file:\n",
+ " print \"line is: \", line\n",
+ " print \"line.split() is: \\n\", line.split()\n",
+ " print \" \"\n",
+ " word_dict.update(line.split())\n",
+ "#word_dict"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "line is: \n",
+ "This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple.\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "['This', 'module', 'implements', 'specialized', 'container', 'datatypes', 'providing', 'alternatives', 'to', 'Python\\xe2\\x80\\x99s', 'general', 'purpose', 'builtin', 'containers', 'dict', 'list', 'set', 'and', 'tuple']\n",
+ "line is: \n",
+ "\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "[]\n",
+ "line is: \n",
+ "In addition to the concrete container classes, the collections module provides abstract base classes that can be used to test whether a class provides a particular interface, for example, whether it is hashable or a mapping.\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "['In', 'addition', 'to', 'the', 'concrete', 'container', 'classes', 'the', 'collections', 'module', 'provides', 'abstract', 'base', 'classes', 'that', 'can', 'be', 'used', 'to', 'test', 'whether', 'a', 'class', 'provides', 'a', 'particular', 'interface', 'for', 'example', 'whether', 'it', 'is', 'hashable', 'or', 'a', 'mapping']\n",
+ "line is: \n",
+ "\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "[]\n",
+ "line is: \n",
+ "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.\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "['In', 'some', 'ways', 'the', 'United', 'States', 'has', 'made', 'some', 'progress', 'Fires', 'no', 'longer', 'destroy', '18000', 'buildings', 'as', 'they', 'did', 'in', 'the', 'Great', 'Chicago', 'Fire', 'of', '1871', 'or', 'kill', 'half', 'a', 'town', 'of', '2400', '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']\n",
+ "line is: \n",
+ "\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "[]\n",
+ "line is: \n",
+ "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.\n",
+ "line.translate(None, string.punctuation) is: \n",
+ "['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']\n"
+ ]
+ }
+ ],
+ "source": [
+ "import string\n",
+ "with open('text.txt', 'r') as file:\n",
+ " for line in file:\n",
+ " print \"line is: \\n\", line.rstrip()\n",
+ " print \"line.translate(None, string.punctuation) is: \\n\", line.rstrip().translate(None, string.punctuation).split()\n",
+ " #print \"line.split() is: \\n\", line.split()\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "this module implements specialized container datatypes providing alternatives to python’s general purpose builtin containers dict list set and tuple\n",
+ "in addition to the concrete container classes the collections module provides abstract base classes that can be used to test whether a class provides a particular interface for example whether it is hashable or a mapping\n",
+ "in some ways the united states has made some progress fires no longer destroy 18000 buildings as they did in the great chicago fire of 1871 or kill half a town of 2400 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\n",
+ "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\n"
+ ]
+ }
+ ],
+ "source": [
+ "import string\n",
+ "\n",
+ "with open('text.txt', 'r') as f:\n",
+ " #i = 0\n",
+ " for line in f.readlines():\n",
+ " if line != \"\\n\":\n",
+ " #print i\n",
+ " print line.strip().translate(None, string.punctuation).lower()\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "the number of words in the file is: 172\n"
+ ]
+ }
+ ],
+ "source": [
+ "%run play4_re.py"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "source": [
+ "i = 0\n",
+ "with open('text.txt', 'r') as f:\n",
+ " for line in f.read():\n",
+ " #print line.strip('\\n')\n",
+ " print line\n",
+ " i += 1\n",
+ " print(line.strip('\\n'))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "import fileinput\n",
+ "for line in fileinput.FileInput('text.txt',inplace=1):\n",
+ " if line.rstrip():\n",
+ " print line"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Counter({'the': 11, 'in': 6, 'a': 6, 'of': 4, 'to': 3, 'has': 3, 'fire': 3, 'United': 2, 'they': 2, 'did': 2, 'some': 2, 'module': 2, 'container': 2, 'provides': 2, 'or': 2, 'is': 2, 'that': 2, 'than': 2, 'whether': 2, 'classes': 2, 'it': 2, 'as': 2, 'States': 2, 'In': 2, 'just': 1, 'money': 1, 'alternatives': 1, 'four': 1, 'kill': 1, 'Hill': 1, 'still': 1, 'death': 1, 'such': 1, 'dict': 1, '2400': 1, 'decades': 1, 'worst': 1, 'half': 1, 'not': 1, 'world': 1, '18000': 1, 'nor': 1, 'list': 1, 'night': 1, 'set': 1, 'people': 1, 'buildings': 1, 'fires': 1, 'even': 1, 'for': 1, 'ways': 1, 'since': 1, 'seriously': 1, 'progress': 1, 'neither': 1, 'be': 1, 'This': 1, 'base': 1, 'interface': 1, '100': 1, 'hashable': 1, 'successes': 1, 'concrete': 1, 'Americans': 1, 'enough': 1, 'one': 1, 'Safety': 1, 'But': 1, '1871': 1, 'addition': 1, 'Python\\xe2\\x80\\x99s': 1, 'been': 1, 'rates': 1, 'Supper': 1, 'collections': 1, 'containers': 1, 'more': 1, 'implements': 1, 'but': 1, 'particular': 1, 'Beverly': 1, 'with': 1, 'town': 1, 'made': 1, 'indifference': 1, 'say': 1, 'will': 1, 'Fires': 1, 'can': 1, 'country': 1, 'problem': 1, 'providing': 1, 'specialized': 1, 'example': 1, 'and': 1, 'Chicago': 1, 'abstract': 1, 'general': 1, 'Other': 1, 'experts': 1, 'technology': 1, 'no': 1, 'Club': 1, 'tuple': 1, 'same': 1, 'builtin': 1, 'take': 1, 'test': 1, 'destroy': 1, 'Great': 1, 'used': 1, 'mapping': 1, 'Kentucky': 1, 'purpose': 1, 'Wisconsin': 1, 'datatypes': 1, 'class': 1, 'died': 1, 'Peshtigo': 1, 'longer': 1, '1977': 1, 'Fire': 1})\n"
+ ]
+ }
+ ],
+ "source": [
+ "%run play4_counter.py"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BrambleXu/play4/text.txt b/BrambleXu/play4/text.txt
new file mode 100644
index 00000000..0c89d5e9
--- /dev/null
+++ b/BrambleXu/play4/text.txt
@@ -0,0 +1,8 @@
+This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple.
+
+In addition to the concrete container classes, the collections module provides abstract base classes that can be used to test whether a class provides a particular interface, for example, whether it is hashable or a mapping.
+
+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.
+
diff --git a/BrambleXu/play5/.ipynb_checkpoints/play5-checkpoint.ipynb b/BrambleXu/play5/.ipynb_checkpoints/play5-checkpoint.ipynb
new file mode 100644
index 00000000..286dcb3d
--- /dev/null
+++ b/BrambleXu/play5/.ipynb_checkpoints/play5-checkpoint.ipynb
@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BrambleXu/play5/anime/Best-Cool-girls.jpg b/BrambleXu/play5/anime/Best-Cool-girls.jpg
new file mode 100644
index 00000000..ae6daa3d
Binary files /dev/null and b/BrambleXu/play5/anime/Best-Cool-girls.jpg differ
diff --git a/BrambleXu/play5/anime/Best-Cool-girls.thum.jpg b/BrambleXu/play5/anime/Best-Cool-girls.thum.jpg
new file mode 100644
index 00000000..3b1245cc
Binary files /dev/null and b/BrambleXu/play5/anime/Best-Cool-girls.thum.jpg differ
diff --git a/BrambleXu/play5/anime/Cool-Anime.jpg b/BrambleXu/play5/anime/Cool-Anime.jpg
new file mode 100644
index 00000000..76046c11
Binary files /dev/null and b/BrambleXu/play5/anime/Cool-Anime.jpg differ
diff --git a/BrambleXu/play5/anime/Cool-Anime.thum.jpg b/BrambleXu/play5/anime/Cool-Anime.thum.jpg
new file mode 100644
index 00000000..d81c511d
Binary files /dev/null and b/BrambleXu/play5/anime/Cool-Anime.thum.jpg differ
diff --git a/BrambleXu/play5/anime/anime-girls.jpg b/BrambleXu/play5/anime/anime-girls.jpg
new file mode 100644
index 00000000..39bb5c0e
Binary files /dev/null and b/BrambleXu/play5/anime/anime-girls.jpg differ
diff --git a/BrambleXu/play5/anime/anime-girls.thum.jpg b/BrambleXu/play5/anime/anime-girls.thum.jpg
new file mode 100644
index 00000000..45ff9b71
Binary files /dev/null and b/BrambleXu/play5/anime/anime-girls.thum.jpg differ
diff --git a/BrambleXu/play5/output/Best-Cool-girls.jpg b/BrambleXu/play5/output/Best-Cool-girls.jpg
new file mode 100644
index 00000000..3b1245cc
Binary files /dev/null and b/BrambleXu/play5/output/Best-Cool-girls.jpg differ
diff --git a/BrambleXu/play5/output/Best-Cool-girls.thum.jpg b/BrambleXu/play5/output/Best-Cool-girls.thum.jpg
new file mode 100644
index 00000000..187e7211
Binary files /dev/null and b/BrambleXu/play5/output/Best-Cool-girls.thum.jpg differ
diff --git a/BrambleXu/play5/output/Cool-Anime.jpg b/BrambleXu/play5/output/Cool-Anime.jpg
new file mode 100644
index 00000000..d81c511d
Binary files /dev/null and b/BrambleXu/play5/output/Cool-Anime.jpg differ
diff --git a/BrambleXu/play5/output/Cool-Anime.thum.jpg b/BrambleXu/play5/output/Cool-Anime.thum.jpg
new file mode 100644
index 00000000..c4b55c9f
Binary files /dev/null and b/BrambleXu/play5/output/Cool-Anime.thum.jpg differ
diff --git a/BrambleXu/play5/output/anime-girls.jpg b/BrambleXu/play5/output/anime-girls.jpg
new file mode 100644
index 00000000..45ff9b71
Binary files /dev/null and b/BrambleXu/play5/output/anime-girls.jpg differ
diff --git a/BrambleXu/play5/output/anime-girls.thum.jpg b/BrambleXu/play5/output/anime-girls.thum.jpg
new file mode 100644
index 00000000..26cb9e9b
Binary files /dev/null and b/BrambleXu/play5/output/anime-girls.thum.jpg differ
diff --git a/BrambleXu/play5/output/image-slider2.jpg b/BrambleXu/play5/output/image-slider2.jpg
new file mode 100644
index 00000000..f4769c99
Binary files /dev/null and b/BrambleXu/play5/output/image-slider2.jpg differ
diff --git a/BrambleXu/play5/output/image-slider2.thum.jpg b/BrambleXu/play5/output/image-slider2.thum.jpg
new file mode 100644
index 00000000..eb4e149b
Binary files /dev/null and b/BrambleXu/play5/output/image-slider2.thum.jpg differ
diff --git a/BrambleXu/play5/output/img_lights.jpg b/BrambleXu/play5/output/img_lights.jpg
new file mode 100644
index 00000000..86d61f42
Binary files /dev/null and b/BrambleXu/play5/output/img_lights.jpg differ
diff --git a/BrambleXu/play5/output/img_lights.thum.jpg b/BrambleXu/play5/output/img_lights.thum.jpg
new file mode 100644
index 00000000..fc39c805
Binary files /dev/null and b/BrambleXu/play5/output/img_lights.thum.jpg differ
diff --git a/BrambleXu/play5/output/trolltunga.jpg b/BrambleXu/play5/output/trolltunga.jpg
new file mode 100644
index 00000000..595ca06f
Binary files /dev/null and b/BrambleXu/play5/output/trolltunga.jpg differ
diff --git a/BrambleXu/play5/output/trolltunga.thum.jpg b/BrambleXu/play5/output/trolltunga.thum.jpg
new file mode 100644
index 00000000..e99e14b6
Binary files /dev/null and b/BrambleXu/play5/output/trolltunga.thum.jpg differ
diff --git a/BrambleXu/play5/play5.ipynb b/BrambleXu/play5/play5.ipynb
new file mode 100644
index 00000000..bb8bbf9d
--- /dev/null
+++ b/BrambleXu/play5/play5.ipynb
@@ -0,0 +1,446 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 关于分辨率\n",
+ "先扫一下盲:http://www.jianshu.com/p/c3387bcc4f6e。\n",
+ "\n",
+ "我们所说的这个5.2英寸是手机屏幕对角线的长度。\n",
+ "\n",
+ "分辨率1920px*1080px的意思就是,在这个华为荣耀7的5.2英寸屏幕上,在竖向的高度上有1920个像素块,在横向的宽度上有1080个像素块。\n",
+ "\n",
+ "我们可以这么理解屏幕像素密度,即在一个对角线长度为1英寸的正方形内所拥有的像素数。\n",
+ "# os\n",
+ "## os.path.exists\n",
+ "[python os.path模块常用方法详解](http://wangwei007.blog.51cto.com/68019/1104940)\n",
+ "\n",
+ "`os.path.exists(path) `\n",
+ "\n",
+ "如果path存在,返回True;如果path不存在,返回False。 \n",
+ "## Python os.walk的用法与举例\n",
+ "[链接](http://blog.csdn.net/bagboy_taobao_com/article/details/8938126)\n",
+ "\n",
+ "os.walk(top, topdown=True, onerror=None, followlinks=False) \n",
+ "\n",
+ "可以得到一个三元tupple(dirpath, dirnames, filenames), \n",
+ "\n",
+ "第一个为起始路径,第二个为起始路径下的文件夹,第三个是起始路径下的文件。\n",
+ "\n",
+ "dirpath 是一个string,代表目录的路径,\n",
+ "\n",
+ "dirnames 是一个list,包含了dirpath下所有子目录的名字。\n",
+ "\n",
+ "filenames 是一个list,包含了非目录文件的名字。\n",
+ "\n",
+ "这些名字不包含路径信息,如果需要得到全路径,需要使用os.path.join(dirpath, name).\n",
+ "\n",
+ "## Linux中的绝对路径(Absolute Pathname)与相对路径(Relative Pathnames)\n",
+ "\n",
+ "\n",
+ "绝对路径就是文件的真正存在的路径,是指从硬盘的根目录(盘符)开始,进行一级级目录指向文件。\n",
+ "\n",
+ "相对路径就是以当前文件为基准进行一级级目录指向被引用的资源文件。"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "JPEG (100, 62) RGB\n",
+ "JPEG (100, 30) RGB\n",
+ "Done!\n"
+ ]
+ }
+ ],
+ "source": [
+ "import os\n",
+ "import glob\n",
+ "from PIL import Image\n",
+ "\n",
+ "def thumbnail_pic(path):\n",
+ " a = glob.glob(r'*.jpg')\n",
+ " for x in a:\n",
+ " name = os.path.join(path, x)\n",
+ " im = Image.open(name)\n",
+ " im.thumbnail((1136, 640))\n",
+ " print(im.format, im.size, im.mode)\n",
+ " im.save(name, 'JPEG')\n",
+ " print('Done!')\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ " path = '.'\n",
+ " thumbnail_pic(path)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "img_lights.jpg\n",
+ "anime/anime-girls.jpg\n",
+ "anime/Best-Cool-girls.jpg\n",
+ "anime/Cool-Anime.jpg\n",
+ "test_pic/image-slider2.jpg\n",
+ "test_pic/trolltunga.jpg\n"
+ ]
+ }
+ ],
+ "source": [
+ "import glob\n",
+ "\n",
+ "for filename in glob.glob('**/*.jpg', recursive=True):\n",
+ " print(filename)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "x is \n",
+ " anime/anime-girls.jpg\n",
+ "the join path is : \n",
+ " ./anime/anime-girls.jpg\n",
+ "JPEG (853, 640) RGB\n",
+ "JPEG (853, 640) RGB\n",
+ "x is \n",
+ " anime/Best-Cool-girls.jpg\n",
+ "the join path is : \n",
+ " ./anime/Best-Cool-girls.jpg\n",
+ "JPEG (620, 349) RGB\n",
+ "JPEG (620, 349) RGB\n",
+ "x is \n",
+ " anime/Cool-Anime.jpg\n",
+ "the join path is : \n",
+ " ./anime/Cool-Anime.jpg\n",
+ "JPEG (620, 388) RGB\n",
+ "JPEG (620, 388) RGB\n",
+ "x is \n",
+ " test_pic/image-slider2.jpg\n",
+ "the join path is : \n",
+ " ./test_pic/image-slider2.jpg\n",
+ "JPEG (1000, 500) RGB\n",
+ "JPEG (1000, 500) RGB\n",
+ "x is \n",
+ " test_pic/img_lights.jpg\n",
+ "the join path is : \n",
+ " ./test_pic/img_lights.jpg\n",
+ "JPEG (600, 400) RGB\n",
+ "JPEG (600, 400) RGB\n",
+ "x is \n",
+ " test_pic/trolltunga.jpg\n",
+ "the join path is : \n",
+ " ./test_pic/trolltunga.jpg\n",
+ "JPEG (1000, 300) RGB\n",
+ "JPEG (1000, 300) RGB\n",
+ "Done!\n"
+ ]
+ }
+ ],
+ "source": [
+ "import os\n",
+ "import glob\n",
+ "from PIL import Image\n",
+ "\n",
+ "def thumbnail_pic(path):\n",
+ " for x in glob.glob('**/*.jpg', recursive=True):\n",
+ " print (\"x is \\n \", x)\n",
+ " name = os.path.join(path, x)\n",
+ " print (\"the join path is : \\n\", name)\n",
+ " im = Image.open(name)\n",
+ " print (im.format, im.size, im.mode)\n",
+ " im.copy().thumbnail((1136, 640))\n",
+ " print (im.format, im.size, im.mode)\n",
+ " im.save(\"%s/output/%\"/, 'JPEG')\n",
+ "\n",
+ " print('Done!')\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ " path = '.'\n",
+ " thumbnail_pic(path)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# 两种情况\n",
+ "## 把resize的image保存到和原image同一目录下\n",
+ "\n",
+ "http://pillow.readthedocs.io/en/3.1.x/reference/Image.html#create-thumbnails\n",
+ "这个直接通过thumbnail()这个方法来做到resize。\n",
+ "\n",
+ "在python3.5中,glob.glob通过**来递归得寻找所有符合.jpg的文件,比起2.7来说确实方便很多。\n",
+ "\n",
+ "另外为了保存到和原image同一目录下,我们要`os.path.splitext(path) `\n",
+ "分离文件名与扩展名;默认返回(fname,fextension)元组,可做分片操作. \n",
+ "下面的file,ext里,file用来当做绝对路径,最后用`im.save( file + \".thum.jpg\")`。其中.thum.jpg只是为了方便我们知道哪些文件是重新制作的,也可以直接用'.jpg' \n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "anime/anime-girls\n",
+ ".jpg\n",
+ "anime/anime-girls.thum\n",
+ ".jpg\n",
+ "anime/Best-Cool-girls\n",
+ ".jpg\n",
+ "anime/Best-Cool-girls.thum\n",
+ ".jpg\n",
+ "anime/Cool-Anime\n",
+ ".jpg\n",
+ "anime/Cool-Anime.thum\n",
+ ".jpg\n",
+ "output/anime-girls\n",
+ ".jpg\n",
+ "output/anime-girls.thum\n",
+ ".jpg\n",
+ "output/Best-Cool-girls\n",
+ ".jpg\n",
+ "output/Best-Cool-girls.thum\n",
+ ".jpg\n",
+ "output/Cool-Anime\n",
+ ".jpg\n",
+ "output/Cool-Anime.thum\n",
+ ".jpg\n",
+ "output/image-slider2\n",
+ ".jpg\n",
+ "output/image-slider2.thum\n",
+ ".jpg\n",
+ "output/img_lights\n",
+ ".jpg\n",
+ "output/img_lights.thum\n",
+ ".jpg\n",
+ "output/trolltunga\n",
+ ".jpg\n",
+ "output/trolltunga.thum\n",
+ ".jpg\n",
+ "test_pic/image-slider2\n",
+ ".jpg\n",
+ "test_pic/image-slider2.thum\n",
+ ".jpg\n",
+ "test_pic/img_lights\n",
+ ".jpg\n",
+ "test_pic/img_lights.thum\n",
+ ".jpg\n",
+ "test_pic/trolltunga\n",
+ ".jpg\n",
+ "test_pic/trolltunga.thum\n",
+ ".jpg\n"
+ ]
+ }
+ ],
+ "source": [
+ "from PIL import Image\n",
+ "import glob, os\n",
+ "\n",
+ "size = 100, 100\n",
+ "\n",
+ "for infile in glob.glob(\"**/*.jpg\"):\n",
+ " file, ext = os.path.splitext(infile)\n",
+ " print (file)\n",
+ " print (ext)\n",
+ " im = Image.open(infile)\n",
+ " im.thumbnail(size)\n",
+ " im.save( file + \".thum.jpg\")\n",
+ " #print (im.format, im.size, im.mode)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 把resize的image保存到同一目录下\n",
+ "\n",
+ "另外为了保存到和原image同一目录下,我们要\n",
+ "`os.path.split(path) `\n",
+ "\n",
+ "将path分割成目录和文件名二元组返回。 \n",
+ " ```\n",
+ ">>> os.path.split('c:\\\\csv\\\\test.csv') \n",
+ "('c:\\\\csv', 'test.csv') \n",
+ "```\n",
+ "\n",
+ "下面的file,ext里,file用来当做绝对路径,最后用`im.save( \"./output/\" + ext)`。其中\"./output/\"使我们指定的文件目录,最后ext是image原始的文件名"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "anime\n",
+ "anime-girls.jpg\n",
+ "anime\n",
+ "anime-girls.thum.jpg\n",
+ "anime\n",
+ "Best-Cool-girls.jpg\n",
+ "anime\n",
+ "Best-Cool-girls.thum.jpg\n",
+ "anime\n",
+ "Cool-Anime.jpg\n",
+ "anime\n",
+ "Cool-Anime.thum.jpg\n",
+ "test_pic\n",
+ "image-slider2.jpg\n",
+ "test_pic\n",
+ "image-slider2.thum.jpg\n",
+ "test_pic\n",
+ "img_lights.jpg\n",
+ "test_pic\n",
+ "img_lights.thum.jpg\n",
+ "test_pic\n",
+ "trolltunga.jpg\n",
+ "test_pic\n",
+ "trolltunga.thum.jpg\n"
+ ]
+ }
+ ],
+ "source": [
+ "from PIL import Image\n",
+ "import glob, os\n",
+ "\n",
+ "size = 100, 100\n",
+ "\n",
+ "for infile in glob.glob(\"**/*.jpg\"):\n",
+ " file, ext = os.path.split(infile)\n",
+ " print (file)\n",
+ " print (ext)\n",
+ " im = Image.open(infile)\n",
+ " im.thumbnail(size)\n",
+ " im.save( \"./output/\" + ext)\n",
+ " #print (im.format, im.size, im.mode)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## 运行error\n",
+ "\n",
+ "```\n",
+ "# -*- coding:utf-8 -*-\n",
+ "# *第 0005 题:**你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。\n",
+ "\n",
+ "from PIL import Image\n",
+ "import glob, os\n",
+ "\n",
+ "size = 100, 100\n",
+ "\n",
+ "def thumbnail_rel(path):\n",
+ " for infile in glob.glob(\"**/*.jpg\"):\n",
+ " file, ext = os.path.splitext(infile)\n",
+ " # print (file)\n",
+ " # print (ext)\n",
+ " img = Image.open(infile)\n",
+ " img.thumbnail(size)\n",
+ " img.save( file + \".thum.jpg\")\n",
+ " #print (im.format, im.size, im.mode)\n",
+ " print ('Done!')\n",
+ "\n",
+ "def thumbnail_abs(path):\n",
+ " for infile in glob.glob(\"**/*.jpg\"):\n",
+ " file, ext = os.path.split(infile)\n",
+ " # print (file)\n",
+ " # print (ext)\n",
+ " img = Image.open(infile)\n",
+ " img.thumbnail(size)\n",
+ " img.save( path + '/output/' + ext)\n",
+ " #print (im.format, im.size, im.mode)\n",
+ " print ('Done!')\n",
+ "\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ " path = '.'\n",
+ " thumbnail_rel(path)\n",
+ " thumbnail_abs(path)\n",
+ " \n",
+ "```\n",
+ "\n",
+ "在直接用` python play5.py`的时候,出错了。\n",
+ "\n",
+ "忘了切换成python3.5的环境。\n",
+ "\n",
+ "另外我写上了path,另外`img.save( path + file + \".thum.jpg\")`. \n",
+ "出错了,把path去掉就好了,`img.save( file + \".thum.jpg\")`\n",
+ "\n",
+ "因为我在path部分写的是'.', 对于thumbnail_rel, 保存的位置就是`'.anime/XXX`,但是并没有`.anime`这个文件夹,去掉path后直接是anime就可以了。如果anime前面多一个`/`也可以。\n",
+ "\n",
+ "而对于thumbnail_abs, `./output/XXXX`是能识别的,所以没有报错\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "anaconda-cloud": {},
+ "kernelspec": {
+ "display_name": "Python [conda env:py35]",
+ "language": "python",
+ "name": "conda-env-py35-py"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.5.2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/BrambleXu/play5/play5.py b/BrambleXu/play5/play5.py
new file mode 100644
index 00000000..3da5136c
--- /dev/null
+++ b/BrambleXu/play5/play5.py
@@ -0,0 +1,35 @@
+# -*- coding:utf-8 -*-
+# *第 0005 题:**你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+
+from PIL import Image
+import glob, os
+
+size = 100, 100
+
+def thumbnail_rel(path):
+ for infile in glob.glob("**/*.jpg"):
+ file, ext = os.path.splitext(infile)
+ # print (file)
+ # print (ext)
+ img = Image.open(infile)
+ img.thumbnail(size)
+ img.save( file + ".thum.jpg")
+ #print (im.format, im.size, im.mode)
+ print ('Done!')
+
+def thumbnail_abs(path):
+ for infile in glob.glob("**/*.jpg"):
+ file, ext = os.path.split(infile)
+ # print (file)
+ # print (ext)
+ img = Image.open(infile)
+ img.thumbnail(size)
+ img.save( path + '/output/' + ext)
+ #print (im.format, im.size, im.mode)
+ print ('Done!')
+
+
+if __name__ == '__main__':
+ path = '.'
+ thumbnail_rel(path)
+ thumbnail_abs(path)
diff --git a/BrambleXu/play5/test_pic/image-slider2.jpg b/BrambleXu/play5/test_pic/image-slider2.jpg
new file mode 100644
index 00000000..4f0946a5
Binary files /dev/null and b/BrambleXu/play5/test_pic/image-slider2.jpg differ
diff --git a/BrambleXu/play5/test_pic/image-slider2.thum.jpg b/BrambleXu/play5/test_pic/image-slider2.thum.jpg
new file mode 100644
index 00000000..f4769c99
Binary files /dev/null and b/BrambleXu/play5/test_pic/image-slider2.thum.jpg differ
diff --git a/BrambleXu/play5/test_pic/img_lights.jpg b/BrambleXu/play5/test_pic/img_lights.jpg
new file mode 100644
index 00000000..fb232561
Binary files /dev/null and b/BrambleXu/play5/test_pic/img_lights.jpg differ
diff --git a/BrambleXu/play5/test_pic/img_lights.thum.jpg b/BrambleXu/play5/test_pic/img_lights.thum.jpg
new file mode 100644
index 00000000..86d61f42
Binary files /dev/null and b/BrambleXu/play5/test_pic/img_lights.thum.jpg differ
diff --git a/BrambleXu/play5/test_pic/trolltunga.jpg b/BrambleXu/play5/test_pic/trolltunga.jpg
new file mode 100644
index 00000000..f28eee6e
Binary files /dev/null and b/BrambleXu/play5/test_pic/trolltunga.jpg differ
diff --git a/BrambleXu/play5/test_pic/trolltunga.thum.jpg b/BrambleXu/play5/test_pic/trolltunga.thum.jpg
new file mode 100644
index 00000000..595ca06f
Binary files /dev/null and b/BrambleXu/play5/test_pic/trolltunga.thum.jpg differ
diff --git a/BrambleXu/play6/play6.py b/BrambleXu/play6/play6.py
new file mode 100644
index 00000000..f2d0d2b1
--- /dev/null
+++ b/BrambleXu/play6/play6.py
@@ -0,0 +1,2 @@
+# -*- coding:utf-8 -*-
+#**第 0006 题:**你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
diff --git a/DockerFan/0001/0001.py b/DockerFan/0001/0001.py
new file mode 100644
index 00000000..80fa0ce5
--- /dev/null
+++ b/DockerFan/0001/0001.py
@@ -0,0 +1,19 @@
+# -*- coding:utf-8 -*-
+#第 0001 题:**做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用**生成激活码**(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)
+
+import random, string
+
+forSelect = string.ascii_letters + "0123456789"
+
+def generate(count, length):
+ # count = 200
+ # length = 20
+
+ for x in range(count):
+ Re = ""
+ for y in range(length):
+ Re += random.choice(forSelect)
+ print(Re)
+
+if __name__ == "__main__":
+ generate(200, 20)
diff --git a/Drake-Z/0000/0000.py b/Drake-Z/0000/0000.py
new file mode 100644
index 00000000..857e7480
--- /dev/null
+++ b/Drake-Z/0000/0000.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0000 题:将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。'
+
+__author__ = 'Drake-Z'
+
+from PIL import Image, ImageDraw, ImageFont
+
+def add_num(filname, text = '4', fillcolor = (255, 0, 0)):
+ img = Image.open(filname)
+ width, height = img.size
+ myfont = ImageFont.truetype('C:/windows/fonts/Arial.ttf', size=width//8)
+ fillcolor = (255, 0, 0)
+ draw = ImageDraw.Draw(img)
+ draw.text((width-width//8, 0), text, font=myfont, fill=fillcolor)
+ img.save('1.jpg','jpeg')
+ return 0
+
+if __name__ == '__main__':
+ filname = '0.jpg'
+ text = '4'
+ fillcolor = (255, 0, 0)
+ add_num(filname, text, fillcolor)
\ No newline at end of file
diff --git a/Drake-Z/0001/0001.py b/Drake-Z/0001/0001.py
new file mode 100644
index 00000000..4d6b4925
--- /dev/null
+++ b/Drake-Z/0001/0001.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0001 题:做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)'
+
+__author__ = 'Drake-Z'
+
+import random
+
+def randChar(filename, digit=4, num=200):
+ f = open(filename, 'a')
+ for i in range(0, num):
+ for m in range(0, digit):
+ f.write(chr(random.randint(65, 90)))
+ f.write('\n')
+ f.close()
+ print('Done!')
+ return 0
+
+if __name__ == '__main__':
+ filename = 'active_code.txt'
+ digit = 4
+ num = 200
+ rndChar(filename, digit, num)
\ No newline at end of file
diff --git a/Drake-Z/0002/0002.py b/Drake-Z/0002/0002.py
new file mode 100644
index 00000000..34f28723
--- /dev/null
+++ b/Drake-Z/0002/0002.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0002 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。'
+
+__author__ = 'Drake-Z'
+
+import mysql.connector
+
+def write_to_mysql(filename):
+ conn = mysql.connector.connect(user='root', password='986535', database='test')
+ cursor = conn.cursor()
+ cursor.execute("DROP TABLE IF EXISTS user")
+ cursor.execute('create table user (id varchar(20) primary key, name varchar(20))')
+ f = open(filename, 'r').readlines()
+ for line, num in zip(f, range(1, len(f)+1)):
+ line = line[:-1] #去除\n符号
+ cursor.execute('insert into user (id, name) values (%s, %s)', [str(num), line])
+ conn.commit()
+ cursor.close()
+ return 0
+
+def search_mysql():
+ b = input('Search Active code(1-200):')
+ conn = mysql.connector.connect(user='root', password='986535', database='test')
+ cursor = conn.cursor()
+ cursor.execute('select * from user where id = %s', (b,))
+ values = cursor.fetchall()
+ print(values)
+ cursor.close()
+ conn.close()
+ return 0
+
+if __name__ == '__main__':
+ filename = 'active_code.txt'
+ write_to_mysql(filename)
+ search_mysql()
\ No newline at end of file
diff --git a/Drake-Z/0003/0003.py b/Drake-Z/0003/0003.py
new file mode 100644
index 00000000..d0ab4bf4
--- /dev/null
+++ b/Drake-Z/0003/0003.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0003 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 Redis 非关系型数据库中。'
+
+__author__ = 'Drake-Z'
+
+import redis
+
+def write_to_redis(filename):
+ r = redis.StrictRedis(host='localhost', port=6379, db=0)
+ r.flushdb()
+ f = open(filename, 'r').readlines()
+ for line, num in zip(f, range(1, len(f)+1)):
+ line = line[:-1] #去除\n符号
+ r.set(num, line)
+ return 0
+
+def search_redis():
+ b = int(input('Search Active code(1-200):'))
+ r = redis.StrictRedis(host='localhost', port=6379, db=0)
+ print(str(r.get(b),'UTF-8'))
+ return 0
+
+if __name__ == '__main__':
+ filename = 'active_code.txt'
+ write_to_redis(filename)
+ search_redis()
\ No newline at end of file
diff --git a/Drake-Z/0004/0004.py b/Drake-Z/0004/0004.py
new file mode 100644
index 00000000..9deb26b1
--- /dev/null
+++ b/Drake-Z/0004/0004.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0004 题:任一个英文的纯文本文件,统计其中的单词出现的个数。'
+
+__author__ = 'Drake-Z'
+
+import re
+
+def statistics(file_path):
+ f = open(file_path, 'r').read()
+ f = re.findall(r'[\w\-\_\.\']+', f)
+ print(len(f))
+ return 0
+
+if __name__ == '__main__':
+ file_path = 'English.txt'
+ statistics(file_path)
\ No newline at end of file
diff --git a/Drake-Z/0004/English.txt b/Drake-Z/0004/English.txt
new file mode 100644
index 00000000..197d3b49
--- /dev/null
+++ b/Drake-Z/0004/English.txt
@@ -0,0 +1,2 @@
+ConnectionPools manage a set of Connection instances. redis-py ships with two types of Connections. The default, Connection, is a normal TCP socket based connection. The UnixDomainSocketConnection allows for clients running on the same device as the server to connect via a unix domain socket.
+To use a, UnixDomainSocketConnection connection, simply pass the unix_socket_path argument, which is a string to the unix domain socket file. Additionally, make sure the unixsocket parameter is defined in your redis.conf file. It's commented out by default.
\ No newline at end of file
diff --git a/Drake-Z/0005/0005.py b/Drake-Z/0005/0005.py
new file mode 100644
index 00000000..e3d5ec85
--- /dev/null
+++ b/Drake-Z/0005/0005.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0005 题:你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率(1136x640)的大小。'
+
+__author__ = 'Drake-Z'
+
+import os
+import glob
+from PIL import Image
+
+def thumbnail_pic(path):
+ a = glob.glob(r'*.jpg')
+ for x in a:
+ name = os.path.join(path, x)
+ im = Image.open(name)
+ im.thumbnail((1136, 640))
+ print(im.format, im.size, im.mode)
+ im.save(name, 'JPEG')
+ print('Done!')
+
+if __name__ == '__main__':
+ path = '.'
+ thumbnail_pic(path)
\ No newline at end of file
diff --git a/Drake-Z/0005/ace-94.jpg b/Drake-Z/0005/ace-94.jpg
new file mode 100644
index 00000000..636d9e94
Binary files /dev/null and b/Drake-Z/0005/ace-94.jpg differ
diff --git a/Drake-Z/0006/0006.py b/Drake-Z/0006/0006.py
new file mode 100644
index 00000000..4d120596
--- /dev/null
+++ b/Drake-Z/0006/0006.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0004 题:任一个英文的纯文本文件,统计其中的单词出现的个数。'
+
+__author__ = 'Drake-Z'
+
+import os
+import re
+import glob
+from collections import OrderedDict
+
+def get_num(key_word, filename):
+ '''获得词汇出现次数'''
+ f = open(filename, 'r', encoding='utf-8').read()
+ re_zhengze = re.compile(r'[\s\,\;\.\n]{1}'+key_word+r'[\s\,\;\.\n]{1}')
+ numbers = re_zhengze.findall(f)
+ return len(numbers)
+
+def article_analysis(dirs):
+ article = glob.glob(r'*.txt')
+ dictdata = OrderedDict()
+ for m in article:
+ doc = open(m, 'r', encoding='utf-8').read()
+ doc = re.findall(r'[\w\-\_\.\']+', doc) #获得单词list
+ doc = list(map(lambda x: x.strip('.'), doc)) #去除句号
+ for n in doc:
+ dictdata[n] = get_num(n, m)
+ a = OrderedDict(sorted(dictdata.items(), key=lambda x: x[1], reverse = True)) #dict排序
+ print('在 %s 中出现次数最多的单词是:' % m)
+ for c in a:
+ print(c+' : %s 次' % a[c])
+ break
+ return 0
+
+if __name__ == '__main__':
+ file = '.'
+ article_analysis(file)
diff --git a/Drake-Z/0006/001.txt b/Drake-Z/0006/001.txt
new file mode 100644
index 00000000..53eff756
--- /dev/null
+++ b/Drake-Z/0006/001.txt
@@ -0,0 +1 @@
+You are not so absorbed about them. You see them for their flaws and perfections. Since you can rely on your instincts and find other pleasures, rather than just within the relationship itself, you understand your partner better. This knowledge will prove beneficial in the way you treat them.
\ No newline at end of file
diff --git a/Drake-Z/0006/002.txt b/Drake-Z/0006/002.txt
new file mode 100644
index 00000000..e4d26f04
--- /dev/null
+++ b/Drake-Z/0006/002.txt
@@ -0,0 +1,3 @@
+Being in a relationship can be a full-time job. Sometimes, it can become so overwhelming and consuming that you lose your own voice and sense of ownership. You want freedom and you think your partner is not making you happy enough. You question why you are in the relationship at all.
+
+Yes, we all need that moment to feel uneasy and track our direction in whatever relationship we’re in. These breaks can be beneficial to becoming the person you want to be. Here are some of the positive things that can come out of those moments of indecision.
\ No newline at end of file
diff --git a/Drake-Z/0006/003.txt b/Drake-Z/0006/003.txt
new file mode 100644
index 00000000..69306767
--- /dev/null
+++ b/Drake-Z/0006/003.txt
@@ -0,0 +1,4 @@
+Being lost can offer you freedom. You identify your core values, desires, and tastes. You are open with yourself and you can try new things. You understand that you do not have to always rely on your partner. Perhaps there is a movie coming out this weekend, you can buy a ticket and go to the cinemas yourself — something that may have been unheard of for you in the past. Being forced to find this independence can make you a stronger person.
+You can disconnect. You are no longer driven by the interests of your partner, but by your own desires. This means getting back to the basics, like reading books by your favorite author, exercising, eating your favorite meals. When you return to these ideals, you are strengthened and become a better you.
+
+People think that being lost in a relationship signals doom for that relationship — it doesn’t. It all depends on how you manage this necessary stage and work towards making the most of it.
\ No newline at end of file
diff --git a/Drake-Z/0007/0007.py b/Drake-Z/0007/0007.py
new file mode 100644
index 00000000..53a1cd3a
--- /dev/null
+++ b/Drake-Z/0007/0007.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0007 题:有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。'
+
+__author__ = 'Drake-Z'
+
+import os
+import re
+
+def count_num(a, b):
+ shuzi = [0, 0, 0]
+ path = os.path.join(a, b)
+ f = open(path, 'r', encoding='UTF-8').readlines()
+ for i in f:
+ if re.match(r'^#', i) == None:
+ pass
+ else:
+ shuzi[1] += 1 #获得注释行数,只匹配单行注释
+ if f[-1][-1:]=='\n': #最后一行为空行时
+ shuzi[2] = f.count('\n')+1 #获得空行行数
+ shuzi[0] = len(f)+1 - shuzi[2] - shuzi[1] #获得代码行数
+ else:
+ shuzi[2] = f.count('\n')
+ shuzi[0] = len(f) - shuzi[2] - shuzi[1]
+ return shuzi
+
+def file_analysis(c, d):
+ py = [x for x in os.listdir(c) if os.path.splitext(x)[1]==d] #获得文件列表
+ print(py)
+ the_num = [0, 0, 0]
+ for i in py:
+ num = count_num(c, i)
+ the_num[0] += num[0] #累计
+ the_num[1] += num[1]
+ the_num[2] += num[2]
+ print('''统计得目录中:
+ 代码有 %s 行
+ 注释 %s 行
+ 空行 %s 行''' % (the_num[0], the_num[1], the_num[2]))
+
+if __name__ == '__main__':
+ file = '.'
+ ext = '.py'
+ file_analysis(file, ext)
\ No newline at end of file
diff --git a/Drake-Z/0007/test.py b/Drake-Z/0007/test.py
new file mode 100644
index 00000000..f66f4a56
--- /dev/null
+++ b/Drake-Z/0007/test.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+# mydict_test.py
+
+import unittest
+from MyMoudel.Moudel1 import Dict
+class TestDict(unittest.TestCase):
+
+ def test_init(self):
+ d = Dict(a=1, b='test')
+ self.assertEqual(d.a, 1)
+ self.assertEqual(d.b, 'test')
+ self.assertTrue(isinstance(d, dict))
+
+ def test_key(self):
+ d = Dict()
+ d['key'] = 'value'
+ self.assertEqual(d.key, 'value')
+
+ def test_attr(self):
+ d = Dict()
+ d.key = 'value'
+ self.assertTrue('key' in d)
+ self.assertEqual(d['key'], 'value')
+
+ def test_keyerror(self):
+ d = Dict()
+ with self.assertRaises(KeyError):
+ value = d['empty']
+
+ def test_attrerror(self):
+ d = Dict()
+ with self.assertRaises(AttributeError):
+ value = d.empty
+
+ def setUp(self):
+ print('setUp...')
+
+ def tearDown(self):
+ print('tearDown...')
+if __name__ == '__main__':
+ unittest.main()
\ No newline at end of file
diff --git a/Drake-Z/0008/0008.py b/Drake-Z/0008/0008.py
new file mode 100644
index 00000000..009a2712
--- /dev/null
+++ b/Drake-Z/0008/0008.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0008 题:一个HTML文件,找出里面的正文。'
+
+__author__ = 'Drake-Z'
+
+from html.parser import HTMLParser
+from html.entities import name2codepoint
+
+class MyHTMLParser(HTMLParser):
+ in_zhengwen = False
+ in_huanhang = False
+ def handle_starttag(self, tag, attrs):
+ if ('class', 'zh-summary summary clearfix') in attrs and tag=='div' :
+ self.in_zhengwen = True
+ elif ('class', 'zm-editable-content clearfix') in attrs and tag=='div' :
+ self.in_zhengwen = True
+ elif tag=='br':
+ print('\n')
+ else:
+ self.in_zhengwen = False
+
+ def handle_data(self, data):
+ if self.in_zhengwen:
+ print(data.strip())
+ else:
+ pass
+
+if __name__ == '__main__':
+ parser = MyHTMLParser()
+ f = open('test.html', 'r', encoding = 'utf-8').read()
+ parser.feed(f)
\ No newline at end of file
diff --git a/Drake-Z/0009/0009.py b/Drake-Z/0009/0009.py
new file mode 100644
index 00000000..19975694
--- /dev/null
+++ b/Drake-Z/0009/0009.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0009 题:一个HTML文件,找出里面的链接。'
+
+__author__ = 'Drake-Z'
+
+import os, re
+from html.parser import HTMLParser
+from html.entities import name2codepoint
+
+class MyHTMLParser(HTMLParser):
+
+ def handle_starttag(self, tag, attrs):
+ if tag == 'a':
+ for (variables, value) in attrs:
+ if variables == 'href':
+ if re.match(r'http(.*?)', value):
+ print(value)
+
+if __name__ == '__main__':
+ with open('test.html', encoding='utf-8') as html:
+ parser = MyHTMLParser()
+ parser.feed(html.read())
\ No newline at end of file
diff --git a/Drake-Z/0010/0010.py b/Drake-Z/0010/0010.py
new file mode 100644
index 00000000..d229f45e
--- /dev/null
+++ b/Drake-Z/0010/0010.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0010 题:使用 Python 生成类似于图中的字母验证码图片'
+
+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 = 60 * 4
+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('0010\code.jpg', 'jpeg')
\ No newline at end of file
diff --git a/Drake-Z/0011/0011.py b/Drake-Z/0011/0011.py
new file mode 100644
index 00000000..510f3e92
--- /dev/null
+++ b/Drake-Z/0011/0011.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0011 题: 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。'
+
+__author__ = 'Drake-Z'
+
+import os
+import re
+
+def filter_word(a):
+
+ f = open('filtered_words.txt', 'r', encoding = 'utf-8').read()
+ if a == '':
+ print('Human Rights !')
+ elif len(re.findall(r'%s' % (a), f)) == 0:
+ print('Human Rights !') #非敏感词时,则打印出 Human Rights !
+ else:
+ print('Freedom !') #输入敏感词语打印出 Freedom !
+
+z = input('请输入词语:')
+filter_word(z)
\ No newline at end of file
diff --git a/Drake-Z/0011/filtered_words.txt b/Drake-Z/0011/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/Drake-Z/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/Drake-Z/0012/0012.py b/Drake-Z/0012/0012.py
new file mode 100644
index 00000000..e0f2fadf
--- /dev/null
+++ b/Drake-Z/0012/0012.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0012 题: 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。'
+
+__author__ = 'Drake-Z'
+
+import os
+import re
+
+def filter_word(a):
+ sensitive = False
+ strs = '**'
+ f = open('filtered_words.txt', 'r', encoding = 'utf-8').readlines()
+ for i in f:
+ i = i.strip() #去除\n
+ b = re.split(r'%s' % (i), a) #分解字符串
+ if len(b) > 1:
+ c = i
+ sensitive = True
+ else:
+ pass
+ if sensitive == True:
+ b = re.split(r'%s' % (c.strip()), a)
+ print(strs.join(b))
+ else:
+ print(a)
+ return 0
+
+z = input('请输入:')
+filter_word(z)
\ No newline at end of file
diff --git a/Drake-Z/0012/filtered_words.txt b/Drake-Z/0012/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/Drake-Z/0012/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/Drake-Z/0013/0013.py b/Drake-Z/0013/0013.py
new file mode 100644
index 00000000..f3a17d30
--- /dev/null
+++ b/Drake-Z/0013/0013.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'第 0013 题: 用 Python 写一个爬图片的程序,爬(http://tieba.baidu.com/p/2166231880)图片 :-)'
+
+__author__ = 'Drake-Z'
+
+import os
+import re
+import urllib
+from urllib import request
+from urllib.request import urlopen
+
+def read_url(yuanshiurl):
+ req = request.Request(yuanshiurl)
+ req.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; 360SE /360/ /chrome/ig)')
+ with request.urlopen(req) as f:
+ Imageurl(f.read().decode('utf-8')) #输出Data
+ return 0
+
+def Imageurl(data):
+ re_Imageurl = re.compile(r'src="(http://imgsrc.baidu.com/forum/.*?)"')
+ data = re_Imageurl.findall(data) #输出图片链接
+ downloadImage(data)
+
+def downloadImage(pic_url):
+ dirct = '0013'
+ try:
+ if not os.path.exists(dirct): #创建存放目录
+ os.mkdir(dirct)
+ except:
+ print('Failed to create directory in %s' % dirct)
+ exit()
+ for i in pic_url:
+ data = urllib.request.urlopen(i).read()
+ i = re.split('/', i)[-1]
+ print(i)
+ path = dirct + '/' +i
+ f = open(path, 'wb')
+ f.write(data)
+ f.close()
+ print('Done !')
+
+url = 'http://tieba.baidu.com/p/2166231880'
+read_url(url)
\ No newline at end of file
diff --git a/Drake-Z/0014/0014.py b/Drake-Z/0014/0014.py
new file mode 100644
index 00000000..c0df4222
--- /dev/null
+++ b/Drake-Z/0014/0014.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
+请将上述内容写到 student.xls 文件中。'''
+
+__author__ = 'Drake-Z'
+
+import json
+from collections import OrderedDict
+from openpyxl import Workbook
+
+def txt_to_xlsx(filename):
+ file = open(filename, 'r', encoding = 'UTF-8')
+ file_cintent = json.load(file, encoding = 'UTF-8')
+ print(file_cintent)
+ workbook = Workbook()
+ worksheet = workbook.worksheets[0]
+ for i in range(1, len(file_cintent)+1):
+ worksheet.cell(row = i, column = 1).value = i
+ for m in range(0, len(file_cintent[str(i)])):
+ worksheet.cell(row = i, column = m+2).value = file_cintent[str(i)][m]
+ workbook.save(filename = 'student.xls')
+
+if __name__ == '__main__':
+ txt_to_xlsx('student.txt')
diff --git a/Drake-Z/0015/0015.py b/Drake-Z/0015/0015.py
new file mode 100644
index 00000000..1541d123
--- /dev/null
+++ b/Drake-Z/0015/0015.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+请将上述内容写到 city.xls 文件中。'''
+
+__author__ = 'Drake-Z'
+
+import json
+from collections import OrderedDict
+from openpyxl import Workbook
+
+def txt_to_xlsx(filename):
+ file = open(filename, 'r', encoding = 'UTF-8')
+ file_cintent = json.load(file, encoding = 'UTF-8')
+ print(file_cintent)
+ workbook = Workbook()
+ worksheet = workbook.worksheets[0]
+ for i in range(1, len(file_cintent)+1):
+ worksheet.cell(row = i, column = 1).value = i
+ worksheet.cell(row = i, column = 2).value = file_cintent[str(i)]
+ workbook.save(filename = 'city.xls')
+
+if __name__ == '__main__':
+ txt_to_xlsx('city.txt')
\ No newline at end of file
diff --git a/Drake-Z/0016/0016.py b/Drake-Z/0016/0016.py
new file mode 100644
index 00000000..b815b754
--- /dev/null
+++ b/Drake-Z/0016/0016.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0016 题: 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+请将上述内容写到 numbers.xls 文件中。'''
+
+__author__ = 'Drake-Z'
+
+import json
+from openpyxl import Workbook
+
+def txt_to_xlsx(filename):
+ file = open(filename, 'r', encoding = 'UTF-8')
+ file_cintent = json.load(file, encoding = 'UTF-8')
+ print(file_cintent)
+ workbook = Workbook()
+ worksheet = workbook.worksheets[0]
+ for i in range(1, len(file_cintent)+1):
+ for m in range(1, len(file_cintent[i-1])+1):
+ worksheet.cell(row = i, column = m).value = file_cintent[i-1][m-1]
+ workbook.save(filename = 'numbers.xls')
+
+if __name__ == '__main__':
+ txt_to_xlsx('numbers.txt')
\ No newline at end of file
diff --git a/Drake-Z/0017/0017.py b/Drake-Z/0017/0017.py
new file mode 100644
index 00000000..baf773ce
--- /dev/null
+++ b/Drake-Z/0017/0017.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0017 题: 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+下所示:
+
+
+
+
+{
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+}
+
+ '''
+
+__author__ = 'Drake-Z'
+
+import xlrd,codecs
+from lxml import etree
+from collections import OrderedDict
+
+def read_xls(filename):
+ data = xlrd.open_workbook(filename)
+ table = data.sheets()[0]
+ c = OrderedDict()
+ for i in range(table.nrows):
+ c[table.cell(i,0).value] = table.row_values(i)[1:]
+ return c
+
+def save_xml(data):
+ output = codecs.open('student.xml','w','utf-8')
+ root = etree.Element('root')
+ student_xml = etree.ElementTree(root)
+ student = etree.SubElement(root, 'student')
+ student.append(etree.Comment('学生信息表\n\"id\": [名字,数学,语文,英语]'))
+ student.text = str(data)
+ output.write(etree.tounicode(student_xml.getroot()))
+ output.close()
+
+if __name__ == '__main__':
+ file = 'student.xls'
+ a = read_xls(file)
+ save_xml(a)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Drake-Z/0018/0018.py b/Drake-Z/0018/0018.py
new file mode 100644
index 00000000..97a6db98
--- /dev/null
+++ b/Drake-Z/0018/0018.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0018 题: 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+
+
+
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+
+ '''
+
+__author__ = 'Drake-Z'
+
+import xlrd,codecs
+from lxml import etree
+from collections import OrderedDict
+
+def read_xls(filename):
+ data = xlrd.open_workbook(filename)
+ table = data.sheets()[0]
+ c = OrderedDict()
+ for i in range(table.nrows):
+ c[table.cell(i,0).value] = table.row_values(i)[1:]
+ return c
+
+def save_xml(data):
+ output = codecs.open('city.xml','w','utf-8')
+ root = etree.Element('root')
+ city_xml = etree.ElementTree(root)
+ city = etree.SubElement(root, 'city')
+ city.append(etree.Comment('城市信息'))
+ city.text = str(data)
+ output.write(etree.tounicode(city_xml.getroot()))
+ output.close()
+
+if __name__ == '__main__':
+ file = 'city.xls'
+ a = read_xls(file)
+ save_xml(a)
\ No newline at end of file
diff --git a/Drake-Z/0019/0019.py b/Drake-Z/0019/0019.py
new file mode 100644
index 00000000..c0fde199
--- /dev/null
+++ b/Drake-Z/0019/0019.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0019 题: 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+所示:
+
+
+
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+ '''
+
+__author__ = 'Drake-Z'
+
+import xlrd,codecs
+from lxml import etree
+from collections import OrderedDict
+
+def read_xls(filename):
+ data = xlrd.open_workbook(filename)
+ table = data.sheets()[0]
+ c = OrderedDict()
+ for i in range(table.nrows):
+ c[table.cell(i,0).value] = table.row_values(i)[1:]
+ return c
+
+def save_xml(data):
+ output = codecs.open('numbers.xml','w','utf-8')
+ root = etree.Element('root')
+ numbers_xml = etree.ElementTree(root)
+ numbers = etree.SubElement(root, 'numbers')
+ numbers.append(etree.Comment('城市信息'))
+ numbers.text = str(data)
+ output.write(etree.tounicode(numbers_xml.getroot()))
+ output.close()
+
+if __name__ == '__main__':
+ file = 'numbers.xls'
+ a = read_xls(file)
+ save_xml(a)
\ No newline at end of file
diff --git a/Drake-Z/0020/0020.py b/Drake-Z/0020/0020.py
new file mode 100644
index 00000000..98d2062b
--- /dev/null
+++ b/Drake-Z/0020/0020.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0020 题: 登陆中国联通网上营业厅 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。写代码,对每月通话时间做个统计。'''
+
+__author__ = 'Drake-Z'
+
+import os
+import re
+import xlrd
+
+def jishu(file):
+ data = xlrd.open_workbook(file)
+ table = data.sheets()[0]
+ re_timesec = re.compile(r'([\d]+)秒')
+ re_timemin = re.compile(r'([\d]+)分')
+ row_nums = table.nrows
+ numbers = 0
+ for i in range(0, row_nums):
+ a = re_timesec.findall(table.cell(i, 3).value)
+ b = re_timemin.findall(table.cell(i, 3).value)
+ if len(a)==0 : pass
+ else:
+ numbers += int(a[0])
+ if len(b)==0 : pass
+ else:
+ numbers += int(b[0])*60
+
+ print('您本月通话时长总时:%s 分 %s 秒' % (numbers//60, numbers%60))
+
+file = '语音通信.xls'
+jishu(file)
\ No newline at end of file
diff --git a/Drake-Z/0021/0021.py b/Drake-Z/0021/0021.py
new file mode 100644
index 00000000..bab3c856
--- /dev/null
+++ b/Drake-Z/0021/0021.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0021 题: 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。'''
+
+__author__ = 'Drake-Z'
+
+import hashlib
+from collections import defaultdict
+db = {}
+db = defaultdict(lambda: 'N/A') #去掉登录可能产生的KeyError
+
+def get_md5(password):
+ a = hashlib.md5()
+ a.update(password . encode('utf-8'))
+ return (a.hexdigest())
+
+def register(username, password):
+ db[username] = get_md5(password + username + 'the-Salt')
+
+def login(username, password):
+ b = get_md5(password + username + 'the-Salt' )
+ if b==db[username]:
+ return True
+ else:
+ return False
+a = input('注册输入用户名:')
+b = input('注册输入密码:')
+register(a, b)
+a = input('登录输入用户名:')
+b = input('登录输入密码:')
+print(login(a, b))
\ No newline at end of file
diff --git a/Drake-Z/0022/0022.py b/Drake-Z/0022/0022.py
new file mode 100644
index 00000000..d7f22de5
--- /dev/null
+++ b/Drake-Z/0022/0022.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+'''第 0022 题: iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。'''
+
+__author__ = 'Drake-Z'
+
+from PIL import Image
+import os
+
+def thumbnail_pic(a, b =1136, c=640):
+ for x in a:
+ name = os.path.join('.', x)
+ im = Image.open(name)
+ print('Before:'+im.format, im.size, im.mode)
+ im.thumbnail((b, c))
+ print('After:'+im.format, im.size, im.mode)
+ im.save(name, 'JPEG')
+
+a = os.listdir('.')
+PHONE = {'iPhone5':(1136,640), 'iPhone6':(1134,750), 'iPhone6P':(2208,1242)}
+width,height = PHONE['iPhone6']
+thumbnail_pic(a, width, height)
\ No newline at end of file
diff --git a/Forec/0015/city.xls~HEAD b/Forec/0015/city.xls~HEAD
new file mode 100644
index 00000000..55181b4c
Binary files /dev/null and b/Forec/0015/city.xls~HEAD differ
diff --git a/Forec/0015/city.xls~upstream_master b/Forec/0015/city.xls~upstream_master
new file mode 100644
index 00000000..55181b4c
Binary files /dev/null and b/Forec/0015/city.xls~upstream_master differ
diff --git a/GitRangerLiu/0000/cat.jpg b/GitRangerLiu/0000/cat.jpg
new file mode 100644
index 00000000..832ca16d
Binary files /dev/null and b/GitRangerLiu/0000/cat.jpg differ
diff --git a/GitRangerLiu/0000/cat2.jpg b/GitRangerLiu/0000/cat2.jpg
new file mode 100644
index 00000000..4905b2dd
Binary files /dev/null and b/GitRangerLiu/0000/cat2.jpg differ
diff --git a/GitRangerLiu/0000/img_addnum.py b/GitRangerLiu/0000/img_addnum.py
new file mode 100644
index 00000000..e09b70ed
--- /dev/null
+++ b/GitRangerLiu/0000/img_addnum.py
@@ -0,0 +1,24 @@
+from PIL import Image, ImageDraw, ImageFont
+
+
+def img_addnum(img_name, num):
+ im = Image.open(img_name)
+ draw = ImageDraw.Draw(im)
+
+ #width and height
+ w = im.width;
+ h = im.height;
+ print h, w
+
+ #load font
+ #fnt = ImageFont.load_default()
+ fnt = ImageFont.truetype('arial.ttf', int(h * 0.15))
+
+
+ draw.text((w * 0.9 , h * 0.05), num, font=fnt, fill=(255, 0, 0, 128))
+ im.save(img_name.split('.')[0] + '2.jpg')
+
+if __name__ == '__main__':
+ img_addnum('cat.jpg', '3')
+
+
diff --git a/GitRangerLiu/0001/gen_charint.py b/GitRangerLiu/0001/gen_charint.py
new file mode 100644
index 00000000..17f3f9d7
--- /dev/null
+++ b/GitRangerLiu/0001/gen_charint.py
@@ -0,0 +1,21 @@
+import random, string
+
+
+def gen_charint(filename, width = 4, num = 200):
+ #Open/Close times is far more expensive than R/W times
+ f = open(filename, 'wb')
+ charint = string.digits + string.letters
+ for i in range(num):
+ verify = [random.choice(charint) for j in range(width)]
+ verify = ''.join(verify) + '\n'
+ f.write(verify)
+ f.close()
+
+if __name__ == '__main__':
+
+ filename = 'result.txt'
+ width = 4
+ num = 200
+ gen_charint(filename, width, num)
+
+
diff --git a/GitRangerLiu/0001/result.txt b/GitRangerLiu/0001/result.txt
new file mode 100644
index 00000000..f8ed816a
--- /dev/null
+++ b/GitRangerLiu/0001/result.txt
@@ -0,0 +1,200 @@
+kKne
+QXLL
+Q2wE
+jRSv
+yJ6C
+Ru1w
+TLIg
+QXmr
+e88e
+mgPd
+w3YC
+sw23
+qDxM
+FH4I
+G6yp
+Pz8Q
+tpNB
+ClOU
+VdQB
+ytIu
+XSbT
+sn34
+qdHC
+A3GD
+qzlg
+ft9Q
+fFTa
+JJ0X
+Vfcp
+jYGC
+K6Cf
+3eKf
+aTfD
+FLZ4
+yjAC
+gIBx
+gBlW
+sf8O
+OLPV
+TNx3
+UVtW
+Pj85
+nGDS
+qqCC
+n3vD
+BgcC
+bCM3
+QRyL
+Gfo3
+Jdmc
+PTU7
+9BJq
+Onir
+06Dy
+kVox
+0JBy
+b3mJ
+zc5T
+NVrv
+rN81
+Ec86
+Fc8n
+qN5f
+HTQg
+TrQo
+U8fx
+fxeE
+6Ruo
+2C60
+PF7s
+hmkG
+2N4f
+8VmN
+ewld
+J0Df
+1h7L
+RqRq
+lMo1
+gpAi
+eAlP
+i7aw
+7Vrl
+ap3w
+1BJe
+yr8r
+arlH
+7s30
+VIba
+n3v0
+DeE5
+ZaDS
+UaT5
+VtmP
+wJDg
+MOvB
+w4Jq
+ZFOB
+Qx04
+ZYMk
+D9IP
+zqCF
+p90m
+nmbX
+LDsh
+WpPO
+EFNk
+lrc8
+gIzp
+bDDW
+1QA9
+Tpgo
+tXH5
+K1aT
+bxXq
+Wf1H
+dhFS
+K5ji
+fyG5
+Q48G
+fgDM
+CJCL
+ruNd
+FV7M
+748y
+KlWG
+S1rR
+MyRa
+cnAz
+updQ
+DKOP
+roWE
+IS8o
+vKnT
+QTeh
+W9lk
+BYig
+0M2A
+i55D
+bVRC
+Xt5S
+OZht
+M1Ru
+qUCf
+eGMA
+rOxR
+9WAa
+jzPx
+yhj7
+bbrS
+lOQW
+JOt2
+mzHv
+cy5g
+OxzU
+XTaG
+S0Bs
+yRcA
+BmR5
+RQhB
+V7ey
+bVRB
+85O3
+pZs6
+ZP4u
+SUEW
+S12o
+GL9h
+vtce
+U7Fm
+Ng2S
+7grw
+wMjy
+l5wt
+x7DV
+UwCd
+i5YO
+oHbG
+GaU6
+pgiP
+n6VJ
+FRza
+dfNn
+af4N
+Cf1O
+OV0H
+gWxf
+LcvA
+K4L3
+DiAk
+QQRv
+WLDT
+ko0w
+rNT2
+7CTg
+TGnV
+xinC
+AtVm
+bxXX
+xVTI
+XF1k
diff --git a/GitRangerLiu/0002/result.txt b/GitRangerLiu/0002/result.txt
new file mode 100644
index 00000000..f8ed816a
--- /dev/null
+++ b/GitRangerLiu/0002/result.txt
@@ -0,0 +1,200 @@
+kKne
+QXLL
+Q2wE
+jRSv
+yJ6C
+Ru1w
+TLIg
+QXmr
+e88e
+mgPd
+w3YC
+sw23
+qDxM
+FH4I
+G6yp
+Pz8Q
+tpNB
+ClOU
+VdQB
+ytIu
+XSbT
+sn34
+qdHC
+A3GD
+qzlg
+ft9Q
+fFTa
+JJ0X
+Vfcp
+jYGC
+K6Cf
+3eKf
+aTfD
+FLZ4
+yjAC
+gIBx
+gBlW
+sf8O
+OLPV
+TNx3
+UVtW
+Pj85
+nGDS
+qqCC
+n3vD
+BgcC
+bCM3
+QRyL
+Gfo3
+Jdmc
+PTU7
+9BJq
+Onir
+06Dy
+kVox
+0JBy
+b3mJ
+zc5T
+NVrv
+rN81
+Ec86
+Fc8n
+qN5f
+HTQg
+TrQo
+U8fx
+fxeE
+6Ruo
+2C60
+PF7s
+hmkG
+2N4f
+8VmN
+ewld
+J0Df
+1h7L
+RqRq
+lMo1
+gpAi
+eAlP
+i7aw
+7Vrl
+ap3w
+1BJe
+yr8r
+arlH
+7s30
+VIba
+n3v0
+DeE5
+ZaDS
+UaT5
+VtmP
+wJDg
+MOvB
+w4Jq
+ZFOB
+Qx04
+ZYMk
+D9IP
+zqCF
+p90m
+nmbX
+LDsh
+WpPO
+EFNk
+lrc8
+gIzp
+bDDW
+1QA9
+Tpgo
+tXH5
+K1aT
+bxXq
+Wf1H
+dhFS
+K5ji
+fyG5
+Q48G
+fgDM
+CJCL
+ruNd
+FV7M
+748y
+KlWG
+S1rR
+MyRa
+cnAz
+updQ
+DKOP
+roWE
+IS8o
+vKnT
+QTeh
+W9lk
+BYig
+0M2A
+i55D
+bVRC
+Xt5S
+OZht
+M1Ru
+qUCf
+eGMA
+rOxR
+9WAa
+jzPx
+yhj7
+bbrS
+lOQW
+JOt2
+mzHv
+cy5g
+OxzU
+XTaG
+S0Bs
+yRcA
+BmR5
+RQhB
+V7ey
+bVRB
+85O3
+pZs6
+ZP4u
+SUEW
+S12o
+GL9h
+vtce
+U7Fm
+Ng2S
+7grw
+wMjy
+l5wt
+x7DV
+UwCd
+i5YO
+oHbG
+GaU6
+pgiP
+n6VJ
+FRza
+dfNn
+af4N
+Cf1O
+OV0H
+gWxf
+LcvA
+K4L3
+DiAk
+QQRv
+WLDT
+ko0w
+rNT2
+7CTg
+TGnV
+xinC
+AtVm
+bxXX
+xVTI
+XF1k
diff --git a/GitRangerLiu/0002/store_reldb.py b/GitRangerLiu/0002/store_reldb.py
new file mode 100644
index 00000000..6f77ee6c
--- /dev/null
+++ b/GitRangerLiu/0002/store_reldb.py
@@ -0,0 +1,37 @@
+#reference: https://www.tutorialspoint.com/python/python_database_access.htm
+
+import MySQLdb as mysqldb
+
+def store_reldb():
+ db = mysqldb.connect(host = 'localhost', user = 'chris', passwd = '1314', \
+ db = 'show_me_the_code')
+ cursor = db.cursor()
+
+ #Create a table
+ cursor.execute('drop table if exists verify_info')
+ sql = '''
+ create table verify_info (
+ id int not null auto_increment primary key,
+ verify_code char(20)
+ )'''
+ cursor.execute(sql)
+
+
+ #Insert data
+ f = open('result.txt', 'rb')
+ for line in f:
+ verify_code = line.strip()
+ sql = 'insert into verifY_info(verify_code) values ("%s");' % \
+ (verify_code)
+ cursor.execute(sql)
+ try:
+ db.commit()
+ except:
+ db.rollback()
+ f.close()
+ print 'Error happened when inserting data'
+ f.close()
+ db.close()
+
+if __name__ == '__main__':
+ store_reldb()
diff --git a/GitRangerLiu/0004/count_word.py b/GitRangerLiu/0004/count_word.py
new file mode 100644
index 00000000..ee98e502
--- /dev/null
+++ b/GitRangerLiu/0004/count_word.py
@@ -0,0 +1,27 @@
+#count the frequency of each word or number( namely not space character)
+import string, re
+
+
+def count_word(filename):
+ f = open(filename, 'rb')
+ wdic = {}
+ for line in f:
+ line = line.lower().strip()
+ #split by regular expression, more powerful function
+ words = re.split('\W+', line)
+ #words = re.findall('[a-zA-Z0-9]+', line)
+
+ for word in words:
+ if word in wdic:
+ wdic[word] += 1
+ else:
+ wdic[word] = 1
+ f.close()
+ #sort by frequency
+ #Returns a new sorted list with (key, value) pairs, dict cannot be sorted
+ wdic = sorted(wdic.items(), key = lambda x: x[1], reverse = True)
+ print wdic
+
+if __name__ == '__main__':
+ filename = 'testtext.txt'
+ count_word(filename)
diff --git a/GitRangerLiu/0004/testtext.txt b/GitRangerLiu/0004/testtext.txt
new file mode 100644
index 00000000..8949ef24
--- /dev/null
+++ b/GitRangerLiu/0004/testtext.txt
@@ -0,0 +1,4 @@
+where the optional sign may by either + or -, integer and fraction are strings of hexadecimal digits, and exponent is a decimal integer with an optional leading sign. Case is not significant, and there must be at least one hexadecimal digit in either the integer or the fraction. This syntax is similar to the syntax specified in section 6.4.4.2 of the C99 standard, and also to the syntax used in Java 1.5 onwards. In particular, the output of float.hex() is usable as a hexadecimal floating-point literal in C or Java code, and hexadecimal strings produced by Cs %a format character or Javas Double.toHexString are accepted by float.fromhex().
+To read a files contents, call f.read(size), which reads some quantity of data and returns it as a string. size is an optional numeric argument. When size is omitted or negative, the entire contents of the file will be read and returned; its your problem if the file is twice as large as your machines memory. Otherwise, at most size bytes are read and returned. If the end of the file has been reached, f.read() will return an empty string ("").
+15, 13, 22,
+hello, python
diff --git a/GitRangerLiu/0005/cat2.jpg b/GitRangerLiu/0005/cat2.jpg
new file mode 100644
index 00000000..767c2f44
Binary files /dev/null and b/GitRangerLiu/0005/cat2.jpg differ
diff --git a/GitRangerLiu/0005/change_size.py b/GitRangerLiu/0005/change_size.py
new file mode 100644
index 00000000..7d69a972
--- /dev/null
+++ b/GitRangerLiu/0005/change_size.py
@@ -0,0 +1,35 @@
+from PIL import Image
+import os
+from os.path import join
+
+#iPhone 5 display resolution
+i5size = (1136, 640)
+def change_size(picdir):
+
+ for root, dirs, files in os.walk(picdir):
+ for name in files:
+ filename = join(root, name)
+ print filename
+ change_picsize(filename)
+
+
+def change_picsize(filename):
+ im = Image.open(filename)
+ w = im.width;
+ h = im.height;
+
+ if(w > i5size[0]):
+ im = im.resize((i5size[0], h))
+ else:
+ pass
+
+ if(h > i5size[1]):
+ im = im.resize((im.width, i5size[1]))
+ else:
+ pass
+ im.save(filename.split('.')[0] + '2.jpg')
+
+if __name__ == '__main__':
+ change_size('test')
+
+
diff --git a/GitRangerLiu/0005/dog2.jpg b/GitRangerLiu/0005/dog2.jpg
new file mode 100644
index 00000000..ffa45af9
Binary files /dev/null and b/GitRangerLiu/0005/dog2.jpg differ
diff --git a/GitRangerLiu/0005/test/cat.jpg b/GitRangerLiu/0005/test/cat.jpg
new file mode 100644
index 00000000..d76cfe26
Binary files /dev/null and b/GitRangerLiu/0005/test/cat.jpg differ
diff --git a/GitRangerLiu/0005/test/dog.jpg b/GitRangerLiu/0005/test/dog.jpg
new file mode 100644
index 00000000..10c15876
Binary files /dev/null and b/GitRangerLiu/0005/test/dog.jpg differ
diff --git a/GitRangerLiu/0006/count_words.py b/GitRangerLiu/0006/count_words.py
new file mode 100644
index 00000000..641f06cd
--- /dev/null
+++ b/GitRangerLiu/0006/count_words.py
@@ -0,0 +1,27 @@
+import os
+from os.path import join
+import re
+
+
+def count_words(root):
+ wdic = {}
+ for root, dirs, files in os.walk(root):
+ for name in files:
+ filename = join(root, name)
+
+ f = open(filename, 'rb')
+ for line in f:
+ line = line.lower().strip()
+ words = re.findall('[a-zA-Z0-9]+', line)
+ for word in words:
+ if word in wdic:
+ wdic[word] += 1
+ else:
+ wdic[word] = 1
+ f.close()
+ wdic = sorted(wdic.items(), key = lambda x: x[1], reverse = True)
+ print wdic
+
+if __name__ == '__main__':
+ root = 'test'
+ count_words(root)
diff --git a/GitRangerLiu/0006/test/1.txt b/GitRangerLiu/0006/test/1.txt
new file mode 100644
index 00000000..80df828b
--- /dev/null
+++ b/GitRangerLiu/0006/test/1.txt
@@ -0,0 +1,3 @@
+one one one
+two two
+five
diff --git a/GitRangerLiu/0006/test/2.txt b/GitRangerLiu/0006/test/2.txt
new file mode 100644
index 00000000..3a533e68
--- /dev/null
+++ b/GitRangerLiu/0006/test/2.txt
@@ -0,0 +1,4 @@
+five
+five
+five
+five
\ No newline at end of file
diff --git a/GitRangerLiu/0007/count_line.py b/GitRangerLiu/0007/count_line.py
new file mode 100644
index 00000000..0ca4d4c1
--- /dev/null
+++ b/GitRangerLiu/0007/count_line.py
@@ -0,0 +1,32 @@
+import os
+from os.path import join
+import re
+
+comm = '[(#)(//)(/*)(*)]'
+prog = re.compile(comm)
+
+def count_line(root):
+ codecount = 0
+ emptycount = 0
+ commcount = 0
+ for root, dirs, files in os.walk(root):
+ for name in files:
+ filename = join(root, name)
+ f = open(filename)
+ for line in f:
+ if line.strip() == '':
+ emptycount += 1
+ #python script
+ elif prog.match(line.strip()) != None:
+ commcount += 1
+ else:
+ codecount += 1
+ f.close()
+
+ print 'code lines: ', codecount
+ print 'comment lines: ', commcount
+ print 'empty lines: ', emptycount
+
+if __name__ == '__main__':
+ root = 'test'
+ count_line(root)
diff --git a/GitRangerLiu/0007/test/Test.java b/GitRangerLiu/0007/test/Test.java
new file mode 100644
index 00000000..66a7b50a
--- /dev/null
+++ b/GitRangerLiu/0007/test/Test.java
@@ -0,0 +1,9 @@
+public class Test {
+ public static void main(String[] args) {
+ //print hello world
+ /**
+ *
+ */
+ System.out.println("Hello World!");
+ }
+}
\ No newline at end of file
diff --git a/GitRangerLiu/0007/test/handlerdemo.py b/GitRangerLiu/0007/test/handlerdemo.py
new file mode 100644
index 00000000..cc487e21
--- /dev/null
+++ b/GitRangerLiu/0007/test/handlerdemo.py
@@ -0,0 +1,12 @@
+import socket
+import SocketServer as socketserver
+import select
+REMOTE_SERVER = '127.0.0.1'
+REMOTE_PORT = 9999
+LOCAL_SERVER = '127.0.0.1'
+LOCAL_PORT = 10001
+PORT = 10000
+BUFFER = 4096
+#Hello
+if __name__ == '__main__':
+ main()
\ No newline at end of file
diff --git a/GitRangerLiu/0008/find_body.py b/GitRangerLiu/0008/find_body.py
new file mode 100644
index 00000000..d8320af0
--- /dev/null
+++ b/GitRangerLiu/0008/find_body.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+'''
+第 0008 题:一个HTML文件,找出里面的正文。
+'''
+
+import urllib3 as urllib
+import certifi
+import urllib3.contrib.pyopenssl as pyopenssl
+from bs4 import BeautifulSoup as bs
+
+def find_body(url):
+ html = get_html(url)
+ soup = bs(html, 'html.parser')
+ text = soup.body.get_text()
+ print text
+
+
+def get_html(url):
+ #certificate for python2.7
+ pyopenssl.inject_into_urllib3()
+ mgr = urllib.PoolManager(cert_reqs = 'CERT_REQUIRED', \
+ ca_certs = certifi.where())
+
+ res = mgr.request('GET', url)
+ return res.data
+
+if __name__ == '__main__':
+ #url = 'https://github.com/GitRangerLiu/python'
+ url = 'https://www.crummy.com/software/BeautifulSoup/bs4/doc/#get-text'
+ find_body(url)
diff --git a/GitRangerLiu/0009/find_links.py b/GitRangerLiu/0009/find_links.py
new file mode 100644
index 00000000..2702b112
--- /dev/null
+++ b/GitRangerLiu/0009/find_links.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+'''
+第 0009 题:一个HTML文件,找出里面的链接
+'''
+
+import urllib3 as urllib
+import certifi
+import urllib3.contrib.pyopenssl as pyopenssl
+from bs4 import BeautifulSoup as bs
+
+def find_links(url):
+ li = []
+ html = get_html(url)
+ soup = bs(html, 'html.parser')
+ for link in soup.find_all('a'):
+ li.append(link.get('href'))
+
+ for item in li:
+ print item
+
+def get_html(url):
+ #certificate for python2.7
+ pyopenssl.inject_into_urllib3()
+ mgr = urllib.PoolManager(cert_reqs = 'CERT_REQUIRED', \
+ ca_certs = certifi.where())
+
+ res = mgr.request('GET', url)
+ return res.data
+
+if __name__ == '__main__':
+ #url = 'https://github.com/GitRangerLiu/python'
+ url = 'https://www.crummy.com/software/BeautifulSoup/bs4/doc/#get-text'
+ find_links(url)
diff --git a/GitRangerLiu/0010/captchar.jpg b/GitRangerLiu/0010/captchar.jpg
new file mode 100644
index 00000000..40ed1c86
Binary files /dev/null and b/GitRangerLiu/0010/captchar.jpg differ
diff --git a/GitRangerLiu/0010/gen_captcha.py b/GitRangerLiu/0010/gen_captcha.py
new file mode 100644
index 00000000..b3873daa
--- /dev/null
+++ b/GitRangerLiu/0010/gen_captcha.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+'''
+第 0010 题:使用 Python 生成类似于下图中的字母验证码图片
+'''
+
+import string
+import random
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+
+#captcha size
+size = (240, 60)
+
+#random chars
+def gen_random():
+ charlist = [random.choice(string.ascii_uppercase) for i in range(4)]
+ chars = ''.join(charlist)
+ return chars
+
+def random_color():
+ return (random.randint(0, 255), random.randint(0, 255), \
+ random.randint(0, 255))
+
+
+def gen_captcha():
+ im = Image.new('RGBA', size, color = 0)
+ draw = ImageDraw.Draw(im)
+
+ #background
+ for w in range(size[0]):
+ for h in range(size[1]):
+ draw.point((w, h), random_color())
+
+ #draw text
+ chars = gen_random()
+ #font and size
+ fnt = ImageFont.truetype('arial.ttf', int(size[1] * 0.8))
+ x = 0
+ y = size[1] * 0.1
+
+ for i in range(4):
+ x += size[0] * 0.2
+ draw.text((x, y), chars[i], font = fnt, fill = random_color())
+
+ #blur
+ im = im.filter(ImageFilter.BLUR)
+ im.save('captchar.jpg')
+ im.show()
+
+if __name__ == '__main__':
+ gen_captcha()
diff --git a/GitRangerLiu/0011/filter_word.py b/GitRangerLiu/0011/filter_word.py
new file mode 100644
index 00000000..756611a5
--- /dev/null
+++ b/GitRangerLiu/0011/filter_word.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+'''
+第 0011 题: 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,
+当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
+'''
+
+def filter_word():
+ f = open('filtered_words.txt', 'rb')
+ words = [line.strip() for line in f]
+ #Chinese character encoding and decoding, ide encoding, display problem
+ #print words
+
+ while(True):
+ x = raw_input('请输入文字:(提示: 输入CTRL + C ,退出)\n')
+ if x in words:
+ print 'Freedom'
+ else:
+ print 'Human Rights'
+
+if __name__ == '__main__':
+ filter_word()
diff --git a/GitRangerLiu/0011/filtered_words.txt b/GitRangerLiu/0011/filtered_words.txt
new file mode 100644
index 00000000..5f2b4d40
--- /dev/null
+++ b/GitRangerLiu/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
diff --git a/GitRangerLiu/0012/filter_word.py b/GitRangerLiu/0012/filter_word.py
new file mode 100644
index 00000000..d208dc3e
--- /dev/null
+++ b/GitRangerLiu/0012/filter_word.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+'''
+第 0012 题: 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,
+当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,
+则变成「**是个好城市」。
+'''
+import string
+
+def filter_word():
+ f = open('filtered_words.txt', 'rb')
+ words = [line.strip() for line in f]
+ f.close()
+
+ while(True):
+ text = raw_input('>')
+ for word in words:
+ if word in text:
+ text = string.replace(text, word, gen_asterisk(word))
+ print text
+
+#Each Chinese character is replace by one asterisk, and each English character
+#by one asterisk.
+def gen_asterisk(word):
+ if word.isalnum():
+ return len(word) * '*'
+ else:
+ return '*' * (len(word) / 2)
+
+if __name__ == '__main__':
+ filter_word()
diff --git a/GitRangerLiu/0012/filtered_words.txt b/GitRangerLiu/0012/filtered_words.txt
new file mode 100644
index 00000000..5f2b4d40
--- /dev/null
+++ b/GitRangerLiu/0012/filtered_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
diff --git a/GitRangerLiu/0013/crawler.py b/GitRangerLiu/0013/crawler.py
new file mode 100644
index 00000000..cfb899df
--- /dev/null
+++ b/GitRangerLiu/0013/crawler.py
@@ -0,0 +1,47 @@
+
+import urllib3 as ul
+import urllib3
+import certifi
+import urllib3.contrib.pyopenssl as pyopenssl
+from bs4 import BeautifulSoup as bs
+import time
+
+link = 'http://tieba.baidu.com/p/2166231880'
+
+def crawler(link):
+ html = get_html(link)
+ (piclinks, filename) = get_pic_link(html)
+ print piclinks
+ #download
+ i = 0
+ for link in piclinks[:]:
+ download(link, filename + str(i) + '.jpg')
+ i += 1
+ #time.sleep(10)
+
+def get_html(link):
+ pyopenssl.inject_into_urllib3()
+ http = ul.PoolManager(cert_reqs = 'CERT_REQUIRED', \
+ ca_certs = certifi.where())
+ r = http.request('GET', link)
+ return r.data
+
+def get_pic_link(html):
+ soup = bs(html, 'html.parser')
+ purls = [link.get('src') for link in soup.find_all('img')]
+
+ #the title of the page as the picture fielname
+ filename = soup.find('title').get_text()
+ return (purls, filename)
+
+
+def download(url, filename):
+ pyopenssl.inject_into_urllib3()
+ http = ul.PoolManager(cert_reqs = 'CERT_REQUIRED', \
+ ca_certs = certifi.where())
+ res = http.request('GET', url)
+ with open(filename, 'wb') as f:
+ f.write(res.data)
+
+if __name__ == '__main__':
+ crawler(link)
diff --git a/GitRangerLiu/0014/json_to_excel.py b/GitRangerLiu/0014/json_to_excel.py
new file mode 100644
index 00000000..6e2e4dac
--- /dev/null
+++ b/GitRangerLiu/0014/json_to_excel.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+import json
+import xlwt
+
+testfile = 'student.txt'
+savename = 'student.xls'
+sheetname = 'student'
+
+def json_to_excel():
+ info = get_json(testfile)
+ workbook = xlwt.Workbook()
+ sheet = workbook.add_sheet(sheetname)
+
+ row_total = len(info)
+ col_total = len(info[str(1)])
+ #The keys of dict is special, so we just use 1, 2, 3
+ for r in range(row_total):
+ sheet.write(r, 0, r + 1)
+
+ for r in range(row_total):
+ for c in range(col_total):
+ #Get values by the key
+ vals = info[str(r + 1)]
+ sheet.write(r, c + 1, vals[c])
+ workbook.save(savename)
+
+#Convert json format file to python object
+def get_json(testfile):
+ with open(testfile, 'r') as f:
+ #The codec should be the same as the file encoding.
+ text = f.read().decode('GB2312')
+ return json.loads(text)
+
+if __name__ == '__main__':
+ json_to_excel()
diff --git a/GitRangerLiu/0014/student.txt b/GitRangerLiu/0014/student.txt
new file mode 100644
index 00000000..d3c6eb5b
--- /dev/null
+++ b/GitRangerLiu/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/GitRangerLiu/0014/student.xls b/GitRangerLiu/0014/student.xls
new file mode 100644
index 00000000..3316256e
Binary files /dev/null and b/GitRangerLiu/0014/student.xls differ
diff --git a/GitRangerLiu/0015/city.txt b/GitRangerLiu/0015/city.txt
new file mode 100644
index 00000000..22a2ad33
--- /dev/null
+++ b/GitRangerLiu/0015/city.txt
@@ -0,0 +1,5 @@
+{
+ "1" : "Ϻ",
+ "2" : "",
+ "3" : "ɶ"
+}
\ No newline at end of file
diff --git a/GitRangerLiu/0015/city.xls b/GitRangerLiu/0015/city.xls
new file mode 100644
index 00000000..fc46330c
Binary files /dev/null and b/GitRangerLiu/0015/city.xls differ
diff --git a/GitRangerLiu/0015/json_to_excel.py b/GitRangerLiu/0015/json_to_excel.py
new file mode 100644
index 00000000..121ae52d
--- /dev/null
+++ b/GitRangerLiu/0015/json_to_excel.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+import json
+import xlwt
+
+testfile = 'city.txt'
+savename = 'city.xls'
+sheetname = 'big city'
+
+def json_to_excel():
+ info = get_json(testfile)
+ workbook = xlwt.Workbook()
+ sheet = workbook.add_sheet(sheetname)
+
+ print info
+ row_total = len(info)
+ col_total = 1
+ #The keys of dict is special, so we just use 1, 2, 3
+ for r in range(row_total):
+ sheet.write(r, 0, r + 1)
+
+ for r in range(row_total):
+ for c in range(col_total):
+ #Get values by the key
+ val = info[str(r + 1)]
+ sheet.write(r, c + 1, val)
+ workbook.save(savename)
+
+#Convert json format file to python object
+def get_json(testfile):
+ with open(testfile, 'r') as f:
+ #The codec should be the same as the file encoding.
+ text = f.read().decode('GB2312')
+ return json.loads(text)
+
+if __name__ == '__main__':
+ json_to_excel()
diff --git a/GitRangerLiu/0016/json_to_excel.py b/GitRangerLiu/0016/json_to_excel.py
new file mode 100644
index 00000000..d17e2a20
--- /dev/null
+++ b/GitRangerLiu/0016/json_to_excel.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+import json
+import xlwt
+
+testfile = 'numbers.txt'
+savename = 'numbers.xls'
+sheetname = 'number'
+
+def json_to_excel():
+ info = get_json(testfile)
+ workbook = xlwt.Workbook()
+ sheet = workbook.add_sheet(sheetname)
+
+ print info
+ row_total = len(info)
+ col_total = len(info[0])
+
+ for r in range(row_total):
+ for c in range(col_total):
+ val = info[r][c]
+ sheet.write(r, c, val)
+ workbook.save(savename)
+
+#Convert json format file to python object
+def get_json(testfile):
+ with open(testfile, 'r') as f:
+ #The codec should be the same as the file encoding.
+ text = f.read().decode('GB2312')
+ return json.loads(text)
+
+if __name__ == '__main__':
+ json_to_excel()
diff --git a/GitRangerLiu/0016/numbers.txt b/GitRangerLiu/0016/numbers.txt
new file mode 100644
index 00000000..c43c0378
--- /dev/null
+++ b/GitRangerLiu/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/GitRangerLiu/0016/numbers.xls b/GitRangerLiu/0016/numbers.xls
new file mode 100644
index 00000000..c3a7f27a
Binary files /dev/null and b/GitRangerLiu/0016/numbers.xls differ
diff --git a/GitRangerLiu/0017/excel_to_xml.py b/GitRangerLiu/0017/excel_to_xml.py
new file mode 100644
index 00000000..b7f8510f
--- /dev/null
+++ b/GitRangerLiu/0017/excel_to_xml.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+
+import xlrd
+from lxml import etree
+import json
+import io
+
+fromfile = 'student.xls'
+
+def read_xls(fromfile):
+ book = xlrd.open_workbook(fromfile)
+ sheet = book.sheet_by_name('student')
+ data = {}
+ rows = sheet.nrows
+ cols = sheet.ncols
+ kv = []
+ for i in range(rows):
+ for j in range(1, cols):
+ if type(sheet.cell_value(i, j)) is float:
+ kv.append(int(sheet.cell_value(i, j)))
+ else:
+ kv.append(sheet.cell_value(i, j))
+ data[str(int(sheet.cell_value(i, 0)))] = kv
+ return json.dumps(data, ensure_ascii = False)
+
+def to_xml(data):
+ #Create a document and elements
+ root = etree.Element('root')
+ stu = etree.SubElement(root, 'student')
+ #Create a comment
+ stu.append(etree.Comment(u' 学生信息表\n\t"id" : [名字, 数学, 语文, 英文]'))
+
+ #Create text
+ stu.text = data
+
+ #Save to file
+ tree = etree.ElementTree(root)
+ tree.write('student.xml', encoding = 'utf-8', pretty_print = True, \
+ xml_declaration = True)
+
+if __name__ == '__main__':
+ data = read_xls(fromfile)
+ to_xml(data)
+
diff --git a/GitRangerLiu/0017/student.xls b/GitRangerLiu/0017/student.xls
new file mode 100644
index 00000000..3a6bcb5a
Binary files /dev/null and b/GitRangerLiu/0017/student.xls differ
diff --git a/GitRangerLiu/0017/student.xml b/GitRangerLiu/0017/student.xml
new file mode 100644
index 00000000..556aef93
--- /dev/null
+++ b/GitRangerLiu/0017/student.xml
@@ -0,0 +1,5 @@
+
+
+ {"1": ["张三", 150, 120, 100, "李四", 90, 99, 95, "王五", 60, 66, 68], "3": ["张三", 150, 120, 100, "李四", 90, 99, 95, "王五", 60, 66, 68], "2": ["张三", 150, 120, 100, "李四", 90, 99, 95, "王五", 60, 66, 68]}
+
diff --git a/GitRangerLiu/0018/city.xls b/GitRangerLiu/0018/city.xls
new file mode 100644
index 00000000..0bd9cdc2
Binary files /dev/null and b/GitRangerLiu/0018/city.xls differ
diff --git a/GitRangerLiu/0018/city.xml b/GitRangerLiu/0018/city.xml
new file mode 100644
index 00000000..5b794da8
--- /dev/null
+++ b/GitRangerLiu/0018/city.xml
@@ -0,0 +1,4 @@
+
+
+ {"1": "上海", "3": "成都", "2": "北京"}
+
diff --git a/GitRangerLiu/0018/excel_to_xml.py b/GitRangerLiu/0018/excel_to_xml.py
new file mode 100644
index 00000000..93be71bc
--- /dev/null
+++ b/GitRangerLiu/0018/excel_to_xml.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+import json
+import xlrd
+from lxml import etree
+
+testfile = 'city.xls'
+savename = 'city.xml'
+sheetname = 'big city'
+
+def to_xml(data):
+ root = etree.Element('root')
+ stu = etree.SubElement(root, 'cities')
+ comm = etree.Comment(u'城市信息')
+ stu.append(comm)
+
+ stu.text = data
+ tree = etree.ElementTree(root)
+ tree.write(savename, encoding = 'utf-8', pretty_print = True, \
+ xml_declaration = True)
+
+def read_excel(testfile):
+ book = xlrd.open_workbook(testfile)
+ sheet = book.sheet_by_name(sheetname)
+ data = {}
+ rows = sheet.nrows
+ cols = sheet.ncols
+ for i in range(rows):
+ data[str(int(sheet.cell_value(i, 0)))] = sheet.cell_value(i, 1)
+ #The ensure_ascii param is very important for Chinese character, see the
+ #document
+ return json.dumps(data, ensure_ascii = False)
+
+
+if __name__ == '__main__':
+ data = read_excel(testfile)
+ to_xml(data)
+
diff --git a/GitRangerLiu/0019/excel_to_xml.py b/GitRangerLiu/0019/excel_to_xml.py
new file mode 100644
index 00000000..bcad133f
--- /dev/null
+++ b/GitRangerLiu/0019/excel_to_xml.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+import json
+import xlrd
+from lxml import etree
+
+testfile = 'numbers.xls'
+savename = 'numbers.xml'
+sheetname = 'number'
+
+def to_xml(data):
+ root = etree.Element('root')
+ stu = etree.SubElement(root, 'numbers')
+ comm = etree.Comment(u'数字信息')
+ stu.append(comm)
+
+ stu.text = data
+ tree = etree.ElementTree(root)
+ tree.write(savename, encoding = 'utf-8', pretty_print = True, \
+ xml_declaration = True)
+
+def read_excel(testfile):
+ book = xlrd.open_workbook(testfile)
+ sheet = book.sheet_by_name(sheetname)
+ data = []
+ rows = sheet.nrows
+ cols = sheet.ncols
+ for i in range(rows):
+ line = [int(sheet.cell_value(i, j)) for j in range(cols)]
+ data.append(line)
+ return json.dumps(data)
+
+
+if __name__ == '__main__':
+ data = read_excel(testfile)
+ to_xml(data)
+
diff --git a/GitRangerLiu/0019/numbers.xls b/GitRangerLiu/0019/numbers.xls
new file mode 100644
index 00000000..c12c1a79
Binary files /dev/null and b/GitRangerLiu/0019/numbers.xls differ
diff --git a/GitRangerLiu/0019/numbers.xml b/GitRangerLiu/0019/numbers.xml
new file mode 100644
index 00000000..1ba54401
--- /dev/null
+++ b/GitRangerLiu/0019/numbers.xml
@@ -0,0 +1,4 @@
+
+
+ [[1, 82, 65535], [20, 90, 13], [26, 809, 1024]]
+
diff --git a/Huangyunbo1996/0001/GenerateActivationCode.py b/Huangyunbo1996/0001/GenerateActivationCode.py
new file mode 100644
index 00000000..7e0169b1
--- /dev/null
+++ b/Huangyunbo1996/0001/GenerateActivationCode.py
@@ -0,0 +1,29 @@
+#-*- coding:utf-8 -*-
+import uuid
+from itertools import dropwhile
+
+def generateActivationCode(num):
+ codeList = []
+ for i in range(num):
+ code = str(uuid.uuid4()).replace('-','').upper()
+ while code in codeList:
+ code = str(uuid.uuid4()).replace('-','').upper()
+ codeList.append(code)
+
+ for code in codeList:
+ print(code)
+
+if __name__ == '__main__':
+ generateActivationCode(200)
+
+#output
+# 4A5C6F8482544BA8B61F26945E8DA6CA
+# 002751306CA34E798BE492379F14F09B
+# AD2FD3F1C5CC4769AA3C9FF1D9247C77
+# BB9BB4D6B4AC490A800929B7ABA0CF48
+# 28F0A9E062964313B36556A6D4B62753
+# 1C5D17EF07FC484B8DADB15FAC0D9BB5
+# AC2146D68BA34199B75ACC727D2B017D
+# 64866B2136C641DA956A3A52274DA3E0
+# F00DDD20295C4E2CBDC8E62A0C72AABC
+#...
\ No newline at end of file
diff --git a/Huangyunbo1996/0002/ActivationCode_MySql.py b/Huangyunbo1996/0002/ActivationCode_MySql.py
new file mode 100644
index 00000000..bcca6548
--- /dev/null
+++ b/Huangyunbo1996/0002/ActivationCode_MySql.py
@@ -0,0 +1,42 @@
+#-*- coding:utf-8 -*-
+import uuid
+import pymysql
+
+def generateActivationCode(num):
+ codeList = []
+ for i in range(num):
+ code = str(uuid.uuid4()).replace('-','').upper()
+ while code in codeList:
+ code = str(uuid.uuid4()).replace('-','').upper()
+ codeList.append(code)
+
+ return codeList
+
+def storeInMysql(codelist):
+ try:
+ conn = pymysql.connect(host='127.0.0.1',user='root',passwd='root',db='mysql')
+ cur = conn.cursor()
+ except BaseException as e:
+ print(e)
+ else:
+ try:
+ cur.execute('CREATE DATABASE IF NOT EXISTS activation_code')
+ cur.execute('USE activation_code')
+ cur.execute('''CREATE TABLE IF NOT EXISTS code(
+
+ id INT NOT NULL AUTO_INCREMENT,
+ code VARCHAR(32) NOT NULL,
+ PRIMARY KEY(id)
+ )''')
+ for code in codelist:
+ cur.execute('INSERT INTO code(code) VALUES(%s)',(code))
+ cur.connection.commit()
+ except BaseException as e:
+ print(e)
+ finally:
+ cur.close()
+ conn.close()
+
+if __name__ == '__main__':
+ storeInMysql(generateActivationCode(200))
+ print('OK!')
\ No newline at end of file
diff --git a/Huangyunbo1996/0004/Word_Statistics.py b/Huangyunbo1996/0004/Word_Statistics.py
new file mode 100644
index 00000000..bbd8c7ce
--- /dev/null
+++ b/Huangyunbo1996/0004/Word_Statistics.py
@@ -0,0 +1,131 @@
+#-*-coding:utf-8-*-
+import os
+import re
+
+def word_statistics(filePath):
+ wordDict = {}
+ with open(filePath,'rt') as f:
+ for line in f:
+ words = re.split('[,.\s]\s*',line)
+ for word in words:
+ if word.lower() in wordDict and word.isalpha():
+ wordDict[word.lower()] += 1
+ elif word.lower() not in wordDict and word.isalpha():
+ wordDict[word.lower()] = 1
+
+ wordSorted = sorted(zip(wordDict.keys(),wordDict.values()))
+
+ for word,count in wordSorted:
+ print(word,':',count)
+
+if __name__ == '__main__':
+ word_statistics(r'...\test.txt')
+
+#output:
+# a : 11
+# about : 1
+# access : 1
+# algorithm : 1
+# allowing : 3
+# allowingwith : 1
+# alone : 4
+# an : 2
+# and : 1
+# anything : 1
+# are : 1
+# as : 3
+# attribute : 1
+# attributes : 6
+# calling : 1
+# calls : 1
+# can : 6
+# case : 1
+# change : 1
+# class : 4
+# code : 5
+# complicated : 4
+# control : 1
+# creates : 1
+# defining : 1
+# definition : 1
+# do : 4
+# drive : 1
+# easily : 1
+# easy : 5
+# etc : 1
+# everything : 4
+# expose : 1
+# extra : 2
+# fact : 1
+# fall : 4
+# for : 6
+# forget : 1
+# function : 6
+# functions : 4
+# generator : 8
+# generators : 4
+# going : 1
+# history : 1
+# how : 1
+# however : 1
+# if : 7
+# implement : 1
+# in : 6
+# instance : 1
+# interact : 5
+# internal : 1
+# into : 4
+# is : 6
+# it : 9
+# iteration : 1
+# just : 1
+# lead : 4
+# like : 1
+# loop : 1
+# makes : 1
+# method : 5
+# methods : 1
+# might : 1
+# needs : 4
+# normal : 1
+# of : 10
+# one : 1
+# or : 1
+# other : 5
+# part : 1
+# parts : 4
+# potential : 1
+# program : 4
+# provide : 1
+# putting : 1
+# rather : 4
+# require : 1
+# shown : 2
+# since : 1
+# solution : 1
+# state : 1
+# step : 1
+# subtlety : 1
+# such : 1
+# technique : 1
+# than : 1
+# that : 3
+# the : 13
+# this : 6
+# to : 22
+# trap : 4
+# treat : 1
+# trying : 4
+# unusual : 4
+# use : 2
+# user : 1
+# users : 1
+# using : 1
+# via : 1
+# want : 1
+# ways : 4
+# with : 13
+# would : 1
+# write : 1
+# you : 7
+# your : 6
diff --git a/Huangyunbo1996/0007/lines.py b/Huangyunbo1996/0007/lines.py
new file mode 100644
index 00000000..59ab876d
--- /dev/null
+++ b/Huangyunbo1996/0007/lines.py
@@ -0,0 +1,38 @@
+#-*- coding:utf-8 -*-
+import os
+
+codeLines = 0
+commentLines = 0
+blankLines = 0
+
+def CountLines(countDir,ext,ignore):
+
+ global codeLines
+ global commentLines
+ global blankLines
+
+ for file in os.listdir(countDir):
+ if os.path.isdir(os.path.join(countDir,file)) and file != ignore:
+ CountLines(os.path.join(countDir,file),ext,ignore)
+ else:
+ if os.path.splitext(file)[1].strip('.') == ext:
+ print(file)
+ with open(os.path.join(countDir,file),'r',encoding='utf-8') as f:
+ for line in f:
+ if line.strip().startswith('#'):
+ commentLines = commentLines + 1
+ elif line.strip() == '':
+ blankLines = blankLines + 1
+ else:
+ codeLines = codeLines + 1
+
+
+
+
+if __name__ == '__main__':
+ countDir = input('文件夹路径:')
+ ext = input('文件类型:')
+ ignore = input('需要忽略的文件夹:')
+
+ CountLines(countDir,ext,ignore)
+ print('代码行数:%d,注释行数:%d,空行数:%d'%(codeLines,commentLines,blankLines))
\ No newline at end of file
diff --git a/Lyndon1994/0000.py b/Lyndon1994/0000.py
new file mode 100644
index 00000000..85a40643
--- /dev/null
+++ b/Lyndon1994/0000.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+# 将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+from PIL import Image, ImageFont, ImageDraw
+
+
+def add_num(img):
+ im = Image.open(img)
+ w, h = im.size
+ font = ImageFont.truetype('/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf', 30)
+ fillcolor = "#ff0000"
+ draw = ImageDraw.Draw(im)
+ draw.text((w - 20, 0), '1', font=font, fill=fillcolor)
+ im.save('r.jpg', 'jpeg')
+
+
+if __name__ == '__main__':
+ add_num('1.jpg')
diff --git a/Lyndon1994/0001.py b/Lyndon1994/0001.py
new file mode 100644
index 00000000..0b18eb56
--- /dev/null
+++ b/Lyndon1994/0001.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# 做为 Apple Store App 独立开发者,你要搞限时促销,
+# 为你的应用生成激活码(或者优惠券),
+# 使用 Python 如何生成 200 个激活码(或者优惠券)
+import random
+import string
+
+forSelect = string.ascii_letters + string.digits
+
+
+def generate_code(count, length):
+ for x in range(count):
+ Re = ""
+ for y in range(length):
+ Re += random.choice(forSelect)
+ print(Re)
+
+
+if __name__ == '__main__':
+ generate_code(200, 20)
diff --git a/Lyndon1994/0002.py b/Lyndon1994/0002.py
new file mode 100644
index 00000000..b1b5831d
--- /dev/null
+++ b/Lyndon1994/0002.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+# 第 0002 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。
+import mysql.connector
+
+import random
+import string
+
+import mysql.connector
+
+forSelect = string.ascii_letters + string.digits
+
+
+def generate_code(count, length):
+ for x in range(count):
+ Re = ""
+ for y in range(length):
+ Re += random.choice(forSelect)
+ yield Re
+
+
+def save_code():
+ conn = mysql.connector.connect(user='root', password='l', database='test')
+ cursor = conn.cursor()
+ codes = generate_code(200, 20)
+ for code in codes:
+ cursor.execute("INSERT INTO `code`(`code`) VALUES(%s)", params=[code])
+ conn.commit()
+ cursor.close()
+
+
+if __name__ == '__main__':
+ save_code()
diff --git a/Lyndon1994/0003.py b/Lyndon1994/0003.py
new file mode 100644
index 00000000..bb6f4480
--- /dev/null
+++ b/Lyndon1994/0003.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+# **第 0003 题:**将 0001 题生成的 200 个激活码(或者优惠券)保存到 Redis 非关系型数据库中。
+
+import redis
+import random
+import string
+
+forSelect = string.ascii_letters + string.digits
+
+
+def generate_code(count, length):
+ for x in range(count):
+ Re = ""
+ for y in range(length):
+ Re += random.choice(forSelect)
+ yield Re
+
+
+def save_code():
+ r = redis.Redis(host='127.0.0.1', port='6379', password='linyii')
+ codes = generate_code(200, 20)
+ p = r.pipeline()
+ for code in codes:
+ p.sadd('code', code)
+ p.execute()
+ return r.scard('code')
+
+
+if __name__ == '__main__':
+ save_code()
diff --git a/Lyndon1994/0004.py b/Lyndon1994/0004.py
new file mode 100644
index 00000000..ffcd6867
--- /dev/null
+++ b/Lyndon1994/0004.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# **第 0004 题:**任一个英文的纯文本文件,统计其中的单词出现的个数。
+import re
+
+fin = open('source/0004-text.txt', 'r')
+str = fin.read()
+
+reObj = re.compile('\b?(\w+)\b?')
+words = reObj.findall(str)
+
+wordDict = dict()
+
+for word in words:
+ if word.lower() in wordDict:
+ wordDict[word.lower()] += 1
+ else:
+ wordDict[word] = 1
+
+for key, value in wordDict.items():
+ print('%s: %s' % (key, value))
diff --git a/Lyndon1994/0005.py b/Lyndon1994/0005.py
new file mode 100644
index 00000000..0762f9fe
--- /dev/null
+++ b/Lyndon1994/0005.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+"""
+**第 0005 题:**
+你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+"""
+
+from PIL import Image
+import os
+
+path = 'source/0005/pics'
+resultPath = 'source/0005/result'
+if not os.path.isdir(resultPath):
+ os.mkdir(resultPath)
+for picName in os.listdir(path):
+ picPath = os.path.join(path, picName)
+ print(picPath)
+ 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(resultPath+'/finish_' + picName.split('.')[0] + '.jpg', 'jpeg')
diff --git a/Lyndon1994/0006.py b/Lyndon1994/0006.py
new file mode 100644
index 00000000..a33d1b1a
--- /dev/null
+++ b/Lyndon1994/0006.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+"""
+**第 0006 题:**
+你有一个目录,放了你一个月的日记,都是 txt,
+为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+"""
+import os
+import re
+
+
+def findWord(DirPath):
+ if not os.path.isdir(DirPath):
+ return
+ fileList = os.listdir(DirPath)
+ reObj = re.compile('\b?(\w+)\b?')
+ for file in fileList:
+ filePath = os.path.join(DirPath, file)
+ if os.path.isfile(filePath) and os.path.splitext(filePath)[1] == '.txt':
+ with open(filePath) as f:
+ data = f.read()
+ words = reObj.findall(data)
+ wordDict = dict()
+ for word in words:
+ word = word.lower()
+ if word in ['a', 'the', 'to']:
+ continue
+ if word in wordDict:
+ wordDict[word] += 1
+ else:
+ wordDict[word] = 1
+ ansList = sorted(wordDict.items(), key=lambda t: t[1], reverse=True)
+ print('file: %s->the most word: %s' % (file, ansList[1]))
+
+
+if __name__ == '__main__':
+ findWord('source/0006')
diff --git a/Lyndon1994/0007.py b/Lyndon1994/0007.py
new file mode 100644
index 00000000..2d70409c
--- /dev/null
+++ b/Lyndon1994/0007.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+"""
+**第 0007 题:**
+有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+"""
+import os
+import re
+
+
+def stat_code(dir_path):
+ if not os.path.isdir(dir_path):
+ return
+ exp_re = re.compile(r'^#.*')
+ file_list = os.listdir(dir_path)
+ print("%s\t%s\t%s\t%s" % ('file', 'all_lines', 'space_lines', 'exp_lines'))
+ for file in file_list:
+ file_path = os.path.join(dir_path, file)
+ if os.path.isfile(file_path) and os.path.splitext(file_path)[1] == '.py':
+ with open(file_path) as f:
+ all_lines = 0
+ space_lines = 0
+ exp_lines = 0
+ for line in f.readlines():
+ all_lines += 1
+ if line.strip() == '':
+ space_lines += 1
+ continue
+ exp = exp_re.findall(line.strip())
+ if exp:
+ exp_lines += 1
+ print("%s\t%s\t%s\t%s" % (file, all_lines, space_lines, exp_lines))
+
+
+if __name__ == '__main__':
+ stat_code('.')
diff --git a/Lyndon1994/0008.py b/Lyndon1994/0008.py
new file mode 100644
index 00000000..d4b8b939
--- /dev/null
+++ b/Lyndon1994/0008.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+"""
+第 0008 题:一个HTML文件,找出里面的正文。
+"""
+
+import requests,re
+from bs4 import BeautifulSoup
+
+url = 'http://linyii.com'
+data=requests.get(url)
+r = re.findall(r'[\s\S]*',data.text)
+print(r[0])
+
+print('---------------------------------------------------------------')
+soup = BeautifulSoup(data.text,'html.parser')
+print(soup.body.text)
\ No newline at end of file
diff --git a/Lyndon1994/0009.py b/Lyndon1994/0009.py
new file mode 100644
index 00000000..6ba12951
--- /dev/null
+++ b/Lyndon1994/0009.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+"""
+第 0009 题:一个HTML文件,找出里面的链接。
+"""
+import requests,re,os
+from bs4 import BeautifulSoup
+
+url = 'http://linyii.com'
+data=requests.get(url)
+# urls = re.findall(r'',data.text)
+# print(urls)
+
+soup = BeautifulSoup(data.text,'html.parser')
+urls = soup.findAll('a')
+for u in urls:
+ print(u['href'])
\ No newline at end of file
diff --git a/Lyndon1994/0010.py b/Lyndon1994/0010.py
new file mode 100644
index 00000000..44e6f034
--- /dev/null
+++ b/Lyndon1994/0010.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+# 第 0010 题:使用 Python 生成类似于下图中的字母验证码图片
+
+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 = 60 * 4
+height = 60
+image = Image.new('RGB', (width, height), (255, 255, 255))
+# 创建Font对象:
+font = ImageFont.truetype('/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.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')
\ No newline at end of file
diff --git a/Lyndon1994/0011.py b/Lyndon1994/0011.py
new file mode 100644
index 00000000..bbe501e8
--- /dev/null
+++ b/Lyndon1994/0011.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+"""
+第 0011 题:
+敏感词文本文件 filtered_words.txt,里面的内容为以下内容,
+当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
+"""
+word_filter=set()
+with open('source/0011/filtered_words.txt') as f:
+ for w in f.readlines():
+ word_filter.add(w.strip())
+
+while True:
+ s=input()
+ if s == 'exit':
+ break
+ if s in word_filter:
+ print('Freedom')
+ else:
+ print('Human Rights')
diff --git a/Lyndon1994/0012.py b/Lyndon1994/0012.py
new file mode 100644
index 00000000..5d14b07c
--- /dev/null
+++ b/Lyndon1994/0012.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+"""
+第 0012 题:
+敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,
+当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+"""
+word_filter=set()
+with open('source/0011/filtered_words.txt') as f:
+ for w in f.readlines():
+ word_filter.add(w.strip())
+
+while True:
+ s=input()
+ if s == 'exit':
+ break
+ for w in word_filter:
+ if w in s:
+ s= s.replace(w,'*'*len(w))
+ print(s)
+
diff --git a/Lyndon1994/0013.py b/Lyndon1994/0013.py
new file mode 100644
index 00000000..c7b601b7
--- /dev/null
+++ b/Lyndon1994/0013.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+"""
+第 0013 题: 用 Python 写一个爬图片的程序,爬 这个链接里的日本妹子图片 :-)[http://tieba.baidu.com/p/2166231880]
+"""
+import os
+
+import requests
+from bs4 import BeautifulSoup
+
+url='http://tieba.baidu.com/p/2166231880'
+html =requests.get(url)
+soup =BeautifulSoup(html.text,'html.parser')
+img_urls=soup.findAll('img',bdwater='杉本有美吧,1280,860')
+for img_url in img_urls:
+ img_src=img_url['src']
+ os.path.split(img_src)[1]
+ with open('source/0013/'+os.path.split(img_src)[1],'wb') as f:
+ f.write(requests.get(img_src).content)
diff --git a/Lyndon1994/0014.py b/Lyndon1994/0014.py
new file mode 100644
index 00000000..7df37da2
--- /dev/null
+++ b/Lyndon1994/0014.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+"""
+纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
+请将上述内容写到 student.xls 文件中,如下图所示:
+"""
+from collections import OrderedDict
+
+import xlwt,json
+
+with open('source/0014/student.txt','r') as f:
+ data = json.load(f, object_pairs_hook=OrderedDict)
+ workbook = xlwt.Workbook()
+ sheet1 = workbook.add_sheet('student', cell_overwrite_ok=True)
+ for index, (key, values) in enumerate(data.items()):
+ sheet1.write(index, 0, key)
+ for i, value in enumerate(values):
+ sheet1.write(index, i+1, value)
+ workbook.save('source/0014/student.xls')
\ No newline at end of file
diff --git a/Lyndon1994/0015.py b/Lyndon1994/0015.py
new file mode 100644
index 00000000..50f084e3
--- /dev/null
+++ b/Lyndon1994/0015.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+"""
+第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+请将上述内容写到 city.xls 文件中,如下图所示:
+"""
+import xlwt,json
+
+with open('source/0015/city.txt','r') as f:
+ data = json.load(f)
+ workbook = xlwt.Workbook()
+ sheet1 = workbook.add_sheet('city', cell_overwrite_ok=True)
+ for index, (key, value) in enumerate(data.items()):
+ sheet1.write(index, 0, key)
+ sheet1.write(index, 1, value)
+ workbook.save('source/0015/city.xls')
\ No newline at end of file
diff --git a/Lyndon1994/0017.py b/Lyndon1994/0017.py
new file mode 100644
index 00000000..7aa67244
--- /dev/null
+++ b/Lyndon1994/0017.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+"""
+ 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+
+
+
+
+{
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+}
+
+
+"""
+import xlwt, json
+from collections import OrderedDict
+
+with open('source/0014/student.txt', 'r') as f:
+ L = []
+ L.append(r"""
+
+
+
+
+ """)
+ L.append(f.read())
+ L.append(r"""
+
+
+ """)
+ with open('source/0014/student.xml', 'w') as s:
+ s.write(''.join(L))
diff --git a/Lyndon1994/0020.py b/Lyndon1994/0020.py
new file mode 100644
index 00000000..d59d90e8
--- /dev/null
+++ b/Lyndon1994/0020.py
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+"""
+第 0020 题:
+登陆中国联通网上营业厅 后选择「自助服务」 --> 「详单查询」,
+然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,
+就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。
+写代码,对每月通话时间做个统计。
+"""
+import time
+
+import re
+import xlrd
+
+
+def str2sec(str):
+ print(str)
+ sec = 0
+ time_re = re.compile(r'(\d+)(\D+)')
+ time_list = time_re.findall(str)
+ for time_item in time_list:
+ if time_item[1] == '秒':
+ sec += int(time_item[0])
+ elif time_item[1] == '分':
+ sec += int(time_item[0]) * 60
+ elif time_item[1] == '小时':
+ sec += int(time_item[0]) * 3600
+ print(sec)
+ return sec
+
+
+def sec2str(sec):
+ h = sec // 3600
+ m = sec % 3600 // 60
+ s = sec % 60
+ return '%s小时%s分%s秒' % (h, m, s)
+
+
+all_time = 0 # 使用总时间(秒)
+start_time = time.mktime(time.strptime('2017-03-01', '%Y-%m-%d'))
+end_time = time.mktime(time.strptime('2017-04-01', '%Y-%m-%d'))
+data = xlrd.open_workbook('source/0020/2017年03月语音通信.xls')
+table = data.sheets()[0]
+nrows = table.nrows
+
+for i in range(nrows):
+ if i == 0:
+ continue
+ this_time = time.mktime(time.strptime(table.row_values(i)[2], '%Y-%m-%d %H:%M:%S'))
+ if this_time >= start_time and this_time < end_time:
+ all_time += str2sec(table.row_values(i)[3])
+
+print(sec2str(all_time))
diff --git a/Lyndon1994/0021.py b/Lyndon1994/0021.py
new file mode 100644
index 00000000..5f7d68b7
--- /dev/null
+++ b/Lyndon1994/0021.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+"""
+第 0021 题: 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。
+"""
+import os
+from hashlib import sha256
+from hmac import HMAC
+
+
+def encrypt_password(password,salt=None):
+ if salt is None:
+ salt=os.urandom(8)
+
+ if isinstance(salt,str):
+ salt=salt.encode('utf-8')
+
+ result=password.encode('utf-8')
+ for i in range(10):
+ result=HMAC(result,salt,sha256).digest()
+ return salt+result
+
+if __name__ == '__main__':
+ print(encrypt_password('123456','a'))
\ No newline at end of file
diff --git a/Lyndon1994/0023/flask-demo.py b/Lyndon1994/0023/flask-demo.py
new file mode 100644
index 00000000..9cf46c88
--- /dev/null
+++ b/Lyndon1994/0023/flask-demo.py
@@ -0,0 +1,82 @@
+import os
+import logging
+
+logging.basicConfig(level=logging.INFO)
+
+import sqlite3
+from flask import Flask, request, session, g, redirect, url_for, abort, \
+ render_template, flash
+
+import time
+
+app = Flask(__name__)
+
+class Config(object):
+ DEBUG = True
+ USERNAME='admin'
+ PASSWORD='1234'
+ DATABASE='/tmp/flaskr.db'
+ DATABASE_URI = 'sqlite://:memory:'
+ SECRET_KEY='shdjkandscbowduAIJNnjas9aSKAJSka'
+
+# 设置一个名为 FLASKR_SETTINGS 的环境变量,指向要加载的配置文件。
+# 启用静默模式告诉 Flask 在没有设置该环境变量的情况下噤声。
+app.config.from_object(Config)
+
+
+# app.config.from_envvar('FLASKR_SETTINGS', silent=True)
+
+def connect_db():
+ """Connects to the specific database."""
+ logging.info('Connects to the specific database.')
+ rv = sqlite3.connect(app.config['DATABASE'])
+ rv.row_factory = sqlite3.Row
+ g.db = rv
+ logging.info(rv)
+ return rv
+
+
+def init_db():
+ with app.app_context():
+ db = connect_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.template_filter('format_time')
+def format_time_filter(t):
+ return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(t))
+
+@app.route('/')
+def index():
+ cur = g.db.execute('select name,title,text,created_at from entries order by id DESC ')
+ entries = [dict(name=row[0], title=row[1], text=row[2], created_at=row[3]) for row in cur.fetchall()]
+ logging.info(entries)
+ return render_template('index.html', entries=entries)
+
+
+@app.route('/add', methods=['POST'])
+def add_entry():
+ g.db.execute('insert into entries (name,title,text,created_at) VALUES (?,?,?,?)',
+ (request.form['name'], request.form['title'], request.form['text'], time.time()))
+ g.db.commit()
+ flash('New entry was successfully posted')
+ return redirect(url_for('index'))
+
+if __name__ == '__main__':
+ init_db()
+ app.secret_key = app.config['SECRET_KEY']
+ app.run()
diff --git a/Lyndon1994/0023/schema.sql b/Lyndon1994/0023/schema.sql
new file mode 100644
index 00000000..9f1ea077
--- /dev/null
+++ b/Lyndon1994/0023/schema.sql
@@ -0,0 +1,8 @@
+drop table if exists entries;
+create table entries (
+ id integer primary key autoincrement,
+ name string not null,
+ title string not null,
+ text string not null,
+ created_at integer not null
+);
\ No newline at end of file
diff --git a/Lyndon1994/0023/static/style.css b/Lyndon1994/0023/static/style.css
new file mode 100644
index 00000000..1e26e663
--- /dev/null
+++ b/Lyndon1994/0023/static/style.css
@@ -0,0 +1,18 @@
+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; }
\ No newline at end of file
diff --git a/Lyndon1994/0023/templates/index.html b/Lyndon1994/0023/templates/index.html
new file mode 100644
index 00000000..3f3dad5c
--- /dev/null
+++ b/Lyndon1994/0023/templates/index.html
@@ -0,0 +1,26 @@
+{% extends "layout.html" %}
+{% block body %}
+
+
+
+ {% if not session.login %}
+ Name:
+
+ {% endif %}
+ Title:
+
+ Text:
+
+
+
+
+
+
+ {% for entry in entries %}
+ {{ entry.name }}: {{ entry.created_at|format_time }}
+ {{ entry.title }} {{ entry.text|safe }}
+ {% else %}
+ Unbelievable. No entries here so far
+ {% endfor %}
+
+{% endblock %}
diff --git a/Lyndon1994/0023/templates/layout.html b/Lyndon1994/0023/templates/layout.html
new file mode 100644
index 00000000..acc89ada
--- /dev/null
+++ b/Lyndon1994/0023/templates/layout.html
@@ -0,0 +1,17 @@
+
+
+
+
+ Flaskr
+
+
+
+
+
Flaskr
+ {% for message in get_flashed_messages() %}
+
{{ message }}
+ {% endfor %}
+ {% block body %}{% endblock %}
+
+
+
\ 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/Lyndon1994/source/0015/city.txt b/Lyndon1994/source/0015/city.txt
new file mode 100644
index 00000000..312f5c19
--- /dev/null
+++ b/Lyndon1994/source/0015/city.txt
@@ -0,0 +1,5 @@
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
\ No newline at end of file
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/README.md b/README.md
index 7b884541..5d75dd92 100644
--- a/README.md
+++ b/README.md
@@ -8,20 +8,20 @@ Show Me the Code Python version.
### 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/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/Yixuan/0001/workfile b/Yixuan/0001/workfile
new file mode 100644
index 00000000..e69de29b
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/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/cnwangjie b/cnwangjie
new file mode 160000
index 00000000..98664848
--- /dev/null
+++ b/cnwangjie
@@ -0,0 +1 @@
+Subproject commit 986648481f91753fe53fc8457df9a30cdfb7c395
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/doubi_sdust/0003.py b/doubi_sdust/0003.py
new file mode 100644
index 00000000..e69de29b
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/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/fybhp/practice13/practice13/__init__.py b/fybhp/practice13/practice13/__init__.py
new file mode 100644
index 00000000..e69de29b
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/fybhp/practice16/numbers.txt b/fybhp/practice16/numbers.txt
new file mode 100644
index 00000000..9f246488
--- /dev/null
+++ b/fybhp/practice16/numbers.txt
@@ -0,0 +1,5 @@
+[
+ [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 @@
+
+
+ {% for message in messages %}
+
+
+ {{ message.name}} 留言于 {{message.time}}
+
+
+ {{ message.message}}
+
+
+
+ {% endfor %}
+
+
diff --git a/fybhp/practice23/templates/base.html b/fybhp/practice23/templates/base.html
new file mode 100644
index 00000000..783e3c13
--- /dev/null
+++ b/fybhp/practice23/templates/base.html
@@ -0,0 +1,40 @@
+{% extends "bootstrap/base.html" %}
+
+{% block title %}简易留言薄{% endblock %}
+
+{% block head %}
+{{ super() }}
+
+
+{% endblock %}
+
+{% block navbar %}
+
+{% endblock %}
+
+{% block content %}
+
+ {% for message in get_flashed_messages() %}
+
+ ×
+ {{ message }}
+
+ {% endfor %}
+
+ {% block page_content %}{% endblock %}
+
+{% endblock %}
+
+
diff --git a/fybhp/practice23/templates/index.html b/fybhp/practice23/templates/index.html
new file mode 100644
index 00000000..8a95c066
--- /dev/null
+++ b/fybhp/practice23/templates/index.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% block title %}留言薄{% endblock %}
+
+{% block page_content %}
+
+{{ wtf.quick_form(form) }}
+
+ 留言历史信息
+
+{% include '_posts.html' %}
+{% endblock %}
diff --git a/fybhp/practice24/TodoList.py b/fybhp/practice24/TodoList.py
new file mode 100644
index 00000000..2d50b103
--- /dev/null
+++ b/fybhp/practice24/TodoList.py
@@ -0,0 +1,95 @@
+# -*- coding:utf-8 -*-
+from flask import Flask,render_template,url_for,redirect,flash,request,session
+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
+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 Thing(Form):
+ thing = StringField(validators=[Required()])
+ submit = SubmitField(u'增加事务')
+
+class Search(Form):
+ sthing = StringField(validators=[Required()])
+ submit = SubmitField(u'Search')
+
+class Things(db.Model):
+ __tablename__ = 'things'
+ id = db.Column(db.Integer,primary_key = True)
+ thing = db.Column(db.String)
+ time = db.Column(db.String,default=datetime.utcnow)
+
+ @staticmethod
+ def generate_fake(count=100):
+ from sqlalchemy.exc import IntegrityError
+ from random import seed
+ import forgery_py
+
+ seed()
+ for i in range(count):
+ u = Things(thing=forgery_py.lorem_ipsum.word())
+ db.session.add(u)
+ try:
+ db.session.commit()
+ except IntegrityError:
+ db.session.rollback()
+
+@app.route('/',methods = ['GET','POST'])
+def index():
+ form1 = Thing()
+ form2 = Search()
+ if form1.validate_on_submit():
+ thing = Things(thing=form1.thing.data)
+ db.session.add(thing)
+ flash(u'任务创建成功')
+ return redirect(url_for('index'))
+
+ page = request.args.get('page',1,type=int)
+ if form2.validate_on_submit():
+ session['search'] = form2.sthing.data
+ return redirect(url_for('.search'))
+ pagination = Things.query.order_by(Things.time.desc()).paginate(\
+ page,per_page=20,error_out=False)
+ things = pagination.items
+ return render_template('index.html',things = things,form1 = form1,form2 = form2,pagination=pagination)
+
+@app.route('/del/',methods = ['GET','POST'])
+def delthing(delthing=None):
+ if delthing != None:
+ todel = Things.query.filter_by(id=delthing).first()
+ db.session.delete(todel)
+ return redirect(url_for('index'))
+
+@app.route('/search/')
+def search():
+ form1 = Thing()
+ form2 = Search()
+ page = request.args.get('page', 1, type=int)
+ if form2.validate_on_submit():
+ return redirect(url_for('search'))
+ pagination = Things.query.filter_by(thing=session['search']).paginate( \
+ page, per_page=20, error_out=False)
+ things = pagination.items
+ print things
+ return render_template('index.html',things = things,form1 = form1,form2 = form2,pagination=pagination)
+
+if __name__ == '__main__':
+ manager.run()
\ No newline at end of file
diff --git a/fybhp/practice24/templates/_macros.html b/fybhp/practice24/templates/_macros.html
new file mode 100644
index 00000000..b5d55a39
--- /dev/null
+++ b/fybhp/practice24/templates/_macros.html
@@ -0,0 +1,29 @@
+{% macro pagination_widget(pagination, endpoint) %}
+
+{% endmacro %}
diff --git a/fybhp/practice24/templates/bootstrap.min.css b/fybhp/practice24/templates/bootstrap.min.css
new file mode 100644
index 00000000..3fc50a89
--- /dev/null
+++ b/fybhp/practice24/templates/bootstrap.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;pointer-events:none;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;pointer-events:none;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
+/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/fybhp/practice24/templates/index.html b/fybhp/practice24/templates/index.html
new file mode 100644
index 00000000..1fd2d608
--- /dev/null
+++ b/fybhp/practice24/templates/index.html
@@ -0,0 +1,66 @@
+{% extends "bootstrap/base.html" %}
+{% import "bootstrap/wtf.html" as wtf %}
+{% import "_macros.html" as macros %}
+
+{% block title %}备忘本{% endblock %}
+
+{% block head %}
+{{ super() }}
+
+
+{% endblock %}
+
+{% block navbar %}
+
+{% endblock %}
+
+{% block content %}
+
+ {{ wtf.quick_form(form1) }}
+
+ {{ wtf.quick_form(form2) }}
+
+ {% for message in get_flashed_messages() %}
+
+ ×
+ {{ message }}
+
+ {% endfor %}
+
+ {% block page_content %}
+
+
+
+
+ 事务
+ 管理
+
+
+
+ {% for thing in things %}
+
+ {{ thing.thing }}
+ 删除
+
+ {% endfor %}
+
+
+
+
+ {% endblock %}
+
+{% 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Python 练习册,每天一个小程序
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New pull request
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ README.md
+
+
+
Python 练习册,每天一个小程序
+
+ 说明:
+
+
+
+
+Talk is cheap. Show me the code.--Linus Torvalds
+
+
+
+
+第 0000 题: 将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+类似于图中效果
+
+
+
+第 0001 题: 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码 (或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+第 0002 题 :将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。
+
+第 0003 题: 将 0001 题生成的 200 个激活码(或者优惠券)保存到 Redis 非关系型数据库中。
+
+第 0004 题: 任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+第 0005 题: 你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+
+第 0006 题: 你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+
+第 0007 题: 有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+
+第 0008 题: 一个HTML文件,找出里面的正文 。
+
+第 0009 题: 一个HTML文件,找出里面的链接 。
+
+第 0010 题: 使用 Python 生成类似于下图中的字母验证码图片
+
+
+
+
+
+第 0011 题: 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
+
+
+第 0012 题: 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+
+第 0013 题: 用 Python 写一个爬图片的程序,爬 这个链接里的日本妹子图片 :-)
+
+
+
+第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
+
+
+请将上述内容写到 student.xls 文件中,如下图所示:
+
+
+
+
+阅读资料 腾讯游戏开发 XML 和 Excel 内容相互转换
+
+
+第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+
+
+请将上述内容写到 city.xls 文件中,如下图所示:
+
+
+
+第 0016 题: 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+
+
+
+第 0017 题: 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<students>
+<!--
+ 学生信息表
+ "id" : [名字, 数学, 语文, 英文]
+-->
+{
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+}
+</students>
+</root>
+
+
+第 0018 题: 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+<?xmlversion="1.0" encoding="UTF-8"?>
+<root>
+<citys>
+<!--
+ 城市信息
+-->
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+</citys>
+</root>
+
+
+第 0019 题: 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+
+所示:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<numbers>
+<!--
+ 数字信息
+-->
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+</numbers>
+</root>
+
+
+第 0020 题: 登陆中国联通网上营业厅 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。写代码,对每月通话时间做个统计。
+
+第 0021 题: 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。
+
+
+
+第 0022 题: iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。
+
+第 0023 题: 使用 Python 的 Web 框架,做一个 Web 版本 留言簿 应用。
+
+阅读资料:Python 有哪些 Web 框架
+
+
+
+
+
+第 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/practice8/practice8.py b/fybhp/practice8/practice8.py
new file mode 100644
index 00000000..dfe2241e
--- /dev/null
+++ b/fybhp/practice8/practice8.py
@@ -0,0 +1,7 @@
+# -*- coding:utf-8 -*-
+from lxml import etree
+from bs4 import BeautifulSoup
+#本想用lxml解析,不知为何打不开此html文件,上网查不到原因,换了本不想用的美汤。
+soup = BeautifulSoup(open('AGitPro.html'),'lxml')
+for section in soup.article.stripped_strings:
+ print section
diff --git a/fybhp/practice9/AGitPro.html b/fybhp/practice9/AGitPro.html
new file mode 100644
index 00000000..119983d8
--- /dev/null
+++ b/fybhp/practice9/AGitPro.html
@@ -0,0 +1,878 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GitHub - Yixiaohan/show-me-the-code: Python 练习册,每天一个小程序
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Python 练习册,每天一个小程序
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New pull request
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ README.md
+
+
+
Python 练习册,每天一个小程序
+
+ 说明:
+
+
+
+
+Talk is cheap. Show me the code.--Linus Torvalds
+
+
+
+
+第 0000 题: 将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+类似于图中效果
+
+
+
+第 0001 题: 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码 (或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+第 0002 题 :将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。
+
+第 0003 题: 将 0001 题生成的 200 个激活码(或者优惠券)保存到 Redis 非关系型数据库中。
+
+第 0004 题: 任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+第 0005 题: 你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+
+第 0006 题: 你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+
+第 0007 题: 有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+
+第 0008 题: 一个HTML文件,找出里面的正文 。
+
+第 0009 题: 一个HTML文件,找出里面的链接 。
+
+第 0010 题: 使用 Python 生成类似于下图中的字母验证码图片
+
+
+
+
+
+第 0011 题: 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
+
+
+第 0012 题: 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+
+第 0013 题: 用 Python 写一个爬图片的程序,爬 这个链接里的日本妹子图片 :-)
+
+
+
+第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
+
+
+请将上述内容写到 student.xls 文件中,如下图所示:
+
+
+
+
+阅读资料 腾讯游戏开发 XML 和 Excel 内容相互转换
+
+
+第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+
+
+请将上述内容写到 city.xls 文件中,如下图所示:
+
+
+
+第 0016 题: 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+
+
+
+第 0017 题: 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<students>
+<!--
+ 学生信息表
+ "id" : [名字, 数学, 语文, 英文]
+-->
+{
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+}
+</students>
+</root>
+
+
+第 0018 题: 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+<?xmlversion="1.0" encoding="UTF-8"?>
+<root>
+<citys>
+<!--
+ 城市信息
+-->
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+</citys>
+</root>
+
+
+第 0019 题: 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+
+所示:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<root>
+<numbers>
+<!--
+ 数字信息
+-->
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+
+</numbers>
+</root>
+
+
+第 0020 题: 登陆中国联通网上营业厅 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。写代码,对每月通话时间做个统计。
+
+第 0021 题: 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。
+
+
+
+第 0022 题: iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。
+
+第 0023 题: 使用 Python 的 Web 框架,做一个 Web 版本 留言簿 应用。
+
+阅读资料:Python 有哪些 Web 框架
+
+
+
+
+
+第 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/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/lenzzz/0000/main.py b/lenzzz/0000/main.py
new file mode 100644
index 00000000..e1152ef4
--- /dev/null
+++ b/lenzzz/0000/main.py
@@ -0,0 +1,11 @@
+from PIL import Image,ImageDraw,ImageFont
+
+im = Image.open("pic.jpg")
+x,y = im.size
+font = ImageFont.truetype("verdana.ttf", x/3)
+dr = ImageDraw.Draw(im)
+dr.text((3*x/4,0),font=font,text="4",fill="#FF0000")
+im.save("pictuer_has_number.jpg")
+
+
+
diff --git a/lenzzz/0000/pic.jpg b/lenzzz/0000/pic.jpg
new file mode 100644
index 00000000..4b998a3d
Binary files /dev/null and b/lenzzz/0000/pic.jpg differ
diff --git a/lenzzz/0000/pictuer_has_number.jpg b/lenzzz/0000/pictuer_has_number.jpg
new file mode 100644
index 00000000..9f5c9d2b
Binary files /dev/null and b/lenzzz/0000/pictuer_has_number.jpg differ
diff --git a/lenzzz/0000/verdana.ttf b/lenzzz/0000/verdana.ttf
new file mode 100644
index 00000000..59f22739
Binary files /dev/null and b/lenzzz/0000/verdana.ttf differ
diff --git a/lenzzz/0001/main.py b/lenzzz/0001/main.py
new file mode 100644
index 00000000..e4461297
--- /dev/null
+++ b/lenzzz/0001/main.py
@@ -0,0 +1,20 @@
+from random import randint
+
+def makeCode(length,number):
+ code = []
+ code_set = set(code)
+ code_map = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ limit = len(code_map)
+ while(len(code_set)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The world's leading software development platform · GitHub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Built for developers
+
+ GitHub is a development platform inspired by the way you work. From open source to business , you can host and review code, manage projects, and build software alongside millions of other developers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GitHub for teams
+
+
+ A better way to work together
+
+
+ GitHub brings teams together to work through problems, move ideas forward, and learn from each other along the way.
+
+
+
+
+
+
+
+
+
+
+
+
Write better code
+
+ Collaboration makes perfect. The conversations and code reviews that happen in Pull Requests help your team share the weight of your work and improve the software you build.
+
+
+ Learn about code review on GitHub
+
+
+
+
+
+
+
+
+
+
Manage your chaos
+
+ Take a deep breath. On GitHub, project management happens in Issues and Projects, right alongside your code. All you have to do is mention a teammate to get them involved.
+
+
+ Learn about project management on GitHub
+
+
+
+
+
+
+
+
+
+
+
security-admin
+
+
+ Security and administration
+
+
+ Boxes? Check.
+
+
+ We worried about your administrative and security needs so you don’t have to. From flexible hosting to authentication options, GitHub can help you meet your team’s requirements.
+
+
+
+
+ Learn about GitHub for Business
+
+
+
+
+
+
+
+
+
Code security
+
+ Prevent problems before they happen. Protected branches, signed commits, and required status checks protect your work and help you maintain a high standard for your code.
+
+
+
Access controlled
+
+ Encourage teams to work together while limiting access to those who need it with granular permissions and authentication through SAML/SSO and LDAP.
+
+
+
Hosted where you need it
+
+ Securely and reliably host your work on GitHub.com. Or, deploy GitHub Enterprise on your own servers or in a private cloud using Amazon Web Services, Azure or Google Cloud Platform.
+
+
+
+
+
+
+
+
+
+
integrations
+
+
+ Integrations
+
+
+ Build on GitHub
+
+
+ Customize your process with GitHub apps and an intuitive API. Integrate the tools you already use or discover new favorites to create a happier, more efficient way of working.
+
+
+ Learn about integrations
+
+
+
+
+
+
+
+
+
+
+
+
open-source
+
+
+ Community
+
+
+ Welcome home, developers
+
+
+ GitHub is home to the world’s largest community of developers and their projects...
+
+
+
+
+
+
+
+ ...whether you’re making your first commit or sending a Rover to Mars, there’s room for you here, too.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get started for free — join the millions of developers already using GitHub to share their code, work together, and build amazing things.
+
+
+
+
+
+
+ Username
+
+
+
+
+
+
+
+
+ Email
+
+
+
+
+
+
+
+
+ Password
+
+
+
+
+
+
+
+
+
+
+
+ Sign up for GitHub
+
+
+
+ By clicking "Sign up for GitHub", you agree to our
+ terms of service and
+ privacy policy . We’ll occasionally send you account related emails.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You can't perform that action at this time.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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/monkey/0008/main.py b/monkey/0008/main.py
new file mode 100644
index 00000000..08a3aef5
--- /dev/null
+++ b/monkey/0008/main.py
@@ -0,0 +1,27 @@
+# -*- coding:utf-8 -*-
+
+'''
+
+第 0008 题:一个HTML文件,找出里面的正文。
+
+@Author monkey
+@Date 2017-8-31
+'''
+import json
+
+from bs4 import BeautifulSoup
+
+
+def findContent():
+ path = "The world's leading software development platform · GitHub.html"
+
+ with open(path, encoding='UTF-8') as file:
+ soup = BeautifulSoup(file)
+
+ # print(soup.prettify())
+ print(soup.body)
+
+
+
+if __name__ == '__main__':
+ findContent()
\ No newline at end of file
diff --git "a/monkey/0009/The world's leading software development platform \302\267 GitHub.html" "b/monkey/0009/The world's leading software development platform \302\267 GitHub.html"
new file mode 100644
index 00000000..4e6348b9
--- /dev/null
+++ "b/monkey/0009/The world's leading software development platform \302\267 GitHub.html"
@@ -0,0 +1,757 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The world's leading software development platform · GitHub
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Built for developers
+
+ GitHub is a development platform inspired by the way you work. From open source to business , you can host and review code, manage projects, and build software alongside millions of other developers.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GitHub for teams
+
+
+ A better way to work together
+
+
+ GitHub brings teams together to work through problems, move ideas forward, and learn from each other along the way.
+
+
+
+
+
+
+
+
+
+
+
+
Write better code
+
+ Collaboration makes perfect. The conversations and code reviews that happen in Pull Requests help your team share the weight of your work and improve the software you build.
+
+
+ Learn about code review on GitHub
+
+
+
+
+
+
+
+
+
+
Manage your chaos
+
+ Take a deep breath. On GitHub, project management happens in Issues and Projects, right alongside your code. All you have to do is mention a teammate to get them involved.
+
+
+ Learn about project management on GitHub
+
+
+
+
+
+
+
+
+
+
+
security-admin
+
+
+ Security and administration
+
+
+ Boxes? Check.
+
+
+ We worried about your administrative and security needs so you don’t have to. From flexible hosting to authentication options, GitHub can help you meet your team’s requirements.
+
+
+
+
+ Learn about GitHub for Business
+
+
+
+
+
+
+
+
+
Code security
+
+ Prevent problems before they happen. Protected branches, signed commits, and required status checks protect your work and help you maintain a high standard for your code.
+
+
+
Access controlled
+
+ Encourage teams to work together while limiting access to those who need it with granular permissions and authentication through SAML/SSO and LDAP.
+
+
+
Hosted where you need it
+
+ Securely and reliably host your work on GitHub.com. Or, deploy GitHub Enterprise on your own servers or in a private cloud using Amazon Web Services, Azure or Google Cloud Platform.
+
+
+
+
+
+
+
+
+
+
integrations
+
+
+ Integrations
+
+
+ Build on GitHub
+
+
+ Customize your process with GitHub apps and an intuitive API. Integrate the tools you already use or discover new favorites to create a happier, more efficient way of working.
+
+
+ Learn about integrations
+
+
+
+
+
+
+
+
+
+
+
+
open-source
+
+
+ Community
+
+
+ Welcome home, developers
+
+
+ GitHub is home to the world’s largest community of developers and their projects...
+
+
+
+
+
+
+
+ ...whether you’re making your first commit or sending a Rover to Mars, there’s room for you here, too.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get started for free — join the millions of developers already using GitHub to share their code, work together, and build amazing things.
+
+
+
+
+
+
+ Username
+
+
+
+
+
+
+
+
+ Email
+
+
+
+
+
+
+
+
+ Password
+
+
+
+
+
+
+
+
+
+
+
+ Sign up for GitHub
+
+
+
+ By clicking "Sign up for GitHub", you agree to our
+ terms of service and
+ privacy policy . We’ll occasionally send you account related emails.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You can't perform that action at this time.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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/monkey/0009/main.py b/monkey/0009/main.py
new file mode 100644
index 00000000..8028f3fc
--- /dev/null
+++ b/monkey/0009/main.py
@@ -0,0 +1,29 @@
+# -*- coding:utf-8 -*-
+
+'''
+
+第 0009 题:一个HTML文件,找出里面的链接。
+
+@Author monkey
+@Date 2017-8-31
+'''
+import json
+
+from bs4 import BeautifulSoup
+
+
+def findTagA():
+ path = "The world's leading software development platform · GitHub.html"
+
+ with open(path, encoding='UTF-8') as file:
+ soup = BeautifulSoup(file)
+
+ # print(soup.prettify())
+ links = []
+ for i in soup.find_all('a'):
+ links.append(i['href'])
+
+ print(links)
+
+if __name__ == '__main__':
+ findTagA()
\ No newline at end of file
diff --git a/monkey/0013/main.py b/monkey/0013/main.py
index d62d05bd..8437bc33 100644
--- a/monkey/0013/main.py
+++ b/monkey/0013/main.py
@@ -26,9 +26,9 @@ def spider(url):
# 下载图片
def download_Image(url, save_path):
- urllib.request.urlretrieve(url, save_path)
+ urllib.urlretrieve(url, save_path)
if __name__ == '__main__':
url = "http://tieba.baidu.com/p/2166231880"
- spider(url)
\ No newline at end of file
+ spider(url)
diff --git a/monkey/0014/main.py b/monkey/0014/main.py
new file mode 100644
index 00000000..2f3bc10e
--- /dev/null
+++ b/monkey/0014/main.py
@@ -0,0 +1,56 @@
+# -*- coding:utf-8 -*-
+
+'''
+
+第 0014 题: 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
+请将上述内容写到 student.xls 文件中。
+
+@Author monkey
+@Date 2017-8-31
+'''
+import json
+import xlwt
+
+def getStudent():
+
+ with open('student.txt', 'r', encoding = 'UTF-8') as file:
+ text = ''
+ for line in file:
+ text = text + line
+
+ stu_json = json.loads(text, encoding = 'UTF-8')
+
+ print(stu_json)
+
+ writeInXLS(stu_json)
+
+
+def writeInXLS(dict):
+ fileName = 'student.xls'
+ # 创建 xls 文件
+ file = xlwt.Workbook(encoding = 'utf-8')
+ # 创建 表
+ sheet = file.add_sheet('student', cell_overwrite_ok=True)
+
+ row = 0
+ col = 0
+
+ for k, v in sorted(dict.items(), key=lambda d:d[0]):
+ sheet.write(row, col, k)
+ for i in v:
+ col += 1
+ sheet.write(row, col, i)
+
+ row += 1
+ col = 0
+
+ file.save(fileName)
+ print('写入成功')
+
+if __name__ == '__main__':
+ getStudent()
\ No newline at end of file
diff --git a/monkey/0014/student.txt b/monkey/0014/student.txt
new file mode 100644
index 00000000..f06a601f
--- /dev/null
+++ b/monkey/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/monkey/0014/student.xls b/monkey/0014/student.xls
new file mode 100644
index 00000000..19e2d043
Binary files /dev/null and b/monkey/0014/student.xls differ
diff --git a/monkey/0015/city.txt b/monkey/0015/city.txt
new file mode 100644
index 00000000..312f5c19
--- /dev/null
+++ b/monkey/0015/city.txt
@@ -0,0 +1,5 @@
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
\ No newline at end of file
diff --git a/monkey/0015/city.xls b/monkey/0015/city.xls
new file mode 100644
index 00000000..bf246c7d
Binary files /dev/null and b/monkey/0015/city.xls differ
diff --git a/monkey/0015/main.py b/monkey/0015/main.py
new file mode 100644
index 00000000..e4ef735d
--- /dev/null
+++ b/monkey/0015/main.py
@@ -0,0 +1,54 @@
+# -*- coding:utf-8 -*-
+
+'''
+第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
+请将上述内容写到 city.xls 文件中,如下图所示:
+
+@Author monkey
+@Date 2017-8-31
+'''
+import json
+import xlwt
+
+def getCity():
+
+ with open('city.txt', 'r', encoding='UTF-8') as file:
+ text = ''
+ for line in file:
+ text = text + line
+
+ city_json = json.loads(text, encoding = 'UTF-8')
+ print(city_json)
+
+ writeInXLS(city_json)
+
+
+def writeInXLS(dict):
+ fileName = 'city.xls'
+
+ # 创建 文件
+ file = xlwt.Workbook()
+ # 创建 表
+ sheet = file.add_sheet('city', cell_overwrite_ok=True)
+
+ row = 0
+ col = 0
+
+ for k, v in sorted(dict.items(), key=lambda d:d[0]):
+ sheet.write(row, col, k)
+ col += 1
+ sheet.write(row, col, v)
+
+ row += 1
+ col = 0
+
+ file.save(fileName)
+
+if __name__ == '__main__':
+ getCity()
diff --git a/monkey/0016/main.py b/monkey/0016/main.py
new file mode 100644
index 00000000..170ef6bb
--- /dev/null
+++ b/monkey/0016/main.py
@@ -0,0 +1,55 @@
+# -*- coding:utf-8 -*-
+
+'''
+纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+
+@Author monkey
+@Date 2017-8-31
+'''
+import json
+import xlwt
+
+def getNumber():
+
+ with open('numbers.txt', 'r', encoding='UTF-8') as file:
+ text = ''
+ for line in file:
+ text = text + line
+
+ number_json = json.loads(text, encoding = 'UTF-8')
+ print(number_json)
+
+ writeInXLS(number_json)
+
+
+def writeInXLS(list):
+ fileName = 'numbers.xls'
+
+ # 创建 文件
+ file = xlwt.Workbook()
+ # 创建 表
+ sheet = file.add_sheet('numbers', cell_overwrite_ok=True)
+
+ row = 0
+ col = 0
+
+
+ for l in list:
+ for i in l:
+ sheet.write(row, col, i)
+ col += 1
+
+ row += 1
+ col = 0
+
+ file.save(fileName)
+
+if __name__ == '__main__':
+ getNumber()
diff --git a/monkey/0016/numbers.txt b/monkey/0016/numbers.txt
new file mode 100644
index 00000000..f5062e0a
--- /dev/null
+++ b/monkey/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/monkey/0016/numbers.xls b/monkey/0016/numbers.xls
new file mode 100644
index 00000000..3c9c2f3d
Binary files /dev/null and b/monkey/0016/numbers.xls differ
diff --git a/patchlion/0000/DrawHeadImage.py b/patchlion/0000/DrawHeadImage.py
new file mode 100644
index 00000000..8bbc5148
--- /dev/null
+++ b/patchlion/0000/DrawHeadImage.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+__author__ = 'PatchLion'
+
+from PIL import Image, ImageDraw,ImageFont
+
+def drawNumberOnIcon(imgpath, number):
+ img = Image.open(imgpath)
+ if (None == img):
+ print('打开图片失败')
+ return
+
+ img = img.resize((160, 160))
+
+ print(imgpath, "->", img.format, img.size, img.mode)
+ draw = ImageDraw.Draw(img)
+ img_size = img.size
+
+ font = ImageFont.truetype("Varela-Regular.otf", size=int(img_size[1]/4))
+ text_size = font.getsize(str(number))
+
+ draw.text((img_size[0]-text_size[0], 0), str(number), font=font, fill=(255, 0, 0))
+
+ img.save('icon_withnumber.jpg')
+
+ print('生成图片成功')
+
+
+drawNumberOnIcon("icon.jpg", 21)
\ No newline at end of file
diff --git a/patchlion/0000/Varela-Regular.otf b/patchlion/0000/Varela-Regular.otf
new file mode 100644
index 00000000..206f95a8
Binary files /dev/null and b/patchlion/0000/Varela-Regular.otf differ
diff --git a/patchlion/0000/icon.JPG b/patchlion/0000/icon.JPG
new file mode 100644
index 00000000..8d50fbef
Binary files /dev/null and b/patchlion/0000/icon.JPG differ
diff --git a/patchlion/0000/icon_withnumber.jpg b/patchlion/0000/icon_withnumber.jpg
new file mode 100644
index 00000000..af81baea
Binary files /dev/null and b/patchlion/0000/icon_withnumber.jpg differ
diff --git a/patchlion/0001/CreateSN.py b/patchlion/0001/CreateSN.py
new file mode 100644
index 00000000..3b2980a4
--- /dev/null
+++ b/patchlion/0001/CreateSN.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+__author__ = 'PatchLion'
+import uuid
+
+def createSN(count):
+ if count <= 0:
+ return
+
+
+ sns=[]
+
+ for i in range(count):
+ sns.append(uuid.uuid4().hex.upper())
+
+ return sns
+
+def createSNAndSaveToFile(count, filepath):
+ sns = createSN(count)
+
+ with open(filepath, 'wt') as f:
+ for sn in sns:
+ f.write(sn+"\n");
+
+print(createSN(200))
+createSNAndSaveToFile(200, 'sns.txt')
\ No newline at end of file
diff --git a/patchlion/0001/sns.txt b/patchlion/0001/sns.txt
new file mode 100644
index 00000000..8b3caa4e
--- /dev/null
+++ b/patchlion/0001/sns.txt
@@ -0,0 +1,200 @@
+D6E7BE4F8DBB400DBCADFC71D0397C95
+E3C83441DCBD4916A4E921CF7E69BEEF
+6DEB7C95E46B443FB464203C3239CAC9
+D9FCB5F316A743AB914E46074D813F08
+53896AC8D6EC4781AFE08D7A41FDD62A
+A454638CA4F841698CD8443328053B8A
+F1BD39FDDF6E488A96ED03ACE0880989
+7A18B38339AB42F0A29F96A13A65277C
+92E8E5957A93425283CD8F9A5C7AC6A9
+1682747B4AC14B6BB854220C7795C351
+40584A6C19AB462FA0EDFEBCBA200317
+3B38874AD4E14D0384898C3F71570EA2
+6B3570EF96B343D2BA66D667202B7999
+756269BE448C46E989CEB279F4E6A0AC
+8857CD736ECD45579A0E5BF365DFE303
+2DF003F62F8B4FD78C3582B2336FECD9
+0120A4D066C044C3BF4B3F283AC93F1C
+685CBE0E5EC34384B435DFE05549E264
+EAECEAF83D214376937410867FFF813F
+08EC93DB931E455099F207D64B2EF7BA
+C27E8749C60443FAA1C9D332D8056E7D
+BF2AF04E1BEB47E2808BB9F89CE48A57
+35806F99395D48CE95F3B20DB2C72877
+98C4CD32A09C47FCA792984144E34789
+69913A451CE943AC8F46E373C260E76F
+88783C30A1A5418C9852CE1C11D66FC5
+251DFA24C113427DB1A4F84AD4A0A16B
+A631E2EC4F804195A65C47EA3EC7BFE2
+DAF81DCA20374B50A4C2E5901FAFFE4C
+E2705D418FD6428AA6F89232A03D1DF1
+2C09E4830228428B8683EF48662FD533
+B59451DA98094A439467E55A36BD1015
+54DA1A69C6994A96A2E3DD3F52AB47EB
+298EACA4ED254F22AA577BF3F070F21D
+6D3B63EE76E4440289ED91E9EAA2374B
+2FDCEEC57F2F4D0E83C312DAE6404E0E
+10C1BE2B6EE74AEEA798FD4F76D16F27
+4E73A1BAA99741B2B484DCDAD5541D97
+4CB1C9F16AA74FC996786497A034CF7A
+1E5F42316AAF44B48F06F72C5DCADC96
+D97FFA9C38A74848AD4FFDC0BCDFE397
+D527818259154E03AFD63714A59D6CCF
+5DDA33ADDA7A4C7380A7DFE5DAF429A5
+93B40E7017124F0083C13F2244DD58CB
+FD657708028A462D9BFC2143B0E7F847
+B30EEFE0D52843DC9A7F71C5A2108A60
+BCA196A6BBE44AADAC7B1C421A7ED832
+2C7191D0AB0F4E1AA45CBC8756E6987F
+BF15546D4BD84E02964D76165E9022D4
+C9DDD80402594334A5C4828C04832D60
+FA6532A3000C45478862A0156AD3E373
+F16CB5B1C76743379DE2104683CB840E
+2B5C6D0A188D462A8F3D7930ACB112D3
+F3EA1DF6A64146D592FA562C18BF4DD2
+4C52BFA77E654E178E4F096DB33C3D5B
+5DC2FD42388D48E7A95723E59BE1C259
+D291D238B3934F4FBF50E34452CFD557
+42C0AD39833949AD9BE90DA9444AD1D1
+4E8F59CF678445C494F34B5DA27D05B6
+7DBB506CB74D4C5AA7BC71A8C9F9846E
+4DFDB7E3E0DD4C4A9E08CFE4053692F1
+7B322AE2926B4FD69080BB9012447437
+302D9BD6D5CB4B88B1A3213057C5CC45
+7D09EEAC14B648C39C92088DDCCC8B7E
+6B3ED4C47E334791AE1CED843DAE4899
+CEA81BDA91A8439FB3018BEFB646F019
+315DBE136DB34FCA903D631286B1A662
+4B017A55EA7D410AAA790D2333C61594
+966549CCFA5C4B03BE79CFD916DC6269
+583AB01B84EA47CDA5A5C53AA27F06AA
+8E6DFAF297584D0AAB6ACFA339830A83
+A65F7467EFA34D61B2D20C1195841148
+06F4F523DCD94696906F2E2A56B46AC1
+5A6A59EE44E34E42AD58933B65227E05
+FA83E66777134C51BA4DA9E94956C6CD
+B64A713D76B941539628EA92B50A02D8
+9DCEA293DBCB45B2B560F6ECCEFCBF7B
+E55AF3850F6A4F07BB28E47065D8A238
+3B58A064F9174242829B8E0ADF8BA09B
+97A8300DD587458A92823F65DEFFFBB8
+F3A78DC166E94581A281533065F17311
+2D581CC2F7A2474B966C456559FAE3DA
+4536F8162A2041F68CB07E86BD2F46C2
+5153184E53234ACC8874EE00EF6FDA0E
+D57EB677DA234B629A24C056CB72BE00
+91901A4D1E1241448A6FD6C2413E818F
+93BB457333444545B4CB7A18F1934FDF
+9674B8DA0F2A405BB7E236DD40EDC7F1
+8207517B57AB484CB47DE54CBA20C893
+47A22567975746D2B42B822E5CBA4392
+C6BA941DCA8B409990A24BF64C9E06AA
+4421081C06EE48218C5B1D173D29804A
+367C39E7266A454E95D7888C9CE78F1C
+05E590CB231A40F3B8CA9F9FEAD869D9
+FCE6EC0EF03A4103BE4247525DCF7B79
+EBCC771A7DE74ADD989A81D586170E6B
+9C6060D6ECCF4A39BD08ABD50620D8EB
+EBD26DD692964D14BFBA5A7E3B934338
+D7575BEF63CB4A779FF25E9CBC864EC4
+7B41987358D24CDCA157FFF855B3420D
+D2A7DDC6BACC4A98B8239438CDACB3EE
+C4316AB1F8584178B0E06A263F9DBCA8
+A0FE533D1D0B43398109ADB210CD0404
+E68EAF900E9A410B8FDB13F32ECAFEC2
+55617EA7008A44D1AD5E8016410E1107
+FB952D010F9F4F32AC2364BA13475B17
+24980F4C2248479BA54A3FCD35D8C1A9
+58AD60569A774F16B1D551E097E9454F
+F9766715F95C416891A658475839AE7D
+F670ECA0929149FFA1D5AA272EACF1AD
+05F0A37684534FA282815093E7413D6A
+EFA810265E5F4D80BA80BC3E0F36ECFD
+96C9599153014A088DFCFE93E183C3F6
+C1762FCD8A9F4682ACA98D4CACCE24D0
+E4C8F0053414449294F74D190DD291E4
+199689A96CD041EB85CAE8C57BC6310E
+048927803E8D40E3AFF100314A163DC8
+B9818ADDA4E54AD7B0BDE413849F42D3
+E83CC52FFD6C481D9526C0E890D12723
+47E26674DCA54DA2B0A6D1BAB5854CF3
+102D42B66DA74A25923E5FE663FB7D82
+CD8438F4F88E419FB70BD6AD461C8BAD
+873FEA3FCB044970B15937CCFCC1AA13
+4025E874E046480BA91291D25D838E30
+B70D2D7AD78740F8979B9042E1E67B0A
+2DE11879D52848128C2E3378E45E8C54
+99D680CCBB3A45AF8B0ABFBF32E57FF1
+4B3A7DE5BF6A488B8339910416E8C611
+4E5AD5924441485E932DD7120284E93E
+D3C60168186244B2AA3FA579513A12D6
+75A9BD60F766410391861B8F6B958204
+7D3AB7509B1F4BF3B582446B759D16F9
+5A931FC10B1747FCA968B36A94DA6372
+1127110D4E66430C8A05128A87CF9BF5
+2E3391B7DCAB47FCBA4121925EE72616
+D585934B00364D22A44DC6F8A170BABA
+F3375085D86347B8A9346EEB05D85EFE
+6C98A9EB8CE5402A8008BC06E57FB72B
+9C8528B3090E448DA64DE005811834CB
+6394A70E285F4BADBC4D0C866DA3F8C7
+9DED2AC8E5914DFF8299309527764ADE
+8CE5DA9D7B57476FBC00AC7AD1B9CE03
+0D6C8D235E694E429FA84D3380FF4F26
+B7232772ECC54307B5C3834B2C3952E2
+A94A3B61F994447F9B3171D8078F0475
+B726C16CB4D04E7590221B40197BC76C
+A3C917BC085443558E87C352A9EDCD4E
+17622D7067D941B6BB505AF0E4F27B6D
+23218F4A89A549CAA2B30A992A37C639
+126DCC5794D44B4C8FE63CA36ECCDB5E
+B5EA3D5D1A88464C8E5EBB1BB287E972
+7A8BEB2465C8408DA00201C1F7B4AA10
+F3AF716F58654B02B97433A27846C7E7
+A87AE973D49D4154AC9D3BD4D7081436
+F44F33C608F6454F997D497B26FB3BBA
+969C4D7030C74661BCE12F793068D9D4
+D4DB2913A8D64F2BA98FEEB16028ECD3
+A4AE0465CCDC442FB3A793757CCB28A3
+8102CF06BAD24BBD8BEC48828AAC7D21
+CCD9B4EC7A67422D9447600ADDBE14EA
+4A138CC7A4924CE99E0B22A838AD5B17
+04C5741D3D594A1EBDE6A9C44A3AEB2E
+F3E98C2A7E0E4CDCB77BBE53BFC9CB20
+9983125A3B544AAE8F3FAEEE67780D43
+C92790AA97A54BCE9BC99210482722D0
+4124C0BE33024CD68CE0CB81289DBABA
+D31F84B4EBA54F9EA1A63377DA620B02
+56ABB33312C14F6D95EF9B7E939355FD
+A00C5FCC2A46473F8FBB9571C68925D0
+7DF5ABC4D6C841DDB65646C2101CDF75
+7DFB1BE67C1141CCA708EF1B0A2039D2
+77B726FD00DA4F42B8DE56B77B363FF8
+BC821284EE9D4EF99599A254301B7A9B
+0FAA403A28DF4396B3E020FEB7EA79DF
+F568103AA32E4985B544DF03CF6EB513
+8F8493CA9DC545CEB05A2BC09A0F2E5A
+682F0A441022424D89EE3F17DC6F4BD9
+FA74F790D66E4DAA9AA842EF0030FD24
+B984010789BB4B74AC0F4C8635C3912B
+AA6D2CBA27C643D48A8DB81A4EB16299
+9438EF86D80B4438948B8D593D90C91A
+59C16C42EF514F78835521931A03D9B5
+8189E4E9B8AD4092BFBF24DC76D92C5C
+AE5386C5809347D4A899218C86B0D10A
+A450A51757EA4CD0B47528D2FD4E9A5F
+DADFE9DE21A545F881F96D31ED817BB5
+CAAABF11539A49A5A7E5E055E18C5262
+B793CACDF5AE464F86ABC432966F3853
+D9B0417D1560454AADF1D87ECD98967A
+2262EE1EA75C4FDF8674EE2271D23FD8
+91380450B6474EA69C4D3A1DE3280A23
+2B67B8C203C648FCA5F6C0A0B085837F
+49AAAB2A48C645B5B0E2A3EA94143EB4
+AEC612FF401E4F448C9B5B5F32CA3F95
+BB651687308E420E84C2BF2475F1BBFC
+6BAFD6CE048644E6AF4C83B445A44167
+94775518A9CE40F3892427E4C0F9AA28
+27BE68E1B727408499DB50CDED3042F3
+212F1919D1FD44EDA80652FC1BB9B5D7
+4898E391F2704A81BA13D664A9ED433D
diff --git a/patchlion/0002/SaveSNsToMySQL.py b/patchlion/0002/SaveSNsToMySQL.py
new file mode 100644
index 00000000..ae7ee817
--- /dev/null
+++ b/patchlion/0002/SaveSNsToMySQL.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+__author__ = 'PatchLion'
+
+import pymysql
+
+sns = []
+
+with open('../0001/sns.txt', 'rt') as f:
+ for line in f.readlines():
+ sn = line.strip()
+ sns.append(sn)
+
+print(sns)
+
+def insertToDB(sns):
+ if(len(sns) == 0):
+ return
+
+ conn = pymysql.connect(host='127.0.0.1', port=3306,user='root',password='root', db='python')
+ cur = conn.cursor()
+ try:
+ cur.execute('DELETE FROM sns')
+ conn.commit()
+
+ for sn in sns:
+ cur.execute('INSERT INTO sns VALUE ("%s")' % sn)
+ conn.commit()
+ conn.close()
+
+ print('Done!')
+ except:
+ conn.rollback()
+
+
+insertToDB(sns)
\ No newline at end of file
diff --git a/patchlion/0004/CountChar.py b/patchlion/0004/CountChar.py
new file mode 100644
index 00000000..00b4c7de
--- /dev/null
+++ b/patchlion/0004/CountChar.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+__author__ = 'PatchLion'
+
+result = {}
+
+def doCount(c):
+ if c in result.keys():
+ result[c] = result[c]+1
+ else:
+ result[c]=1
+
+def countChar(file_path):
+ with open(file_path, 'rt') as f:
+ txt = f.read()
+ f.close()
+ list(map(doCount, txt))
+
+countChar('PrivacyPolicy.txt')
+
+print(result)
+print(len(result))
diff --git a/patchlion/0004/PrivacyPolicy.txt b/patchlion/0004/PrivacyPolicy.txt
new file mode 100644
index 00000000..2400c7cd
--- /dev/null
+++ b/patchlion/0004/PrivacyPolicy.txt
@@ -0,0 +1,37 @@
+Privacy Policy
+Last Updated: July 13, 2015
+=========================
+Your privacy is important to xxxxx. Our Privacy Policy covers how we collect, use, disclose, transfer, and store your information. We hope our policy is straightforward and easy-to-understand. Please take a minute to review the details of our privacy practices below.
+
+Collection and Use of Non-Personal Information
+We may collect non-personal information, such as data that does not allow direct association with any specific individual. Non-personal data is collected, used, transferred, and disclosed for a number of purposes. These purposes include the use of cookies and other technologies that give us a better understanding of our users' needs. A "cookie" is a small data file that is stored on your device. Most Internet browsers automatically accept cookies. We use information collected from cookies to improve users' experience and the overall quality of our services.
+
+Collection and Use of Personal Information / Content
+Personal information may be collected in a number of ways when you use any of the products or services offered by xxxxx. We may prompt you to voluntarily provide information, including personal information. For example, we may ask to collect your name, email address, user name, telephone number and credit card number whenever you register for an account, purchase our products, or contact us via email.
+
+From time-to-time we may also collect personal information you provide in connection with your participation in surveys, sweepstakes, contests, promotional offers, and other activities on the site.
+
+When you use our email support services, we collect your correspondence in order to build up a public knowledge base, which will be available to all users of the site. Your correspondence will most likely not be used verbatim, but paraphrased in an FAQ format.
+
+We use the information collected through xxxxx products: (I) to communicate with you; (II) to process your requests and transactions; (III) to improve the site; (IV) to customize the services and/or products we provide to you; (V) to assist with our product and service development; (VI) to perform marketing analysis; and (VII) for other purposes related to our business.
+
+The images you upload to xxxxx for editing will not be stored unless your request a link to revisit your works or you actually request a xxxxx service that requires storage of this image (e.g. to temporarily save the unfinished works under your xxxxx account).
+
+If you are using xxxxx Market Service to share / sell your photo works, refer to clause "3 xxxxx's Use" of the "xxxxx Market Terms" in the "Terms of Services" for detailed information on how we handle these images.
+
+Transparency and Choice
+You may configure your browser to block cookies, including cookies associated with our services. However, many of our services may not function correctly with cookies disabled. You can also control which social websites you upload images to.
+
+Third party accounts
+xxxxx does not store your Facebook, Twitter, or Flickr passwords. Your account information is not disclosed to xxxxx and you are free to cancel any of your social networking website connections with xxxxx at any time.
+
+Enforcement
+We regularly review our own compliance with our Privacy Policy. If you submit a formal written complaint, we will contact you and try our best to resolve the issue.
+
+Changes
+Our Privacy Policy may change occasionally. We will not reduce your rights under this Privacy Policy without providing explicit, advanced notice. We will post any privacy policy changes on this page and, in the event of significant changes, we will provide a more prominent notice (such as an email notification). We will also archive prior versions of this Privacy Policy for your review.
+
+
+If you have any questions regarding this Privacy Policy, please feel free to contact us(Support@xxxxx.com).
+
+
diff --git a/patchlion/0010/CreateIdentifyingCode.py b/patchlion/0010/CreateIdentifyingCode.py
new file mode 100644
index 00000000..8a9fc92b
--- /dev/null
+++ b/patchlion/0010/CreateIdentifyingCode.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+__author__ = 'PatchLion'
+
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+import random
+
+def randChar():
+ #65-90 A-Z
+ return chr(random.randint(65, 90))
+
+def randColor():
+ return (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
+
+def createIdentifyingCode(size, charcount=4):
+ width=size*charcount
+ height=size
+
+ img = Image.new('RGB', (width, height), (255, 255, 255))
+ draw = ImageDraw.Draw(img)
+ for x in range(width):
+ for y in range(height):
+ draw.point((x, y), fill=randColor())
+
+ font = ImageFont.truetype("../0000/Varela-Regular.otf", size=size)
+ #draw.text((0, 0), randChar(), fill=randColor())
+ for i in range(charcount):
+ draw.text((i*size + 10, -10), randChar(), fill=randColor(), font=font)
+
+ img = img.filter(ImageFilter.BLUR)
+ img.save('ic.jpg', 'jpeg')
+
+createIdentifyingCode(60)
+
diff --git a/patchlion/0010/ic.jpg b/patchlion/0010/ic.jpg
new file mode 100644
index 00000000..ac1461a8
Binary files /dev/null and b/patchlion/0010/ic.jpg differ
diff --git a/preytaren/README.md b/preytaren/README.md
new file mode 100644
index 00000000..e558abb8
--- /dev/null
+++ b/preytaren/README.md
@@ -0,0 +1,3 @@
+# Show-Me-the-Code
+preytaren 的解答链接 [戳这里](https://github.com/preytaren/showMeTheCode-Solutions),
+大概完成了20个题目左右
diff --git a/pylyria/0000/0000.py b/pylyria/0000/0000.py
new file mode 100644
index 00000000..999b5656
--- /dev/null
+++ b/pylyria/0000/0000.py
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+#第 0000 题:将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+from PIL import Image, ImageFont, ImageDraw, ImageColor
+
+def image_add(file_name, text):
+ im = Image.open(file_name)
+ w, h = im.size
+ fnt = ImageFont.truetype('Arial.ttf', size=w//5)
+ draw = ImageDraw.Draw(im)
+ draw.text((w-w//5-10,10), font=fnt, fill=128, text=text)
+ im.show()
+
+if __name__ == '__main__':
+ image_add('icon.jpg', 'V')
diff --git a/pylyria/0001/0001_0.py b/pylyria/0001/0001_0.py
new file mode 100644
index 00000000..d8b94190
--- /dev/null
+++ b/pylyria/0001/0001_0.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+#第 0001 题:做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+import random
+import string
+
+def activation_code(id,length=16):
+ prefix = hex(int(id))[2:]+'V'
+ length = length - len(prefix)
+ chars=string.ascii_uppercase+string.digits
+ return prefix + ''.join([random.choice(chars) for i in range(length)])
+
+def get_id(code):
+ return str(int(code.upper(), 16))
+
+if __name__ == '__main__':
+ for i in range(10, 500, 23):
+ code = activation_code(i)
+ id_hex = code.split('L')[0]
+ id = get_id(id_hex)
+ print code,id
diff --git a/pylyria/0001/0001_1.py b/pylyria/0001/0001_1.py
new file mode 100644
index 00000000..7301c2f3
--- /dev/null
+++ b/pylyria/0001/0001_1.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+#第 0001 题:做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+import random
+import string
+
+def activation_code(chars = string.ascii_uppercase + string.digits, length=16):
+ return ''.join([random.choice(chars) for i in range(length)])
+
+if __name__ == '__main__':
+ code_collection = set()
+ for i in range(200):
+ code = activation_code()
+ if code not in code_collection:
+ code_collection.add(code)
+ else:
+ continue
diff --git a/pylyria/0004/0004.py b/pylyria/0004/0004.py
new file mode 100644
index 00000000..f174eb2d
--- /dev/null
+++ b/pylyria/0004/0004.py
@@ -0,0 +1,29 @@
+#! /usr/bin/env python
+#第 0004 题:任一个英文的纯文本文件,统计其中的单词出现的个数。
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+# Copyright By PyLyria
+# CreateTime: 2016-03-01 23:04:58
+
+import re
+from string import punctuation
+from operator import itemgetter
+
+def remove_punctuation(text):
+ text = re.sub(r'[{}]+'.format(punctuation), '', text)
+ return text.strip().lower()
+
+def split(file_name):
+ with open(file_name,'rt') as f:
+ lines = (line.strip() for line in f)
+ for line in lines:
+ yield re.split(r'[;,\s]\s*', line)
+
+if __name__ == '__main__':
+ word2count = {}
+ for line in split('chapter1.txt'):
+ words = (remove_punctuation(word) for word in line)
+ for word in words:
+ word2count[word] = word2count.get(word, 0) + 1
+ sorted_word2count = sorted(word2count.items(),key=itemgetter(0))
+ print(sorted_word2count)
diff --git a/pylyria/0005/0005.py b/pylyria/0005/0005.py
new file mode 100644
index 00000000..4900b5f5
--- /dev/null
+++ b/pylyria/0005/0005.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+#第 0005 题:你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+import os
+from PIL import Image
+
+def get_path(root = os.curdir):
+ root += os.sep
+ for path, dirs, files in os.walk(root):
+ for file_name in files:
+ yield path, file_name
+
+def get_size(width, heigh, max_width, max_heigh):
+ if width > max_width:
+ heigh = heigh * (max_width / width)
+ width = max_width
+ if heigh > max_heigh:
+ width = width * (max_heigh / heigh)
+ heigh = max_heigh
+ return width, heigh
+
+
+if __name__ == '__main__':
+ paths = get_path()
+ image_format = ('.jpg', '.jpeg', 'png', 'bmp')
+ max_size = (640, 1136)
+ for path, file_name in paths:
+ if file_name.endswith(image_format):
+ img = Image.open(path + os.sep + file_name)
+ size = get_size(*(img.size + max_size))
+ if size != img.size:
+ img.thumbnail(size)
+ img.save(path + os.sep + 'thumbnailed_' + file_name)
diff --git a/pylyria/0006/0006.py b/pylyria/0006/0006.py
new file mode 100644
index 00000000..0f500b38
--- /dev/null
+++ b/pylyria/0006/0006.py
@@ -0,0 +1,65 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+# Copyright By PyLyria
+# CreateTime: 2016-03-03 20:51:40
+import os
+import re
+import math
+import heapq
+from string import punctuation
+from operator import itemgetter
+
+def remove_punctuation(text):
+ text = re.sub(r'[{}]+'.format(punctuation), '', text)
+ return text.strip().lower()
+
+def split(file_name):
+ with open(file_name,'rt',encoding='utf-8') as f:
+ lines = (line.strip() for line in f)
+ for line in lines:
+ yield re.split(r'[;,\s]\s*', line)
+
+def get_path(root = os.curdir):
+ root += os.sep
+ for path, dirs, files in os.walk(root):
+ for file_name in files:
+ yield path, file_name
+
+def get_tf(file_name):
+ word2count = {}
+ for line in split(file_name):
+ words = (remove_punctuation(word) for word in line)
+ for word in words:
+ word2count[word] = word2count.get(word, 0) + 1
+ total = sum(word2count.values())
+ TF = {key : (value, value / total) for (key, value) in word2count.items()}
+ return TF
+
+def get_IDF(total_TF):
+ IDF = {}
+ for file_name in total_TF.keys():
+ for keyword in total_TF[file_name].keys():
+ IDF[keyword] = IDF.get(keyword, 0) + 1
+ IDF = {keyword: math.log(len(total_TF)/IDF[keyword], 2) for keyword in IDF.keys()}
+ return IDF
+
+def get_weight(TF, IDF):
+ weight = {key:TF[key][1]*IDF[key] for key in TF}
+ return weight
+
+if __name__ == '__main__':
+ paths = get_path()
+ format = ('.txt')
+ total_TF = {}
+ word_weight = {}
+
+ for path, file_name in paths:
+ if file_name.endswith(format):
+ total_TF[file_name] = get_tf(path + os.sep + file_name)
+
+ IDF = get_IDF(total_TF)
+
+ for file_name in total_TF.keys():
+ word_weight[file_name] = get_weight(total_TF[file_name], IDF)
+ print(heapq.nlargest(5, word_weight[file_name].items(), key=itemgetter(1)))
diff --git a/pylyria/0007/0007.py b/pylyria/0007/0007.py
new file mode 100644
index 00000000..b2c06f16
--- /dev/null
+++ b/pylyria/0007/0007.py
@@ -0,0 +1,37 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vim:fenc=utf-8
+# Copyright By PyLyria
+# CreateTime: 2016-03-04 19:36:40
+import os
+
+def get_path(root = os.curdir):
+ root += os.sep
+ for path, dirs, files in os.walk(root):
+ for file_name in files:
+ yield path, file_name
+
+def get_lines(file_name):
+ with open(file_name,'rt',encoding='utf-8') as f:
+ for line in f:
+ yield line.strip()
+
+if __name__ == '__main__':
+ paths = get_path()
+ format = ('.py', '.c', '.cpp', '.sql')
+ annotation = ('#', '//', '--', '/*')
+ code_statistics = {}
+
+ for path, file_name in paths:
+ if file_name.endswith(format):
+ code_statistics[file_name] = {}
+ lines = get_lines(path + os.sep + file_name)
+ for line in lines:
+ if len(line) ==0:
+ code_statistics[file_name]['EmptyLine'] = code_statistics[file_name].get('EmptyLine', 0) + 1
+ elif line.startswith(annotation):
+ code_statistics[file_name]['AnnotationLine'] = code_statistics[file_name].get('AnnotationLine', 0) + 1
+ else:
+ code_statistics[file_name]['CodeLine'] = code_statistics[file_name].get('CodeLine', 0) + 1
+
+ print(code_statistics)
diff --git a/pylyria/0008/0008.py b/pylyria/0008/0008.py
new file mode 100644
index 00000000..98805693
--- /dev/null
+++ b/pylyria/0008/0008.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+import os
+from html.parser import HTMLParser
+
+def get_path(root = os.curdir):
+ root += os.sep
+ for path, dirs, files in os.walk(root):
+ for file_name in files:
+ yield path, file_name
+
+class MyHTMLParser(HTMLParser):
+ def handle_starttag(self, tag, attrs):
+ TagStack.append(tag)
+
+ def handle_endtag(self, tag, tag_flag = True):
+ while tag_flag == True:
+ if tag == TagStack[-1]:
+ TagStack.pop()
+ tag_flag = False
+ else:
+ TagStack.pop()
+
+ def handle_data(self, data):
+ if data.strip() and "body" in TagStack and "p" in TagStack:
+ body.append(data.strip())
+
+if __name__ == '__main__':
+ paths = get_path()
+ html_format = ('.html','.htm')
+ TagStack = []
+ parser = MyHTMLParser()
+ body = []
+
+ for path, file_name in paths:
+ if file_name.endswith(html_format):
+ parser.feed(open(path + os.sep + file_name, encoding='utf-8').read())
+
+ print(body)
diff --git a/pylyria/0009/0009.py b/pylyria/0009/0009.py
new file mode 100644
index 00000000..8afe47a8
--- /dev/null
+++ b/pylyria/0009/0009.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+import os
+from html.parser import HTMLParser
+
+def get_path(root = os.curdir):
+ root += os.sep
+ for path, dirs, files in os.walk(root):
+ for file_name in files:
+ yield path, file_name
+
+class MyHTMLParser(HTMLParser):
+ def handle_starttag(self, tag, attrs):
+ TagStack.append(tag)
+ if tag == 'a':
+ for name, value in attrs:
+ if name == 'href':
+ link.append((value, 'None'))
+
+ def handle_endtag(self, tag, tag_flag = True):
+ while tag_flag == True:
+ if tag == TagStack[-1]:
+ TagStack.pop()
+ tag_flag = False
+ else:
+ TagStack.pop()
+
+ def handle_data(self, data):
+ if data.strip() and 'body' in TagStack and 'a' in TagStack:
+ link[-1] = (link[-1][0], data.strip())
+
+if __name__ == '__main__':
+ paths = get_path()
+ html_format = ('.html','.htm')
+ TagStack = []
+ parser = MyHTMLParser()
+ link = []
+
+ for path, file_name in paths:
+ if file_name.endswith(html_format):
+ parser.feed(open(path + os.sep + file_name, encoding='utf-8').read())
+
+ print(link)
diff --git a/pylyria/0010/0010.py b/pylyria/0010/0010.py
new file mode 100644
index 00000000..0763eca6
--- /dev/null
+++ b/pylyria/0010/0010.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+import random
+import string
+from PIL import Image, ImageFont, ImageDraw, ImageFilter
+
+def create_strs(draw, chars, length, font_type, font_size, width, height, fg_color):
+ c_chars = ''.join([random.choice(chars) for i in range(length)])
+ font = ImageFont.truetype(font_type, font_size)
+ x0 = 9
+ for c in c_chars:
+ xt = random.randint(0, font_size / 3)
+ yt = random.randint(2, 6)
+ draw.text((x0 + xt, yt), c, font = font, fill = fg_color)
+ x0 = x0 + xt + font_size
+ return c_chars
+
+def create_lines(draw, n_line, width, height):
+ line_num = random.randint(n_line[0],n_line[1])
+ for i in range(line_num):
+ begin = (random.randint(0, width), random.randint(0, height))
+ end = (random.randint(0, width), random.randint(0, height))
+ draw.line([begin, end], fill=(0, 0, 0))
+
+def create_points(draw, point_chance, width, height):
+ chance = min(100, max(0, int(point_chance)))
+ for w in range(width):
+ for h in range(height):
+ tmp = random.randint(0, 100)
+ if tmp > 100 - chance:
+ draw.point((w, h), fill = (0, 0, 0))
+
+def valiadate_img(
+ size = (120, 30),
+ chars = string.ascii_uppercase,
+ img_type = 'PNG',
+ mode = 'RGB',
+ bg_color = (random.randint(128, 255), random.randint(128, 255), random.randint(128, 255)),
+ fg_color = (random.randint(0, 128), random.randint(0, 128), random.randint(0, 128)),
+ font_size = 18,
+ font_type = 'arial.ttf',
+ length = 4,
+ draw_lines = True,
+ n_line = (1, 2),
+ draw_points = True,
+ point_chance = 2):
+ width, height = size
+ img = Image.new(mode, size, bg_color)
+ draw = ImageDraw.Draw(img)
+ if draw_lines:
+ create_lines(draw, n_line, width, height)
+ if draw_points:
+ create_points(draw, point_chance, width, height)
+ strs = create_strs(draw, chars, length, font_type, font_size, width, height, fg_color)
+
+ params = [
+ 1 - float(random.randint(1, 2) / 100),
+ 0,
+ 0,
+ 0,
+ 1 - float(random.randint(1, 10) / 100),
+ float(random.randint(1, 2) / 500),
+ 0.001,
+ float(random.randint(1, 2) / 500)]
+
+ img = img.transform(size, Image.PERSPECTIVE, params)
+
+ img = img.filter(ImageFilter.EDGE_ENHANCE_MORE)
+
+ return img, strs
+
+if __name__ == "__main__":
+ code_img = valiadate_img()
+ code_img[0].save("validate.png", "GIF")
+ print(code_img[1])
diff --git a/pylyria/0011/0011.py b/pylyria/0011/0011.py
new file mode 100644
index 00000000..38de53b1
--- /dev/null
+++ b/pylyria/0011/0011.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
+def is_sensitive(word):
+ sensitive_words = [line.strip() for line in open('sensitive.txt', encoding='utf-8')]
+ word = word.strip()
+ if word.lower() in sensitive_words:
+ return True
+ else:
+ return False
+
+if __name__ == "__main__":
+ while 1:
+ if is_sensitive(input()):
+ print('Freedom')
+ else:
+ print('Human Rights')
diff --git a/pylyria/0012/0012.py b/pylyria/0012/0012.py
new file mode 100644
index 00000000..eadd22be
--- /dev/null
+++ b/pylyria/0012/0012.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+import re
+
+def sensitive_test(word):
+ sensitive_words = [line.strip() for line in open('sensitive.txt', encoding='utf-8')]
+ word = word.strip()
+ for sensitive_word in sensitive_words:
+ if sensitive_word.strip() in word.lower():
+ word = re.sub(sensitive_word, '*' * len(sensitive_word), word, flags=re.IGNORECASE)
+ return word
+
+if __name__ == "__main__":
+ line = True
+ while line:
+ line = input()
+ line = line.strip()
+ print(sensitive_test(line))
diff --git a/pylyria/0013/0013.py b/pylyria/0013/0013.py
new file mode 100644
index 00000000..f2abd6e3
--- /dev/null
+++ b/pylyria/0013/0013.py
@@ -0,0 +1,23 @@
+from urllib.error import URLError, HTTPError
+import urllib.request
+import urllib.parse
+
+url = 'http://tieba.baidu.com/p/2166231880'
+values={'wd':'python',
+ 'opt-webpage':'on',
+ 'ie':'gbk'}
+url_values=urllib.parse.urlencode(values)
+#print(url_values)
+
+url_values=url_values.encode(encoding='UTF8')
+full_url=urllib.request.Request(url,url_values)
+#or ony one sentense:full_url=url+'?'+url_values
+
+try:
+ response=urllib.request.urlopen(full_url) #open=urlopen
+except HTTPError as e:
+ print('Error code:',e.code)
+except URLError as e:
+ print('Reason',e.reason)
+the_page=response.read()
+print(the_page)
diff --git a/rosalesjahaziel/0001/0001.py b/rosalesjahaziel/0001/0001.py
new file mode 100644
index 00000000..1c0511b5
--- /dev/null
+++ b/rosalesjahaziel/0001/0001.py
@@ -0,0 +1,12 @@
+import random
+import string
+
+
+# this method use the 'key' to select 10 random characters
+def generateCode(count):
+ for code in range(count):
+ key = string.upper('0123456789abcefghijklmnopqrstuvwxyz')
+ code = string.join(random.sample(key, 10))
+ print(code)
+
+generateCode(10) # generate the amount of codes you send as count
diff --git a/soolx/0000/0000.py b/soolx/0000/0000.py
new file mode 100644
index 00000000..6dee92ec
--- /dev/null
+++ b/soolx/0000/0000.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+from PIL import Image, ImageDraw, ImageFont
+
+def add_text(img, str):
+ im = Image.open(img)
+ tfont = ImageFont.truetype('times.ttf', 20)
+ draw = ImageDraw.Draw(im)
+ width, height = im.size
+ draw.text((width-40,10), str, fill=(0,0,0), font=tfont)
+ im.save(img, 'jpeg')
+
+if __name__ == '__main__':
+ add_text('001.jpg', '911')
diff --git a/soolx/0000/001.jpg b/soolx/0000/001.jpg
new file mode 100644
index 00000000..29d09a3e
Binary files /dev/null and b/soolx/0000/001.jpg differ
diff --git a/soolx/0000/times.ttf b/soolx/0000/times.ttf
new file mode 100644
index 00000000..63b101bc
Binary files /dev/null and b/soolx/0000/times.ttf differ
diff --git a/soolx/0001/0001.py b/soolx/0001/0001.py
new file mode 100644
index 00000000..e69de29b
diff --git a/soolx/README.md b/soolx/README.md
new file mode 100644
index 00000000..01717403
--- /dev/null
+++ b/soolx/README.md
@@ -0,0 +1,201 @@
+## Python 练习册,每天一个小程序 ##
+
+
+#### 说明: ####
+
+- Python 练习册,每天一个小程序。注:将 Python 换成其他语言,大多数题目也适用
+- 不会出现诸如「打印九九乘法表」、「打印水仙花」之类的题目
+- 本文本文由@史江歌(shijiangge@gmail.com QQ:499065469)根据互联网资料收集整理而成,感谢互联网,感谢各位的分享。鸣谢!本文会不断更新。
+- 欢迎大家 Pull Request 出题目,贴代码(Gist、Blog皆可):-)
+- 欢迎解答, 并发送 pull request 到 [Show-Me-the-Code](https://github.com/Show-Me-the-Code/python)
+
+> Talk is cheap. Show me the code.--Linus Torvalds
+
+----------
+
+**第 0000 题:**将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+类似于图中效果
+
+
+
+**第 0001 题:**做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用**生成激活码**(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+**第 0002 题**:将 0001 题生成的 200 个激活码(或者优惠券)保存到 **MySQL** 关系型数据库中。
+
+**第 0003 题:**将 0001 题生成的 200 个激活码(或者优惠券)保存到 **Redis** 非关系型数据库中。
+
+**第 0004 题:**任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+**第 0005 题:**你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+
+**第 0006 题:**你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+
+**第 0007 题:**有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+
+**第 0008 题:**一个HTML文件,找出里面的**正文**。
+
+**第 0009 题:**一个HTML文件,找出里面的**链接**。
+
+**第 0010 题:**使用 Python 生成类似于下图中的**字母验证码图片**
+
+
+
+- [阅读资料](http://stackoverflow.com/questions/2823316/generate-a-random-letter-in-python)
+
+**第 0011 题:** 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+
+ 北京
+ 程序员
+ 公务员
+ 领导
+ 牛比
+ 牛逼
+ 你娘
+ 你妈
+ love
+ sex
+ jiangge
+
+**第 0012 题:** 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+
+**第 0013 题:** 用 Python 写一个爬图片的程序,爬 [这个链接里的日本妹子图片 :-)](http://tieba.baidu.com/p/2166231880)
+
+- [参考代码](http://www.v2ex.com/t/61686 "参考代码")
+
+**第 0014 题:** 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+
+ {
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+ }
+
+请将上述内容写到 student.xls 文件中,如下图所示:
+
+
+
+- [阅读资料](http://www.cnblogs.com/skynet/archive/2013/05/06/3063245.html) 腾讯游戏开发 XML 和 Excel 内容相互转换
+
+**第 0015 题:** 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+ {
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+ }
+
+请将上述内容写到 city.xls 文件中,如下图所示:
+
+
+
+
+**第 0016 题:** 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+
+ [
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+ ]
+
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+
+
+
+**第 0017 题:** 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+
+
+
+
+ {
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+ }
+
+
+
+- [阅读资料](http://www.cnblogs.com/skynet/archive/2013/05/06/3063245.html) 腾讯游戏开发 xml 和 Excel 相互转换
+
+**第 0018 题:** 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+
+
+
+
+ {
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+ }
+
+
+
+**第 0019 题:** 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+
+所示:
+
+
+
+
+
+
+ [
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+ ]
+
+
+
+
+**第 0020 题:** [登陆中国联通网上营业厅](http://iservice.10010.com/index_.html) 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。写代码,对每月通话时间做个统计。
+
+**第 0021 题:** 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。
+
+- 阅读资料 [用户密码的存储与 Python 示例](http://zhuoqiang.me/password-storage-and-python-example.html)
+
+- 阅读资料 [Hashing Strings with Python](http://www.pythoncentral.io/hashing-strings-with-python/)
+
+- 阅读资料 [Python's safest method to store and retrieve passwords from a database](http://stackoverflow.com/questions/2572099/pythons-safest-method-to-store-and-retrieve-passwords-from-a-database)
+
+**第 0022 题:** iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。
+
+**第 0023 题:** 使用 Python 的 Web 框架,做一个 Web 版本 留言簿 应用。
+
+[阅读资料:Python 有哪些 Web 框架](http://v2ex.com/t/151643#reply53)
+
+- 
+
+
+**第 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:文本-->电脑命令
diff --git a/will/0000/add_num.py b/will/0000/add_num.py
new file mode 100644
index 00000000..cb116444
--- /dev/null
+++ b/will/0000/add_num.py
@@ -0,0 +1,37 @@
+# 第 0000 题:将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果
+'''
+涉及模块/库:
+ 1.Pillow :http://pillow-cn.readthedocs.io/zh_CN/latest/
+ 2.random
+核心方法
+ 1.ImageFont Module:
+ PIL.ImageFont.truetype(font=None, size=10, index=0, encoding='', filename=None)
+ 2.ImageDraw Module:
+ PIL.ImageDraw.Draw.text(xy, text, fill=None, font=None, anchor=None)
+想法思路:
+ 1.Pillow库所读的图片以左上角为原点,类似于第四象限
+ 2.数字添加在图片的右上角,注意控制图片的位置,及xy参数
+'''
+
+
+import random
+from PIL import Image, ImageDraw, ImageFont
+new = 'new.jpg'
+
+def add_num(pic, text):
+ 'add a message number on pics'
+ try:
+ im = Image.open(pic)
+ except:
+ print('failed')
+ width, height = im.size
+ fontsize = height / 4
+ draw = ImageDraw.Draw(im)
+ font = ImageFont.truetype('arial.ttf', int(fontsize))
+ draw.text((0.7*width, 0.02*height), text, font=font, fill='red')
+ im.save(new)
+
+if __name__ == "__main__":
+ number = str(random.randint(1, 99))
+ pic = './old.jpg'
+ add_num(pic, number)
diff --git a/will/0001/app_store.py b/will/0001/app_store.py
new file mode 100644
index 00000000..1ca23d04
--- /dev/null
+++ b/will/0001/app_store.py
@@ -0,0 +1,62 @@
+# 第 0001 题: 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+'''
+想法思路:
+ 1. 字符串方式
+ 2. 时间戳方式
+ 3. UUID全局标识符,使用uuid1或者uuid5算法
+ 4. 加密算法
+'''
+
+import random, string, time, math, uuid
+
+chars = string.ascii_letters + string.digits
+
+def gen1():
+ '''
+ 根据26个大小写字母和数字随机选择10个
+ 涉及模块:
+ 1. random:
+ random.random()函数是这个模块中最常用的方法了,它会生成一个随机的浮点数,范围是在0.0~1.0之间。
+ random.uniform()正好弥补了上面函数的不足,它可以设定浮点数的范围,一个是上限,一个是下限。
+ random.randint()随机生一个整数int类型,可以指定这个整数的范围,同样有上限和下限值。
+ random.choice()可以从任何序列,比如list列表中,选取一个随机的元素返回,可以用于字符串、列表、元组等。
+ random.shuffle()如果你想将一个序列中的元素,随机打乱的话可以用这个函数方法。
+ random.sample()可以从指定的序列中,随机的截取指定长度的片断,不作原地修改。
+ 2. string
+ string.digits: 0-9
+ string.printable:可打印字符集
+ string.ascii_letters: 大小字母集
+ '''
+ key = ''.join(random.sample(chars, 10))
+ #key2 = ''.join(random.choice(chars) for i in range(10))
+ return key
+
+def gen2():
+ '''
+ 当前时间戳生成
+ 1. math.modf(x)返回一个list,包括小数部分及整数部分
+ 2. https://gist.github.com/willhunger/85b119793f01211de50db0e0a257dbf0
+ 3. http://www.wklken.me/posts/2015/03/03/python-base-datetime.html
+ '''
+ key = math.modf(time.time())[0]
+ return key
+
+def gen3():
+ '''
+ UUID:通用唯一识别码,由一组32位数的16进制数字所构成
+ uuid1()——基于时间戳
+ 由MAC地址、当前时间戳、随机数生成。可以保证全球范围内的唯一性,但MAC的使用同时带来安全性问题,局域网中可以使用IP来代替MAC。
+ uuid2()——基于分布式计算环境DCE(Python中没有这个函数)
+ 算法与uuid1相同,不同的是把时间戳的前4位置换为POSIX的UID,实际中很少用到该方法。
+ uuid3()——基于名字的MD5散列值
+ 通过计算名字和命名空间的MD5散列值得到,保证了同一命名空间中不同名字的唯一性,和不同命名空间的唯一性,但同一命名空间的同一名字生成相同的uuid。
+ uuid4()——基于随机数
+ 由伪随机数得到,有一定的重复概率,该概率可以计算出来。
+ uuid5()——基于名字的SHA-1散列值
+ 算法与uuid3相同,不同的是使用 Secure Hash Algorithm 1 算法
+
+ '''
+ return uuid.uuid4()
+
+for i in range(200):
+ print(gen2())
diff --git a/will/0002/into_mysql.py b/will/0002/into_mysql.py
new file mode 100644
index 00000000..18f23064
--- /dev/null
+++ b/will/0002/into_mysql.py
@@ -0,0 +1,44 @@
+# 第 0002 题: 将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。
+'''
+ 相关模块/库 : pymysql
+ 1. http://www.runoob.com/python3/python3-mysql.html
+'''
+import random, string, time, math, uuid, pymysql
+
+chars = string.ascii_letters + string.digits
+
+def gen1():
+ key = ''.join(random.sample(chars, 10))
+ #key2 = ''.join(random.choice(chars) for i in range(10))
+ return key
+
+def gen2():
+ key = math.modf(time.time())[0]
+ return key
+
+def gen3():
+ return uuid.uuid4()
+
+def dbp():
+ db = pymysql.connect('localhost', 'root', '1213', 'python')
+ cursor = db.cursor()
+ cursor.execute("DROP TABLE IF EXISTS CODE")
+ sql = """CREATE TABLE CODE (
+ app_code CHAR(100) NOT NULL
+ )"""
+ cursor.execute(sql)
+ return db, cursor
+
+if __name__ == '__main__':
+ db, cursor = dbp()
+ for i in range(200):
+ add_code = "INSERT INTO CODE(app_code) VALUES ('%s')" % gen2()
+ # print(add_code)
+ try:
+ cursor.execute(add_code)
+ db.commit()
+ except:
+ db.rollback()
+ db.close()
+ print('finish')
+
diff --git a/will/0003/into_redis.py b/will/0003/into_redis.py
new file mode 100644
index 00000000..362a1aa0
--- /dev/null
+++ b/will/0003/into_redis.py
@@ -0,0 +1,24 @@
+# 第 0003 题: 将 0001 题生成的 200 个激活码(或者优惠券)保存到 Redis 非关系型数据库中。
+import random, string, time, math, uuid, redis
+
+chars = string.ascii_letters + string.digits
+
+def gen1():
+ key = ''.join(random.sample(chars, 10))
+ #key2 = ''.join(random.choice(chars) for i in range(10))
+ return key
+
+def gen2():
+ key = math.modf(time.time())[0]
+ return key
+
+def gen3():
+ return uuid.uuid4()
+
+if __name__ == '__main__':
+ r = redis.Redis(host='localhost', port=6379, db=0)
+ # r.set('name', 'will')
+ # print(r.get('name'))
+ for i in range(200):
+ r.sadd('code', gen1())
+ r.save()
diff --git a/will/0004/sum.py b/will/0004/sum.py
new file mode 100644
index 00000000..6ee85b28
--- /dev/null
+++ b/will/0004/sum.py
@@ -0,0 +1,21 @@
+# 第 0004 题: 任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+import re
+path = './a.txt'
+
+def count(data):
+ words = re.compile('[a-zA-Z0-9]+')
+ di = {}
+ for i in words.findall(data):
+ if i not in di:
+ di[i] = 1
+ else:
+ di[i] += 1
+ return di
+
+if __name__ == '__main__':
+ with open(path, 'r') as file:
+ data = file.read().lower()
+ sumofword = count(data)
+ print(sumofword)
+ file.close()
diff --git a/will/README.md b/will/README.md
new file mode 100644
index 00000000..bfd61ac7
--- /dev/null
+++ b/will/README.md
@@ -0,0 +1,199 @@
+## Python 练习册,每天一个小程序 ##
+
+
+#### 说明: ####
+
+- Python 练习册,每天一个小程序。注:将 Python 换成其他语言,大多数题目也适用
+- 不会出现诸如「打印九九乘法表」、「打印水仙花」之类的题目
+- [点此链接,会看到部分题目的代码,仅供参考](https://github.com/Show-Me-the-Code/python)
+- 本文本文由@史江歌(shijiangge@gmail.com QQ:499065469)根据互联网资料收集整理而成,感谢互联网,感谢各位的分享。鸣谢!本文会不断更新。
+
+> Talk is cheap. Show me the code.--Linus Torvalds
+
+----------
+
+**第 0000 题:** 将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+类似于图中效果
+
+
+
+**第 0001 题:** 做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用**生成激活码**(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+**第 0002 题:** 将 0001 题生成的 200 个激活码(或者优惠券)保存到 **MySQL** 关系型数据库中。
+
+**第 0003 题:** 将 0001 题生成的 200 个激活码(或者优惠券)保存到 **Redis** 非关系型数据库中。
+
+**第 0004 题:** 任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+**第 0005 题:** 你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率的大小。
+
+**第 0006 题:** 你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
+
+**第 0007 题:** 有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。包括空行和注释,但是要分别列出来。
+
+**第 0008 题:** 一个HTML文件,找出里面的**正文**。
+
+**第 0009 题:** 一个HTML文件,找出里面的**链接**。
+
+**第 0010 题:** 使用 Python 生成类似于下图中的**字母验证码图片**
+
+
+
+- [阅读资料](http://stackoverflow.com/questions/2823316/generate-a-random-letter-in-python)
+
+**第 0011 题:** 敏感词文本文件 filtered_words.txt,里面的内容为以下内容,当用户输入敏感词语时,则打印出 Freedom,否则打印出 Human Rights。
+
+ 北京
+ 程序员
+ 公务员
+ 领导
+ 牛比
+ 牛逼
+ 你娘
+ 你妈
+ love
+ sex
+ jiangge
+
+**第 0012 题:** 敏感词文本文件 filtered_words.txt,里面的内容 和 0011题一样,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」。
+
+**第 0013 题:** 用 Python 写一个爬图片的程序,爬 [这个链接里的日本妹子图片 :-)](http://tieba.baidu.com/p/2166231880)
+
+- [参考代码](http://www.v2ex.com/t/61686 "参考代码")
+
+**第 0014 题:** 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示:
+
+ {
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+ }
+
+请将上述内容写到 student.xls 文件中,如下图所示:
+
+
+
+- [阅读资料](http://www.cnblogs.com/skynet/archive/2013/05/06/3063245.html) 腾讯游戏开发 XML 和 Excel 内容相互转换
+
+**第 0015 题:** 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示:
+
+ {
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+ }
+
+请将上述内容写到 city.xls 文件中,如下图所示:
+
+
+
+
+**第 0016 题:** 纯文本文件 numbers.txt, 里面的内容(包括方括号)如下所示:
+
+ [
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+ ]
+
+请将上述内容写到 numbers.xls 文件中,如下图所示:
+
+
+
+**第 0017 题:** 将 第 0014 题中的 student.xls 文件中的内容写到 student.xml 文件中,如
+
+下所示:
+
+
+
+
+
+ {
+ "1" : ["张三", 150, 120, 100],
+ "2" : ["李四", 90, 99, 95],
+ "3" : ["王五", 60, 66, 68]
+ }
+
+
+
+
+**第 0018 题:** 将 第 0015 题中的 city.xls 文件中的内容写到 city.xml 文件中,如下所示:
+
+
+
+
+
+ {
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+ }
+
+
+
+**第 0019 题:** 将 第 0016 题中的 numbers.xls 文件中的内容写到 numbers.xml 文件中,如下
+
+所示:
+
+
+
+
+
+
+ [
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+ ]
+
+
+
+
+**第 0020 题:** [登陆中国联通网上营业厅](http://iservice.10010.com/index_.html) 后选择「自助服务」 --> 「详单查询」,然后选择你要查询的时间段,点击「查询」按钮,查询结果页面的最下方,点击「导出」,就会生成类似于 2014年10月01日~2014年10月31日通话详单.xls 文件。写代码,对每月通话时间做个统计。
+
+**第 0021 题:** 通常,登陆某个网站或者 APP,需要使用用户名和密码。密码是如何加密后存储起来的呢?请使用 Python 对密码加密。
+
+- 阅读资料 [用户密码的存储与 Python 示例](http://zhuoqiang.me/password-storage-and-python-example.html)
+
+- 阅读资料 [Hashing Strings with Python](http://www.pythoncentral.io/hashing-strings-with-python/)
+
+- 阅读资料 [Python's safest method to store and retrieve passwords from a database](http://stackoverflow.com/questions/2572099/pythons-safest-method-to-store-and-retrieve-passwords-from-a-database)
+
+**第 0022 题:** iPhone 6、iPhone 6 Plus 早已上市开卖。请查看你写得 第 0005 题的代码是否可以复用。
+
+**第 0023 题:** 使用 Python 的 Web 框架,做一个 Web 版本 留言簿 应用。
+
+[阅读资料:Python 有哪些 Web 框架](http://v2ex.com/t/151643#reply53)
+
+- 
+
+
+**第 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:文本-->电脑命令
diff --git a/woniuzhang/0001/0001.py b/woniuzhang/0001/0001.py
new file mode 100644
index 00000000..2137a0b5
--- /dev/null
+++ b/woniuzhang/0001/0001.py
@@ -0,0 +1,21 @@
+import random
+import string
+
+words = string.ascii_letters + string.digits
+
+def get_coupon(digit):
+ conpon = ''
+ for i in range(digit):
+ conpon += random.choice(words)
+ return conpon
+
+def two_hundred_coupons():
+# conpons = set()
+ digit = 10
+ for i in range(200):
+ data = '%03d' % i ##数字编码放在最前面,保证验证码唯一性
+ data += get_coupon(digit)
+# conpons.add(data)
+ print(data)
+
+two_hundred_coupons()
diff --git a/woniuzhang/0007/0007.py b/woniuzhang/0007/0007.py
new file mode 100644
index 00000000..1e7466fc
--- /dev/null
+++ b/woniuzhang/0007/0007.py
@@ -0,0 +1,35 @@
+##将空行和注释都放到空行
+
+import re
+
+f = open('readme.md')
+a = f.readlines()
+r1 = re.compile('^"""')
+r3 = re.compile('."""$')
+r2 = re.compile('^#')
+r4 = re.compile('^$')
+kong_count = 0
+daima_count = 0
+flag = 1
+### flag 为标志位,是否遇到"""
+for line in a:
+# print(line)
+ line = line.strip()
+ if flag == 1:
+ if re.match(r1,line):
+ kong_count += 1
+ if re.match(r3,line):
+ pass
+ else:
+ flag = -flag
+ elif re.match(r2,line):
+ kong_count += 1
+ elif line == '':
+ kong_count += 1
+ else:
+ daima_count += 1
+ elif flag == -1:
+ kong_count += 1
+ if re.match(r1,line):
+ flag = -flag
+print('空行 %s, 非空行 %s' %(kong_count, daima_count))
diff --git a/woniuzhang/0007/readme.md b/woniuzhang/0007/readme.md
new file mode 100644
index 00000000..ca4bb9a7
--- /dev/null
+++ b/woniuzhang/0007/readme.md
@@ -0,0 +1,8 @@
+https://github.com/Yixiaohan/show-me-the-code
+"""
+dawde
+dsa
+ """
+
+""" sss"""
+## dad
diff --git a/wssywh/0000/0000.py b/wssywh/0000/0000.py
new file mode 100644
index 00000000..34932429
--- /dev/null
+++ b/wssywh/0000/0000.py
@@ -0,0 +1,18 @@
+#coding:utf-8
+#第 0000 题:将你的 QQ 头像(或者微博头像)右上角加上红色的数字,类似于微信未读信息数量那种提示效果。
+from PIL import Image, ImageDraw, ImageFont
+
+__author__ = 'Hunter'
+
+def picture_num(img,num):
+ im = ImageDraw.Draw(img)
+ print(img.size)
+ numFont = ImageFont.truetype("ahronbd.ttf",300)
+ im.text((260, -50), num, fill=(255, 0, 0),font=numFont)
+ img.save("wechat_100.jpg")
+ img.show()
+
+
+if __name__ == '__main__':
+ img = Image.open("wechat.jpg")
+ picture_num(img,"100")
\ No newline at end of file
diff --git a/wssywh/0000/ahronbd.ttf b/wssywh/0000/ahronbd.ttf
new file mode 100644
index 00000000..a0bd1911
Binary files /dev/null and b/wssywh/0000/ahronbd.ttf differ
diff --git a/wssywh/0000/wechat.jpg b/wssywh/0000/wechat.jpg
new file mode 100644
index 00000000..e1966da9
Binary files /dev/null and b/wssywh/0000/wechat.jpg differ
diff --git a/wssywh/0000/wechat_100.jpg b/wssywh/0000/wechat_100.jpg
new file mode 100644
index 00000000..99a17c13
Binary files /dev/null and b/wssywh/0000/wechat_100.jpg differ
diff --git a/wssywh/0001/0001.py b/wssywh/0001/0001.py
new file mode 100644
index 00000000..0e2ac617
--- /dev/null
+++ b/wssywh/0001/0001.py
@@ -0,0 +1,19 @@
+#coding:utf-8
+
+"""第0001题:做为Apple Store App独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),
+使用Python如何生成200个激活码(或者优惠券)?"""
+
+
+
+import uuid
+
+def get_id(num):
+ list_id = []
+ for i in range(num):
+ id = str(uuid.uuid1()).replace('-','')
+ list_id.append(id)
+ return list_id
+id = get_id(200)
+with open("file_id.txt","w") as file:
+ for i in id:
+ file.write(i+"\n")
\ No newline at end of file
diff --git a/wssywh/0001/file_id b/wssywh/0001/file_id
new file mode 100644
index 00000000..e69de29b
diff --git a/wssywh/0001/file_id.txt b/wssywh/0001/file_id.txt
new file mode 100644
index 00000000..50758132
--- /dev/null
+++ b/wssywh/0001/file_id.txt
@@ -0,0 +1,200 @@
+bac213149c1c11e791d47427ea33ef0a
+bac213159c1c11e791d47427ea33ef0a
+bac213169c1c11e791d47427ea33ef0a
+bac213179c1c11e791d47427ea33ef0a
+bac213189c1c11e791d47427ea33ef0a
+bac213199c1c11e791d47427ea33ef0a
+bac2131a9c1c11e791d47427ea33ef0a
+bac2131b9c1c11e791d47427ea33ef0a
+bac2131c9c1c11e791d47427ea33ef0a
+bac2131d9c1c11e791d47427ea33ef0a
+bac2131e9c1c11e791d47427ea33ef0a
+bac2131f9c1c11e791d47427ea33ef0a
+bac213209c1c11e791d47427ea33ef0a
+bac213219c1c11e791d47427ea33ef0a
+bac213229c1c11e791d47427ea33ef0a
+bac213239c1c11e791d47427ea33ef0a
+bac213249c1c11e791d47427ea33ef0a
+bac213259c1c11e791d47427ea33ef0a
+bac213269c1c11e791d47427ea33ef0a
+bac213279c1c11e791d47427ea33ef0a
+bac213289c1c11e791d47427ea33ef0a
+bac213299c1c11e791d47427ea33ef0a
+bac2132a9c1c11e791d47427ea33ef0a
+bac2132b9c1c11e791d47427ea33ef0a
+bac2132c9c1c11e791d47427ea33ef0a
+bac2132d9c1c11e791d47427ea33ef0a
+bac2132e9c1c11e791d47427ea33ef0a
+bac2132f9c1c11e791d47427ea33ef0a
+bac213309c1c11e791d47427ea33ef0a
+bac213319c1c11e791d47427ea33ef0a
+bac213329c1c11e791d47427ea33ef0a
+bac213339c1c11e791d47427ea33ef0a
+bac213349c1c11e791d47427ea33ef0a
+bac213359c1c11e791d47427ea33ef0a
+bac213369c1c11e791d47427ea33ef0a
+bac213379c1c11e791d47427ea33ef0a
+bac213389c1c11e791d47427ea33ef0a
+bac213399c1c11e791d47427ea33ef0a
+bac2133a9c1c11e791d47427ea33ef0a
+bac2133b9c1c11e791d47427ea33ef0a
+bac2133c9c1c11e791d47427ea33ef0a
+bac2133d9c1c11e791d47427ea33ef0a
+bac2133e9c1c11e791d47427ea33ef0a
+bac2133f9c1c11e791d47427ea33ef0a
+bac213409c1c11e791d47427ea33ef0a
+bac213419c1c11e791d47427ea33ef0a
+bac213429c1c11e791d47427ea33ef0a
+bac213439c1c11e791d47427ea33ef0a
+bac213449c1c11e791d47427ea33ef0a
+bac213459c1c11e791d47427ea33ef0a
+bac213469c1c11e791d47427ea33ef0a
+bac213479c1c11e791d47427ea33ef0a
+bac213489c1c11e791d47427ea33ef0a
+bac213499c1c11e791d47427ea33ef0a
+bac2134a9c1c11e791d47427ea33ef0a
+bac2134b9c1c11e791d47427ea33ef0a
+bac2134c9c1c11e791d47427ea33ef0a
+bac2134d9c1c11e791d47427ea33ef0a
+bac2134e9c1c11e791d47427ea33ef0a
+bac2134f9c1c11e791d47427ea33ef0a
+bac213509c1c11e791d47427ea33ef0a
+bac213519c1c11e791d47427ea33ef0a
+bac213529c1c11e791d47427ea33ef0a
+bac213539c1c11e791d47427ea33ef0a
+bac213549c1c11e791d47427ea33ef0a
+bac213559c1c11e791d47427ea33ef0a
+bac213569c1c11e791d47427ea33ef0a
+bac213579c1c11e791d47427ea33ef0a
+bac213589c1c11e791d47427ea33ef0a
+bac213599c1c11e791d47427ea33ef0a
+bac2135a9c1c11e791d47427ea33ef0a
+bac2135b9c1c11e791d47427ea33ef0a
+bac2135c9c1c11e791d47427ea33ef0a
+bac2135d9c1c11e791d47427ea33ef0a
+bac2135e9c1c11e791d47427ea33ef0a
+bac2135f9c1c11e791d47427ea33ef0a
+bac213609c1c11e791d47427ea33ef0a
+bac213619c1c11e791d47427ea33ef0a
+bac213629c1c11e791d47427ea33ef0a
+bac213639c1c11e791d47427ea33ef0a
+bac213649c1c11e791d47427ea33ef0a
+bac213659c1c11e791d47427ea33ef0a
+bac213669c1c11e791d47427ea33ef0a
+bac213679c1c11e791d47427ea33ef0a
+bac213689c1c11e791d47427ea33ef0a
+bac213699c1c11e791d47427ea33ef0a
+bac2136a9c1c11e791d47427ea33ef0a
+bac2136b9c1c11e791d47427ea33ef0a
+bac2136c9c1c11e791d47427ea33ef0a
+bac2136d9c1c11e791d47427ea33ef0a
+bac2136e9c1c11e791d47427ea33ef0a
+bac2136f9c1c11e791d47427ea33ef0a
+bac213709c1c11e791d47427ea33ef0a
+bac213719c1c11e791d47427ea33ef0a
+bac213729c1c11e791d47427ea33ef0a
+bac213739c1c11e791d47427ea33ef0a
+bac213749c1c11e791d47427ea33ef0a
+bac213759c1c11e791d47427ea33ef0a
+bac213769c1c11e791d47427ea33ef0a
+bac213779c1c11e791d47427ea33ef0a
+bac213789c1c11e791d47427ea33ef0a
+bac213799c1c11e791d47427ea33ef0a
+bac2137a9c1c11e791d47427ea33ef0a
+bac2137b9c1c11e791d47427ea33ef0a
+bac2137c9c1c11e791d47427ea33ef0a
+bac2137d9c1c11e791d47427ea33ef0a
+bac2137e9c1c11e791d47427ea33ef0a
+bac2137f9c1c11e791d47427ea33ef0a
+bac213809c1c11e791d47427ea33ef0a
+bac213819c1c11e791d47427ea33ef0a
+bac213829c1c11e791d47427ea33ef0a
+bac213839c1c11e791d47427ea33ef0a
+bac213849c1c11e791d47427ea33ef0a
+bac213859c1c11e791d47427ea33ef0a
+bac213869c1c11e791d47427ea33ef0a
+bac213879c1c11e791d47427ea33ef0a
+bac213889c1c11e791d47427ea33ef0a
+bac213899c1c11e791d47427ea33ef0a
+bac2138a9c1c11e791d47427ea33ef0a
+bac2138b9c1c11e791d47427ea33ef0a
+bac2138c9c1c11e791d47427ea33ef0a
+bac2138d9c1c11e791d47427ea33ef0a
+bac2138e9c1c11e791d47427ea33ef0a
+bac2138f9c1c11e791d47427ea33ef0a
+bac213909c1c11e791d47427ea33ef0a
+bac213919c1c11e791d47427ea33ef0a
+bac213929c1c11e791d47427ea33ef0a
+bac213939c1c11e791d47427ea33ef0a
+bac213949c1c11e791d47427ea33ef0a
+bac213959c1c11e791d47427ea33ef0a
+bac213969c1c11e791d47427ea33ef0a
+bac213979c1c11e791d47427ea33ef0a
+bac213989c1c11e791d47427ea33ef0a
+bac213999c1c11e791d47427ea33ef0a
+bac2139a9c1c11e791d47427ea33ef0a
+bac2139b9c1c11e791d47427ea33ef0a
+bac2139c9c1c11e791d47427ea33ef0a
+bac2139d9c1c11e791d47427ea33ef0a
+bac2139e9c1c11e791d47427ea33ef0a
+bac2139f9c1c11e791d47427ea33ef0a
+bac213a09c1c11e791d47427ea33ef0a
+bac213a19c1c11e791d47427ea33ef0a
+bac213a29c1c11e791d47427ea33ef0a
+bac213a39c1c11e791d47427ea33ef0a
+bac213a49c1c11e791d47427ea33ef0a
+bac213a59c1c11e791d47427ea33ef0a
+bac213a69c1c11e791d47427ea33ef0a
+bac213a79c1c11e791d47427ea33ef0a
+bac213a89c1c11e791d47427ea33ef0a
+bac213a99c1c11e791d47427ea33ef0a
+bac213aa9c1c11e791d47427ea33ef0a
+bac213ab9c1c11e791d47427ea33ef0a
+bac213ac9c1c11e791d47427ea33ef0a
+bac213ad9c1c11e791d47427ea33ef0a
+bac213ae9c1c11e791d47427ea33ef0a
+bac213af9c1c11e791d47427ea33ef0a
+bac213b09c1c11e791d47427ea33ef0a
+bac213b19c1c11e791d47427ea33ef0a
+bac213b29c1c11e791d47427ea33ef0a
+bac213b39c1c11e791d47427ea33ef0a
+bac213b49c1c11e791d47427ea33ef0a
+bac213b59c1c11e791d47427ea33ef0a
+bac213b69c1c11e791d47427ea33ef0a
+bac213b79c1c11e791d47427ea33ef0a
+bac213b89c1c11e791d47427ea33ef0a
+bac213b99c1c11e791d47427ea33ef0a
+bac213ba9c1c11e791d47427ea33ef0a
+bac213bb9c1c11e791d47427ea33ef0a
+bac213bc9c1c11e791d47427ea33ef0a
+bac213bd9c1c11e791d47427ea33ef0a
+bac213be9c1c11e791d47427ea33ef0a
+bac213bf9c1c11e791d47427ea33ef0a
+bac213c09c1c11e791d47427ea33ef0a
+bac213c19c1c11e791d47427ea33ef0a
+bac213c29c1c11e791d47427ea33ef0a
+bac213c39c1c11e791d47427ea33ef0a
+bac213c49c1c11e791d47427ea33ef0a
+bac213c59c1c11e791d47427ea33ef0a
+bac213c69c1c11e791d47427ea33ef0a
+bac213c79c1c11e791d47427ea33ef0a
+bac213c89c1c11e791d47427ea33ef0a
+bac213c99c1c11e791d47427ea33ef0a
+bac213ca9c1c11e791d47427ea33ef0a
+bac213cb9c1c11e791d47427ea33ef0a
+bac213cc9c1c11e791d47427ea33ef0a
+bac213cd9c1c11e791d47427ea33ef0a
+bac213ce9c1c11e791d47427ea33ef0a
+bac213cf9c1c11e791d47427ea33ef0a
+bac213d09c1c11e791d47427ea33ef0a
+bac213d19c1c11e791d47427ea33ef0a
+bac213d29c1c11e791d47427ea33ef0a
+bac213d39c1c11e791d47427ea33ef0a
+bac213d49c1c11e791d47427ea33ef0a
+bac213d59c1c11e791d47427ea33ef0a
+bac213d69c1c11e791d47427ea33ef0a
+bac213d79c1c11e791d47427ea33ef0a
+bac213d89c1c11e791d47427ea33ef0a
+bac213d99c1c11e791d47427ea33ef0a
+bac213da9c1c11e791d47427ea33ef0a
+bac213db9c1c11e791d47427ea33ef0a
diff --git a/wssywh/0002/0002.py b/wssywh/0002/0002.py
new file mode 100644
index 00000000..11fa3167
--- /dev/null
+++ b/wssywh/0002/0002.py
@@ -0,0 +1,24 @@
+#coding:utf-8
+"""第 0002 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。"""
+
+import MySQLdb
+
+list_id = []
+with open("../0001/file_id.txt",'r') as file:
+ files = file.readlines()
+ for content in files:
+ list_id.append(str(content).replace('\n',''))
+try:
+ conn = MySQLdb.connect(host='localhost',user='root',passwd='123456',port=3306)
+ cur = conn.cursor()
+ cur.execute('create database if not exists test')
+ conn.select_db('test')
+ cur.execute('create table if not exists Activation_code(id int ,uuid varchar(50))')
+ for i in range(len(list_id)):
+ cur.execute('insert into Activation_code values(%s,%s)',(i,list_id[i]))
+ conn.commit()
+ cur.close()
+ conn.close()
+except MySQLdb.Error as e:
+ print("Mysql Error %d: %s" % (e.args[0], e.args[1]))
+
diff --git a/yefan/015/city.xls~HEAD b/yefan/015/city.xls~HEAD
new file mode 100644
index 00000000..b020435b
Binary files /dev/null and b/yefan/015/city.xls~HEAD differ
diff --git a/yefan/015/city.xls~upstream_master b/yefan/015/city.xls~upstream_master
new file mode 100644
index 00000000..b020435b
Binary files /dev/null and b/yefan/015/city.xls~upstream_master differ