This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import socket,urllib,time,urllib2 | |
import re,StringIO,gzip | |
def gethtml(pageurl, data=None): | |
theheaders = { | |
'User-agent' : 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko)', | |
'Accept-Encoding' : 'gzip, deflate', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf8 -*- | |
import time,os,sys | |
newtime = time.time() | |
for root,dirs,files in os.walk(os.path.dirname(__file__)): | |
for name in files: | |
filepath = os.path.join(root, name) | |
os.utime(filepath, (newtime,newtime)) | |
sys.stdout.write(u"\r正在处理 %s...%s" % (filepath.decode('gbk')[:35-len(name)],filepath.decode('gbk')[-len(name)-35:])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Media; | |
namespace Sayuri.Windows { | |
public static class GridViewSort { | |
class SortIcon : Adorner { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import requests,re | |
headers = {'User-Agent': 'Mozilla/4.0', | |
'Accept-Language':'en-US,en;q=0.8', | |
'Accept-Encoding':'gzip, deflate, sdch', | |
'Cache-Control': 'max-age=0', | |
'Accept': 'text/html;q=0.9,*/*;q=0.8' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding:utf-8 | |
import requsts | |
import imghdr, json | |
''' this file is in package DEMO folder ''' | |
def Say(parameters, start_response): | |
s = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream google { | |
server 210.158.146.160:443 max_fails=3; | |
server 210.158.146.161:443 max_fails=3; | |
server 210.158.146.162:443 max_fails=3; | |
server 210.158.146.163:443 max_fails=3; | |
server 210.158.146.164:443 max_fails=3; | |
server 210.158.146.165:443 max_fails=3; | |
# add more google ip | |
} | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
祖 祖 外 外 | |
祖 祖 | |
母 父 父 母 | |
│ │ │ │ | |
└┬┘ └─┬─┘ | |
┌───┬─┴─┬──────────┐ ┌─────┴───┬───┐ | |
│ │ │ │ │ │ │ | |
姑 姑 嬸 叔 伯 伯 父 母 舅 舅 姨 姨 | |
丈 媽 嬸 父 母 父 親 親 舅 媽 媽 丈 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random, string | |
# number | |
number = random.randint(1, 9) | |
# char | |
char = chr(random.randint(65, 90)) | |
char = random.choice(string.ascii_letters) | |
# string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# global variable | |
SVR_PORT=0 | |
RUN_USER=$USER | |
BIN_DIR=$HOME/bin | |
# resolve links - $0 may be a softlink | |
ARG0="$0" | |
while [ -h "$ARG0" ]; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import struct | |
import requests,json,random | |
from gevent import monkey, spawn | |
monkey.patch_all() | |
proxies = {'all': 'http://127.0.0.1:8087'} | |
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/168 Safari/537.36', |