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

All Samples(37)  |  Call(34)  |  Derive(0)  |  Import(3)

src/a/n/anapsid-HEAD/ANAPSID/Decomposer/decomposer.py   anapsid(Download)
from Tree import Node, Leaf
from utils import *
from services import Service, Argument, Triple, Filter, Optional, UnionBlock, JoinBlock, Query
 
logger = logging.getLogger(__name__)
      if (len(sl)==1 and isinstance(sl[0],UnionBlock) and fl!=[]):
        sl[0]=updateFilters(sl[0],fl) 
      j=JoinBlock(sl,filters=fl)
      #print "filters" + str(j.filters)
      return j
       pl = [pl]
       pl.extend(ol)
    return JoinBlock(pl,filters=jb.filters)
 
###############################################################################
    for t in qcl1:
        eps = qcl1[t]
        elems = [JoinBlock([Service(ep, t)]) for ep in eps]
        ub = UnionBlock(elems)
        views1 = views1 + [ub]
    for t in qcl1:
        eps = qcl1[t]
        elems = [JoinBlock([Service(ep, t)]) for ep in eps]
        ub = UnionBlock(elems)
        views1 = views1 + [ub]

src/a/n/anapsid-HEAD/ANAPSID/Decomposer/parseQuery1_1.py   anapsid(Download)
from ply import lex, yacc
 
from services import Query, Argument, Triple, UnionBlock, JoinBlock, Optional, Filter, Expression, Service
 
# Lexer
def p_union_block_service_0(p):
    """
    union_block_service : join_block_service rest_union_block_service
    """
    p[0] = [JoinBlock(p[1])] + p[2]
def p_rest_union_block_service_1(p):
    """
    rest_union_block_service : UNION LKEY join_block_service rest_union_block_service RKEY rest_union_block_service
    """
    p[0] = [JoinBlock(p[3])] + p[4] + p[6]
    jb_list = [p[2]]+ p[3]
    if (p[5]!=[] and isinstance(p[5][0],Filter)):
      p[0] = [UnionBlock([JoinBlock(jb_list)])] + p[5]
    elif isinstance(p[2],UnionBlock):
      p[0] =  [p[2]]+ p[3] + p[5]
    else:
      p[0] = [UnionBlock([JoinBlock(jb_list)])] + p[5]

src/a/n/anapsid-HEAD/ANAPSID/Decomposer/parseQuery.py   anapsid(Download)
from ply import lex, yacc
 
from services import Query, Argument, Triple, UnionBlock, JoinBlock, Optional, Filter, Expression
 
# Lexer
def p_union_block_0(p):
    """
    union_block : pjoin_block rest_union_block POINT pjoin_block 
    """
    punion = [JoinBlock(p[1])] + p[2]
    pjoin = [UnionBlock(punion)] + p[4]
    p[0] = [JoinBlock(pjoin)]
def p_union_block_1(p):
    """
    union_block : pjoin_block rest_union_block pjoin_block 
    """
    punion = [JoinBlock(p[1])] + p[2]
    if (p[3]!=[]):
       pjoin = [UnionBlock(punion)] + p[3]
       p[0] = [JoinBlock(pjoin)]