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 Queue | |
import threading | |
import urllib2 | |
import time | |
from BeautifulSoup import BeautifulSoup | |
hosts = ["http://yahoo.com", "http://google.com", "http://amazon.com", | |
"http://ibm.com", "http://apple.com"] | |
queue = Queue.Queue() |
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 -*- | |
__author__ = 'newbie@kali' | |
import re | |
import sys,getopt | |
import Queue | |
import threading | |
import urllib2 | |
import time | |
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
class GetResult: | |
def __init__(self): | |
self.result=[] #here i have changed | |
def add(self,x,y): | |
z= x+y | |
self.result.append(z) | |
rs=GetResult() | |
rs.add(1,2) #the result is [3] | |
print rs.result |
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
from django.db import models | |
# Create your models here. | |
class MY_ROLE(models.Model): | |
role_name = models.CharField(max_length=20) | |
def __unicode__(self): | |
return self.role_name | |
class MY_USER(models.Model): |
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 pycurl | |
import StringIO | |
import re | |
def initCurl(): | |
c=pycurl.Curl() | |
#c.setopt(pycurl.COOKIEFILE,"cookie_file_name") | |
#c.setopt(pycurl.COOKIEJAR,"cookie_file_name") | |
c.setopt(pycurl.FOLLOWLOCATION,0) | |
c.setopt(pycurl.CONNECTTIMEOUT, 1) # | |
c.setopt(pycurl.MAXREDIRS,1) |
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:utf8 -*- | |
__author__ = 'newbie0086#foxmail.com' | |
import Queue | |
import threading | |
from ftplib import FTP | |
import os,sys,string,datetime,time | |
import socket | |
class MyFtp: | |
def __init__(self,host,username,password,port=21): | |
self.host=host |
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:utf8 -*- | |
import urllib | |
import curl | |
import pycurl | |
import StringIO | |
def initCurl(): | |
c=pycurl.Curl() | |
c.setopt(pycurl.FOLLOWLOCATION,0) |
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
queue = Queue.Queue() | |
out_queue = Queue.Queue() | |
class ThreadUrl(threading.Thread): | |
"""Threaded Url Grab""" | |
def __init__(self, queue, out_queue): | |
threading.Thread.__init__(self) | |
self.queue = queue | |
self.out_queue = out_queue |
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
assume cs:code,ds:data,ss:stack | |
stack segment | |
dw 0,0,0,0,0,0,0,0 | |
stack ends | |
data segment | |
db '1. display ' | |
db '2. brows ' | |
db '3. replace ' |
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
数据库某表TABLE_1内容如下: | |
LINE_A LINE_B | |
a 1 | |
a 2 | |
b | |
b 3 | |
c | |
c |
OlderNewer