Applies default secthresh & exclusion radius constraints
517810
def apply_default_constraints(self):
        
        try:
            self.apply_secthresh(pipeline_weaksec(self.koi))
        except NoWeakSecondaryError:
            logging.warning('No secondary eclipse threshold set for {}'.format(self.koi))
        self.set_maxrad(default_r_exclusion(self.koi))
357987
def exclude_paths(args):
    """"""
    results = []
    if args.exclude:
        for excl_path in args.exclude:
            results.append(os.path.abspath(os.path.join(args.root, excl_path)))
    return results
1031697
def constrain_secdepth(self, thresh):
        
        self.apply_constraint(UpperLimit(self.secondary_depth, thresh, name='secondary depth'))
175294
def validate_exclusive_use_of_hash_constraints!(conf, attribute)
      return unless is_hash?(conf)
      if conf.key?(:only) && conf.key?(:except)
        raise CookiesConfigError.new("#{attribute} cookie config is invalid, simultaneous use of conditional arguments `only` and `except` is not permitted.")
      end
    end
870245
function(radius, resolution) {
            var result = this.expandedShell(radius, resolution, true);
            result = result.reTesselated();
            result.properties = this.properties; // keep original properties
            return result;
        }
1114963
def shrink(self, src, width=0, path=None, flags=0):
        
        self.shrink_method(self, src, width, path, flags)
1339169
boolean sweepVertical(EditShape shape, double tolerance) {
		setEditShape_(shape);
		m_b_cracked = false;
		m_tolerance = tolerance;
		m_tolerance_sqr = tolerance * tolerance;
		m_complications = false;
		boolean bresult = sweepImpl_();
		if (!m_complications) {
			int filtered = shape.filterClosePoints(tolerance, true, false);
			m_complications = filtered == 1;
			bresult |= filtered == 1;
		}
		
		if (m_vertex_cluster_index != -1) {
			m_shape.removeUserIndex(m_vertex_cluster_index);
			m_vertex_cluster_index = -1;
		}
		
		m_shape = null;
		return bresult;
	}
437232
def from_diff(diff, options=None, cwd=None):
        
        return RadiusFromDiff(diff=diff, options=options, cwd=cwd)
168743
public void applyDefaults() {
		if (fillColor == null) {
			fillColor = "#ffffff"; // white
		}
		if (strokeColor == null) {
			strokeColor = "#000000"; // black
		}
		if (strokeOpacity == -1) {
			strokeOpacity = 1; // fully opaque by default
		}
		if (fillOpacity == -1) {
			fillOpacity = .5f; // 50% transparent by default
		}
		if (strokeWidth == -1) {
			strokeWidth = 1; // white
		}
		if (symbol == null) { // circle with radius 10 by default
			symbol = new SymbolInfo();
		}
		if (symbol.getCircle() == null && symbol.getRect() == null && symbol.getImage() == null) {
			symbol.setCircle(new CircleInfo());
			symbol.getCircle().setR(10);
		}
	}
359101
static boolean executeNonReciprocal(EditShape shape, double tolerance) {
		Clusterer clusterer = new Clusterer();
		clusterer.m_shape = shape;
		clusterer.m_tolerance = tolerance;
		clusterer.m_sqr_tolerance = tolerance * tolerance;
		clusterer.m_cell_size = 2 * tolerance;
		clusterer.m_inv_cell_size = 1.0 / clusterer.m_cell_size;
		return clusterer.clusterNonReciprocal_();
	}
220057
function defaultUngrep(targets) {
    if (targets && targets.length) {
        var ungreps = [], target, len = targets.length;

        for (var i = 0; i < len; i++) {
            target = targets[i];
            target = '(?:^' + path.dirname(target) + sep + '){1}';
            target += '(?:/?.*/?)*' + NM_SEG;
            ungreps.push(new RegExp(escape(target)));
        }
        return ungreps;
    }
    return [new RegExp(escape(NM_SEG))];
}
302713
private static void precedenceIfOverlap(ReconfigurationProblem rp, Slice d, Slice c) {
        Model csp = rp.getModel();
        //No need to place the constraints if the slices do not have a chance to overlap
        if (!(c.getHoster().isInstantiated() && !d.getHoster().contains(c.getHoster().getValue()))
                && !(d.getHoster().isInstantiated() && !c.getHoster().contains(d.getHoster().getValue()))
                ) {
            BoolVar eq = csp.boolVar(rp.makeVarLabel(d.getHoster(), "", c.getHoster(), "?"));
          rp.getModel().arithm(d.getHoster(), "=", c.getHoster()).reifyWith(eq);
          org.chocosolver.solver.constraints.Constraint leqCstr = rp.getModel().arithm(c.getEnd(), "<=", d.getStart());
            ChocoUtils.postImplies(rp, eq, leqCstr);
        }
    }
778174
def options
      exclude = %w[
        docs
        spec
        vendor
        core.rb
        .js
        templates
        commands
        internal
        support
        Dockerfile
        Dockerfile.base
        Gemfile
        Gemfile.lock
        Guardfile
        LICENSE
        Procfile
        Rakefile
        bin
      ]
      exclude = exclude.map { |word| ['-x', word] }.flatten
      ["-m", "README.md", "--markup", "tomdoc"] + exclude
    end
360837
def apply_trend_constraint(self, limit, dt, **kwargs):
        
        if 'RV monitoring' not in self.constraints:
            self.constraints.append('RV monitoring')
        for pop in self.poplist:
            if not hasattr(pop,'dRV'):
                continue
            pop.apply_trend_constraint(limit, dt, **kwargs)
        self.trend_limit = limit
        self.trend_dt = dt
1335659
def normalize_excludes(rootpath, excludes):
    
    sep = os.path.sep
    f_excludes = []
    for exclude in excludes:
        if not os.path.isabs(exclude) and not exclude.startswith(rootpath):
            exclude = os.path.join(rootpath, exclude)
        if not exclude.endswith(sep):
            exclude += sep
        f_excludes.append(exclude)
    return f_excludes
560184
private void clearNeighbours( double[][][] houghValues, int x, int y, int radius ) {
        // The following code just clean the points around the center of the circle found.
        double halfRadius = radius / 2.0F;
        double halfSquared = halfRadius * halfRadius;

        int y1 = (int) Math.floor((double) y - halfRadius);
        int y2 = (int) Math.ceil((double) y + halfRadius) + 1;
        int x1 = (int) Math.floor((double) x - halfRadius);
        int x2 = (int) Math.ceil((double) x + halfRadius) + 1;

        if (y1 < 0)
            y1 = 0;
        if (y2 > height)
            y2 = height;
        if (x1 < 0)
            x1 = 0;
        if (x2 > width)
            x2 = width;

        for( int r = radiusMinPixel; r <= radiusMaxPixel; r = r + radiusIncPixel ) {
            int indexR = (r - radiusMinPixel) / radiusIncPixel;
            for( int i = y1; i < y2; i++ ) {
                for( int j = x1; j < x2; j++ ) {
                    if (Math.pow(j - x, 2D) + Math.pow(i - y, 2D) < halfSquared) {
                        houghValues[j][i][indexR] = 0.0D;
                    }
                }
            }
        }

    }
1167103
def set_sectPr(self, sectPr):
        
        pPr = self.get_or_add_pPr()
        pPr._remove_sectPr()
        pPr._insert_sectPr(sectPr)