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:utf-8 -*- | |
import requests, os, hashlib | |
from pymongo import Connection #引入Mongo支持 | |
#连接Mongo | |
mongo = Connection(host='127.0.0.1', port=27017) | |
db = mongo.bt #连接bt这个数据库,没有会自动新建 | |
#保存下载的BT种子 | |
def save_file_to_disk(content, info_hash): |
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 | |
##版本:1.0 | |
##环境:python2.7 | |
##作者:moxie | |
##日期:2013.08.23 | |
##说明:文件生成目录为:D:/ludatui | |
import urllib2,urllib | |
import re |
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
require 'net/http' | |
require 'nokogiri' | |
### | |
# Lsong | |
# [email protected] | |
# http://lsong.org | |
# | |
# MIT LICENSE | |
# http://lsong.mit-license.org/ | |
# |
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
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
# author: amoblin <[email protected]> | |
import sys, re, urllib2, os, urllib | |
beauty_url = "http://huaban.com/favorite/beauty/" | |
#beauty_url = "http://huaban.com/" | |
pin_re = '<a href="/pins/(.+?)/"' |
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
# encoding:utf-8 | |
################################################################################# | |
#自定义区 | |
#beautiful soup doc : http://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html | |
################################################################################# | |
DEBUG = False #是否在调试 | |
EXAMPLE_URL = 'http://www.baidu.com' #示例网址 | |
HTML_ENCODING =None #返回的encoding,默认就好 | |
IMAGE_DIR = '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
package com.cqcet.servlet; | |
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import java.util.Random; | |
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
// vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8: | |
// Author: Binux<[email protected]> | |
// http://binux.me | |
// Created on 2013-11-11 18:50:58 | |
(function(){ | |
function getOffset(elem) { | |
var top = 0; | |
var left = 0; | |
do { |
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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: | |
# Created on 2014-09-10 12:05:42 | |
import os | |
import re | |
import json | |
import datetime | |
from libs.pprint import pprint |
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
# !/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
import time | |
import Queue | |
import threading | |
import traceback | |
class ExitException(Exception): |
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 java.io.IOException; | |
public class DctTrans { | |
// * in_image 输入图像矩阵 | |
// * iw, ih 输入图像宽高 | |
// * bsize bsizeXbsize图像块DCT变换 | |
// * type type = 1为正DCT变换, type =-1为逆变换 | |
// *------------------------------------------------------------*/ | |
public double[][] dct_image; |
OlderNewer