Set limit on the number of propagations.
390
def prop_budget(self, budget):
        

        if self.minisat:
            pysolvers.minisatgh_pbudget(self.minisat, budget)
297788
def limit(self, v):
        
        if not (v is None or isinstance(v, six.integer_types)):
            raise TypeError
        if v == self._limit:
            return self

        if v < 0:
            raise QueryException("Negative limit is not allowed")

        clone = copy.deepcopy(self)
        clone._limit = v
        return clone
566609
protected function limitPending()
    {
        $offset     = $this->pending['limit']['offset'];
        $num        = $this->pending['limit']['number'];
        $this->data = array_slice($this->data, $offset, $num);
    }
272229
public static void limit (Collection<?> col, int limit)
    {
        int size = col.size();
        if (size > limit) {
            if (col instanceof List<?>) {
                ((List<?>) col).subList(limit, size).clear();

            } else {
                Iterator<?> itr = col.iterator();
                for (int ii = 0; ii < limit; ii++) {
                    itr.next();
                }
                while (itr.hasNext()) {
                    itr.next();
                    itr.remove();
                }
            }
        }
    }
137719
private void setLimit(int from, int size) {
		request.setFrom(from);

		if (size > -1) {
			request.setSize(size);
		}
	}
134313
def posargs_limiter(func, *args):
    
    posargs = inspect.getargspec(func)[0]
    length = len(posargs)
    if inspect.ismethod(func):
        length -= 1
    if length == 0:
        return func()
    return func(*args[0:length])
1227584
public SettingsPack connectionsLimit(int value) {
        sp.set_int(settings_pack.int_types.connections_limit.swigValue(), value);
        return this;
    }
295078
public void setDistanceLimit(double limit) {
        exploreType = DISTANCE;
        this.limit = limit;
        this.finishLimit = limit + Math.max(limit * 0.14, 2_000);
    }
159486
private void onLimit(StringBuilder builder)
    {
        builder.append(CQLTranslator.LIMIT);
        builder.append(this.maxResult);
    }
356339
public void setLimit(int lim) {
        if(0<=lim && lim<=rep.length()) {
            limit=lim;
        } else {
            limit=rep.length();
        }
        reachedLimit=false;
    }
1315
def set_buffer_limits(self, high=None, low=None):
        """"""
        if high is None:
            high = self.default_buffer_size
        if low is None:
            low = high // 2
        self._buffer_high = high
        self._buffer_low = low
936032
def set_ylimits(self, min=None, max=None):
        
        self.limits['ymin'] = min
        self.limits['ymax'] = max
582007
def rate_limit(limit: int, key=None):
    

    def decorator(func):
        setattr(func, 'throttling_rate_limit', limit)
        if key:
            setattr(func, 'throttling_key', key)
        return func

    return decorator
806803
def _set_propagation(self, width, height):
        
        if width is None:
            width = 0

        if height is None:
            height = 0

        # set the propagate value
        propagate_function = self.tk.pack_propagate
        if self.layout == "grid":
            propagate_function = self.tk.grid_propagate

        propagate_value = True

        # if height or width > 0 need to stop propagation
        if isinstance(width, int):
            if width > 0:
                propagate_value = False
        if isinstance(height, int):
            if height > 0:
                propagate_value = False

        # if you specify a height or width you must specify they other
        # (unless its a fill)
        if isinstance(width, int) and isinstance(height, int):
            if (width == 0 and height > 0) or (height == 0 and width > 0):
                 utils.error_format("You must specify a width and a height for {}".format(self.description))

        propagate_function(propagate_value)
111319
def limit_gen(limit, iterable):
  ''''''
  limit = int(limit)
  assert limit >= 0, 'negative limit'

  for item in iterable:
    if limit <= 0:
      break
    yield item
    limit -= 1
722484
private function setLimitAndSetOffset()
    {
        if ($this->perPage === null) {
            $this->offset = null;
            $this->limit = null;
        } else {
            $this->offset = ($this->currentPage - 1) * $this->perPage;
            $this->limit = $this->perPage;
        }
    }
1043329
public void limitItems(int limit) {
        buildNumbers = copyLastElements(buildNumbers, limit);

        passedFeatures = copyLastElements(passedFeatures, limit);
        failedFeatures = copyLastElements(failedFeatures, limit);
        totalFeatures = copyLastElements(totalFeatures, limit);

        passedScenarios = copyLastElements(passedScenarios, limit);
        failedScenarios = copyLastElements(failedScenarios, limit);
        totalScenarios = copyLastElements(totalScenarios, limit);

        passedSteps = copyLastElements(passedSteps, limit);
        failedSteps = copyLastElements(failedSteps, limit);
        skippedSteps = copyLastElements(skippedSteps, limit);
        pendingSteps = copyLastElements(pendingSteps, limit);
        undefinedSteps = copyLastElements(undefinedSteps, limit);
        totalSteps = copyLastElements(totalSteps, limit);

        durations = copyLastElements(durations, limit);
    }