conditions ::= condition | condition logical_binary_op conditions
        Note: By default lpar and rpar arguments are suppressed.
965412
def conditions(self):
        
        return operatorPrecedence(
            baseExpr=self.condition,
            opList=[(self.not_op, 1, opAssoc.RIGHT),
                    (self.logical_binary_op, 2, opAssoc.LEFT)],
            lpar=self.syntax.paren_left,
            rpar=self.syntax.paren_right)
298477
def p_xor_expression(tok):
        """"""
        if len(tok) == 4:
            tok[0] = LogicalBinOpRule(tok[2], tok[1], tok[3])
        else:
            tok[0] = tok[1]
215757
@SuppressWarnings("unchecked")
    public static Condition composite(Condition... conditions) {
        Condition init = alwaysTrue();

        for (Condition condition : conditions) {
            Predicate<Call> newPredicate = Predicates.and(init.getPredicate(), condition.getPredicate());
            if (condition instanceof ConditionWithApplicables) {
                init = new ConditionWithApplicables(newPredicate, ((ConditionWithApplicables) condition).getApplicables());
            } else {
                init = Condition.custom(newPredicate);
            }
        }

        return init;
    }
1139089
def BinaryBool(pred):
    
    class Predicate(Bool):
        def __init__(self, value, ignore_case=False):
            self.value = caseless(value) if ignore_case else value
            self.ignore_case = ignore_case

        def __call__(self, data):
            if not isinstance(data, list):
                data = [data]
            for d in data:
                try:
                    if pred(caseless(d) if self.ignore_case else d, self.value):
                        return True
                except:
                    pass
            return False
    return Predicate
810961
def _get_condition(self, acceptance_prob, a):
        
        if a == 1:
            return (acceptance_prob ** a) > (1/(2**a))
        else:
            return (1/(acceptance_prob ** a)) > (2**(-a))
1080244
def other_conditions(other, operation)
      self_conditions = query_conditions(self)

      unless self_conditions.kind_of?(Conditions::Operation)
        operation_slug = case operation
                         when :intersection, :difference then :and
                         when :union                     then :or
                         end

        self_conditions = Conditions::Operation.new(operation_slug, self_conditions)
      end

      self_conditions.send(operation, query_conditions(other))
    end
279567
def binary_operation_math(self, rule, left, right, **kwargs):
        
        if isinstance(left, NumberRule) and isinstance(right, NumberRule):
            return self._calculate_operation_math(rule, left, right)
        return self._compile_operation_rule(
            rule,
            left,
            right,
            MathBinOpRule
        )
1131665
private function _validateCondition($relational_operator, $value)
    {
        $relational_operators = array("=","<>",">","<",">=","<=","IN","NOT IN","IS","LIKE");

        if (!in_array($relational_operator, $relational_operators))
        {
            throw new Exceptions\ConditionOperatorException($relational_operator);
        }

        if (is_array($value))
        {
            if ($relational_operator !== "IN")
            {
                throw new Exceptions\ArrayOperatorException();
            }
        }
    }
460159
def tf_if(condition, a, b):
    
    int_condition = tf.to_float(tf.to_int64(condition))
    return a * int_condition + (1 - int_condition) * b
427629
public Condition<S, D> or(Condition<S, D> condition) {
    Assert.notNull(condition, "condition");
    return Conditions.or(this, condition);
  }
703730
def p_x_boolx(self,t):
    
    # todo: ply exposes precedence with %prec, use it.
    if len(t)==4: t[0] = bin_priority(t[2],t[1],t[3])
    elif len(t)==3: t[0] = un_priority(t[1],t[2])
    else: raise NotImplementedError('unk_len',len(t)) # pragma: no cover
427827
def p_expression_logical(self, p):
        
        p[0] = Expression(left=p[1], operator=p[2], right=p[3])
789492
def p_expr_EQ_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'EQ', p[1], p[3], lambda x, y: x == y)
1235538
def _set_condition(self, condition):
        """"""
        assert isinstance(condition, CodeExpression.TYPES)
        self.condition = condition
552729
def p_expr_ternary_op(p):
    ''
    p[0] = ast.TernaryOp(p[1], p[3], p[5], lineno=p.lineno(2))
38439
def p_expr_LT_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'LT', p[1], p[3], lambda x, y: x < y)
793493
function (op) {
  return function(condition) {
    return this._compare(function(val) {
      var isNum = _.isNumber(val);
      switch (op) {
        case 'gt':
          return isNum && val > condition;
        case 'lt':
          return isNum && val < condition;
        case 'gte':
          return isNum && val >= condition;
        default:
          return isNum && val <= condition;
      }
    });
  };
}