m._maxscore() -- Sets self.maxscore and self.minscore
438564
def _maxscore(self):
        
        total = 0
        lowtot= 0
        for lli in self.ll:
            total = total + max(lli.values())
            lowtot= lowtot+ min(lli.values())
        self.maxscore = total
        self.minscore = lowtot
508336
def update_score_summary(sender, **kwargs):
        
        score = kwargs['instance']
        try:
            score_summary = ScoreSummary.objects.get(
                student_item=score.student_item
            )
            score_summary.latest = score

            # A score with the "reset" flag set will always replace the current highest score
            if score.reset:
                score_summary.highest = score
            # The conversion to a float may return None if points possible is zero
            # In Python, None is always less than an integer, so any score
            # with non-null points possible will take precedence.
            elif score.to_float() > score_summary.highest.to_float():
                score_summary.highest = score
            score_summary.save()
        except ScoreSummary.DoesNotExist:
            ScoreSummary.objects.create(
                student_item=score.student_item,
                highest=score,
                latest=score,
            )
        except DatabaseError as err:
            logger.exception(
                u"Error while updating score summary for student item {}"
                .format(score.student_item)
            )
855396
public void setMax(int max)
    {
        this.max = max;
        if (this.max < Alterable.MIN)
        {
            this.max = Alterable.MIN;
        }
        set(cur);
    }
841263
def add(self, num):
        
        try:
            val = self.value() + num
        except:
            val = num
        self.set(min(self.fmax, max(self.fmin, val)))
1321495
def items(
        self,
        min_rank=None,
        max_rank=None,
        min_score=None,
        max_score=None,
        reverse=False,
        pipe=None,
    ):
        
        pipe = self.redis if pipe is None else pipe

        no_ranks = (min_rank is None) and (max_rank is None)
        no_scores = (min_score is None) and (max_score is None)

        # Default scope: everything
        if no_ranks and no_scores:
            ret = self.items_by_score(min_score, max_score, reverse, pipe)
        # Scope narrows to given score range
        elif no_ranks and (not no_scores):
            ret = self.items_by_score(min_score, max_score, reverse, pipe)
        # Scope narrows to given rank range
        elif (not no_ranks) and no_scores:
            ret = self.items_by_rank(min_rank, max_rank, reverse, pipe)
        # Scope narrows twice - once by rank and once by score
        else:
            results = self.items_by_rank(min_rank, max_rank, reverse, pipe)
            ret = []
            for member, score in results:
                if (min_score is not None) and (score < min_score):
                    continue
                if (max_score is not None) and (score > max_score):
                    continue
                ret.append((member, score))

        return ret
218535
function minmaxValidator(value, testValue, validityName, limit, compareFunction) {
                if (!angular.isUndefined(testValue) && limit) {
                    if (!ngModelCtrl.$isEmpty(value) && compareFunction) {
                        return testValue;
                    } else {
                        return value;
                    }
                }
                else {
                    if (!limit) {
                        ngModelCtrl.$setValidity(validityName, !compareFunction);
                    }
                    return value;
                }
            }
406436
private void tokenStatsAdd(int min, int max) {
    tokenStatsNumber++;
    if (tokenStatsMinPos == null) {
      tokenStatsMinPos = min;
    } else {
      tokenStatsMinPos = Math.min(tokenStatsMinPos, min);
    }
    if (tokenStatsMaxPos == null) {
      tokenStatsMaxPos = max;
    } else {
      tokenStatsMaxPos = Math.max(tokenStatsMaxPos, max);
    }
  }
1346102
private void setMaxMin(IntervalRBTreeNode<T> n) {
    n.min = n.left;
    n.max = n.right;
    if (n.leftChild != null) {
      n.min = Math.min(n.min, n.leftChild.min);
      n.max = Math.max(n.max, n.leftChild.max);
    }
    if (n.rightChild != null) {
      n.min = Math.min(n.min, n.rightChild.min);
      n.max = Math.max(n.max, n.rightChild.max);
    }
  }
458840
public void setMin (float min) {
		if (min > max) throw new IllegalArgumentException("min can't be > max");

		this.min = min;

		if (min >= 0) {
			textFieldFilter.setAcceptNegativeValues(false);
		} else {
			textFieldFilter.setAcceptNegativeValues(true);
		}

		if (current < min) {
			current = min;
			spinner.notifyValueChanged(spinner.isProgrammaticChangeEvents());
		}
	}
1105627
public void setMaxSize( int maxRows , int maxCols )
    {
        this.maxRows = maxRows; this.maxCols = maxCols;

        Q = new DMatrixRMaj(maxRows,maxRows);
        R = new DMatrixRMaj(maxRows,maxCols);

        Y = new DMatrixRMaj(maxRows,1);
        Z = new DMatrixRMaj(maxRows,1);
    }
208483
def set_max_entries(self):
        
        if self.cache:
            self.max_entries = float(max([i[0] for i in self.cache.values()]))
253168
def _setMaxRecords(self, maxRec):
		""""""

		if type(maxRec) == int:
			self._maxRecords = maxRec
		elif type(maxRec) == str and (maxRec.lower == 'all' or maxRec.isdigit()):
			self._maxRecords = maxRec.lower
		else:
			raise FMError, 'Unsupported -max value (not a number or "all").'
1214411
public void setOccurence(int min, int max) throws ParseException {
    if (!simplified) {
      if ((min < 0) || (min > max) || (max < 1)) {
        throw new ParseException("Illegal number {" + min + "," + max + "}");
      }
      if (min == 0) {
        optional = true;
      }
      minimumOccurence = Math.max(1, min);
      maximumOccurence = max;
    } else {
      throw new ParseException("already simplified");
    }
  }
203640
public void setFill(double val, double min, double max) {
    this.val = val;
    this.min = min;
    this.max = max;
  }
53162
private void updateMax(MtasRBTreeNode n, MtasRBTreeNode c) {
    if (c != null) {
      if (n.max < c.max) {
        n.max = c.max;
      }
    }
  }
936032
def set_ylimits(self, min=None, max=None):
        
        self.limits['ymin'] = min
        self.limits['ymax'] = max
1182179
public void setMaxPointError(double maxPointError)
    {
        if(maxPointError < 0 || Double.isInfinite(maxPointError) || Double.isNaN(maxPointError))
            throw new ArithmeticException("The error must be a positive value, not " + maxPointError );
        this.maxPointError = maxPointError;
    }