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
# Copyright (c) Peter Astrand <[email protected]> | |
class BackwardsReader: | |
"""Read a file line by line, backwards""" | |
BLKSIZE = 4096 | |
def readline(self): | |
while 1: | |
newline_pos = string.rfind(self.buf, "\n") | |
pos = self.file.tell() |
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
"use strict"; | |
var AjaxForm = (function() { | |
var hasSetup = false; | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { |
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
path = wx.FileSelector("Open") | |
path = wx.DirSelector() |
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
server { | |
listen 8000; | |
server_name 127.0.0.1; | |
location /static/ { | |
alias /root/SWE/static/; | |
autoindex on; | |
} | |
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 |
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 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
#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 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
Attribute VB_Name = "模块1" | |
Sub 自动分割日期() | |
'先把15天的数据清空 | |
For i = 1 To 15 | |
'选择每一张表 | |
Sheets(CStr(i)).Select | |
'全选 清空 | |
Cells.Select | |
Selection.Delete |