This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requests | |
import requests | |
r = requests.post("http://127.0.0.1:8000/input_file/", files={"file": open("a.txt", "rb")}) | |
print r.url | |
print r.text | |
# poster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="checkbox" onclick="$('input[type=checkbox]').prop('checked', $(this).prop('checked'))"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import StringIO | |
s = open("1.jpg", "rb").read() | |
im = Image.open(StringIO.StringIO(s)) | |
im.save("2.jpg", "jpeg") | |
sio = StringIO.StringIO() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "模块1" | |
Sub 自动分割日期() | |
'先把15天的数据清空 | |
For i = 1 To 15 | |
'选择每一张表 | |
Sheets(CStr(i)).Select | |
'全选 清空 | |
Cells.Select | |
Selection.Delete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cookielib | |
import urllib2, urllib | |
import time | |
import re | |
import traceback | |
import time | |
def findre(reg, s): | |
r = re.findall(reg, s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf8 | |
import cookielib | |
import urllib2, urllib | |
import time | |
import re | |
import traceback | |
import time | |
import random | |
from PIL import Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import re | |
import time | |
def get_online_seconds(): | |
p = urllib2.urlopen("http://www.baidu.com/").read() | |
r = re.findall(r'serverTime : "(.*?)"', p) | |
if r: | |
t = r[0] | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpyxl import Workbook | |
from openpyxl.reader.excel import load_workbook | |
wb_new = Workbook() | |
wb = load_workbook('1.xlsx') | |
col1 = "C" | |
col2 = "A" | |
sheet1 = wb.get_sheet_by_name(wb.sheetnames[0]) | |
sheet2 = wb.get_sheet_by_name(wb.sheetnames[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import urllib2 | |
import traceback | |
import re | |
import xlrd | |
import xlutils.copy | |
import win32com | |
from win32com.client import Dispatch, constants |
OlderNewer