Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/o/p/openblock-old-HEAD/ebdata/ebdata/templatemaker/clean.py   openblock-old(Download)
 
from ebdata.textmining.treeutils import make_tree_and_preprocess
from listdiff import longest_common_substring # relative import
from lxml import etree
 
    hash_list1 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list1]
    hash_list2 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list2]
    best_size, offset1, offset2 = longest_common_substring(hash_list1, hash_list2)
    if debug:
        print "Got these two lists:\n  %r\n  %r\nMatch:\n  %r" % (hash_list1, hash_list2, hash_list1[offset1:offset1+best_size])

src/e/v/everyblock_code-HEAD/ebdata/ebdata/templatemaker/clean.py   everyblock_code(Download)
from ebdata.textmining.treeutils import make_tree_and_preprocess
from listdiff import longest_common_substring # relative import
from lxml import etree
 
elements_with_ids = etree.XPath('//*[normalize-space(@id)!=""]')
    hash_list1 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list1]
    hash_list2 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list2]
    best_size, offset1, offset2 = longest_common_substring(hash_list1, hash_list2)
    if debug:
        print "Got these two lists:\n  %r\n  %r\nMatch:\n  %r" % (hash_list1, hash_list2, hash_list1[offset1:offset1+best_size])

src/o/p/openblock-HEAD/ebdata/ebdata/templatemaker/clean.py   openblock(Download)
 
from ebdata.textmining.treeutils import make_tree_and_preprocess
from listdiff import longest_common_substring # relative import
from lxml import etree
 
    hash_list1 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list1]
    hash_list2 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list2]
    best_size, offset1, offset2 = longest_common_substring(hash_list1, hash_list2)
    if debug:
        print "Got these two lists:\n  %r\n  %r\nMatch:\n  %r" % (hash_list1, hash_list2, hash_list1[offset1:offset1+best_size])

src/e/b/ebdata-1.2/ebdata/templatemaker/clean.py   ebdata(Download)
 
from ebdata.textmining.treeutils import make_tree_and_preprocess
from listdiff import longest_common_substring # relative import
from lxml import etree
 
    hash_list1 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list1]
    hash_list2 = [(el.tag, el.attrib.get('id'), el.attrib.get('class')) for el in list2]
    best_size, offset1, offset2 = longest_common_substring(hash_list1, hash_list2)
    if debug:
        print "Got these two lists:\n  %r\n  %r\nMatch:\n  %r" % (hash_list1, hash_list2, hash_list1[offset1:offset1+best_size])