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

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

        def cond(c,a,b):
    if c:
        return a
    else:
        return b
        


src/b/b/bbchop-HEAD/BBChop/source/skipProbability.py   bbchop(Download)
def skipProbsSimple(skipped,dag):
 
        return [listUtils.cond(s,numberType.one,numberType.zero) for s in skipped]
 
 

src/b/b/bbchop-HEAD/BBChop/tests/testCases.py   bbchop(Download)
import randomdag
import dag
from listUtils import cond,listOr
import numberType
 
    # eliminate impossible counts for this test
    if not falsePos:
        counts=[ cond(not detectable[x],(counts[x][0],0),counts[x])  for x in range(N)]
    if not falseNeg:
        counts=[ cond(detectable[x],(0,counts[x][1]),counts[x])  for x in range(N)]