Skip to content

Instantly share code, notes, and snippets.

View kitelife's full-sized avatar
💪
I may be slow to respond.

xiayf kitelife

💪
I may be slow to respond.
View GitHub Profile
@kitelife
kitelife / insertionSort.c
Created March 10, 2012 05:10
Insertion Sort
//***********************************************************************
// Author: Xiayf
// Date: 2011/9/29
// What: Insertion Sort
//***********************************************************************
#include <stdio.h>
#include <stdlib.h>
void insertionSort(int *intArray, int arrayVolume);
@kitelife
kitelife / checklink.py
Created June 26, 2012 12:29 — forked from tonyseek/checklink.py
Visit all links of a website.
@kitelife
kitelife / extract_captcha.py
Created July 27, 2012 17:04 — forked from tonyseek/extract_captcha.py
Distinguish captcha with PIL and Tesseract
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
import StringIO
import requests
import PIL.Image
import tesserwrap
@kitelife
kitelife / checkWebsiteRegular.py
Created August 8, 2012 10:17
Check some website(s) regularly
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import requests
import sched
import time
import smtplib
from email.mime.text import MIMEText
from email.header import Header
# -*- coding: utf-8 -*-
import socket
import base64
import hashlib
import struct
from select import select
class WebSocket():
#!/usr/bin/python
import re, os
import requests
from BeautifulSoup import BeautifulSoup
INDEX_DICT = {'tw': (2, 12), 'dl': (36, 2), 'ga': (44, 1), 'wg': (46, 1), 'jp':
(48, 1), 'yd': (49, 1)}
FORUM_URL_PATTERN = 'http://www.angnow.com/forum-%d-%d.html'
@kitelife
kitelife / detect.py
Last active December 14, 2015 10:19
#!/usr/bin/python
#-*-coding: utf-8 -*-
import os, sys
from SimpleCV import *
template = 'face'
output_dir = '/home/usrname/output/'
def handle_pics(dir_name):
#!/usr/bin/python
import os, sys
target_dir = 'output/'
def rename_files(dir_name):
if not dir_name.endswith('/'):
dir_name += '/'
#!/usr/bin/python
#-*- coding: utf-8 -*-
import os
import requests
from BeautifulSoup import BeautifulSoup
def parse_class_x(class_name):
last_page_num = 1
base_url = 'http://qiip.net/category/firegirls/' + class_name
#!/usr/bin/python
#-*- coding: utf-8 -*-
import os
import sys
import re
import json
import matplotlib.pyplot as plt
count_dict = {}