Starting Age Enumeration.
359556
def StartingAgeEnum(ctx):
    """"""
    return Enum(
        ctx,
        what=-2,
        unset=-1,
        dark=0,
        feudal=1,
        castle=2,
        imperial=3,
        postimperial=4,
        dmpostimperial=6
    )
61514
def _init_logicals(self):
        """"""
        size = self.lines.length() + 1
        self._starts = [None] * size
        self._ends = [None] * size
        for start, end in self._generate(self.lines):
            self._starts[start] = True
            self._ends[end] = True
386709
function init(n) {

  n
    .attr("x",function(d){
      return d.d3plus.x;
    })
    .attr("y",function(d){
      return d.d3plus.y;
    })
    .attr("width",0)
    .attr("height",0);

}
1330427
private void init( List<T> list ) {
		this.list = list;
		indexes = new int[ list.size() ];
		counters = new int[ list.size() ];

		for( int i = 0; i < indexes.length ; i++ ) {
			counters[i] = indexes[i] = i;
		}

		total = 1;
		for( int i = 2; i <= indexes.length ; i++ ) {
			total *= i;
		}

		permutation = 0;
	}
412569
private long yearStart(int year) {
        long ys = 0;
        if (cType == CalculationType.ISLAMIC_CIVIL
                || cType == CalculationType.ISLAMIC_TBLA
                || (cType == CalculationType.ISLAMIC_UMALQURA && (year < UMALQURA_YEAR_START || year > UMALQURA_YEAR_END))) {
            ys = (year-1)*354 + (long)Math.floor((3+11*year)/30.0);
        } else if(cType == CalculationType.ISLAMIC) {
            ys = trueMonthStart(12*(year-1));
        } else if(cType == CalculationType.ISLAMIC_UMALQURA){
            year -= UMALQURA_YEAR_START;
            // rounded least-squares fit of the dates previously calculated from UMALQURA_MONTHLENGTH iteration
            int yrStartLinearEstimate = (int)((354.36720 * year) + 460322.05 + 0.5);
            // need a slight correction to some
            ys = yrStartLinearEstimate + UMALQURA_YEAR_START_ESTIMATE_FIX[year];
        }
        return ys;
    }
382565
def sortedbyAge(self):
		'''
		
		'''
		ageAll = numpy.zeros(self.length)
		for i in range(self.length):
			ageAll[i] = self.Ind[i].age
		ageSorted = ageAll.argsort()
		return ageSorted[::-1]
30986
def number(items):
    """"""
    n = len(items)
    if n == 0:
        return items
    places = str(int(math.log10(n) // 1 + 1))
    format = '[{0[0]:' + str(int(places)) + 'd}] {0[1]}'
    return map(
        lambda x: format.format(x),
        enumerate(items)
    )
1254253
def work_experience(self, working_start_age: int = 22) -> int:
        
        age = self._store['age']
        if age == 0:
            age = self.age()

        return max(age - working_start_age, 0)
284548
def init1(self, dae):
        """"""
        self.v0 = matrix(dae.y[self.v])
70662
def values(self, start=None, stop=None):
        """"""
        return (item[1] for item in self.items(start, stop))
175581
protected int enumerateSegs(int startValue, boolean allowOverwrite) {
        int idx = startValue;

        for (Iterator<SyntaxElement> i = getElements().iterator(); i.hasNext(); ) {
            SyntaxElement s = i.next();
            if (s != null)
                idx = s.enumerateSegs(idx, allowOverwrite);
        }

        return idx;
    }
660379
def init(gid, element, count)
      @pitches = []
      @gid = gid
      @pid                  = element.attributes['id']
      @pitcher_name  = element.attributes['name']
      @out               = element.attributes['out']
      @inn               = convert_out_to_inn(element.attributes['out'])
      @bf                = element.attributes['bf']
      @er                = element.attributes['er']
      @r                  = element.attributes['r']
      @h                 = element.attributes['h']
      @so                = element.attributes['so']
      @hr                = element.attributes['hr']
      @bb               = element.attributes['bb']
      @w                = element.attributes['w']
      @l                  = element.attributes['l']
      @era              = element.attributes['era']
      @note            = element.attributes['note']
      if count == 1
        @start = true
      else
        @start = false
      end
    end
182960
def started_during(self, year, month):
		""""""
		return self.exclude(status="trialing").filter(start__year=year, start__month=month)
735431
def years_after(year = 0)
      Age.new(birthday: birthday, present_day: present_day.next_year(year))
    end
581196
private function ageBetweenSiblingsNoList(int $total): array
    {
        $rows = $this->ageBetweenSiblingsQuery($total);

        foreach ($rows as $fam) {
            $family = Family::getInstance($fam->family, $this->tree);
            $child1 = Individual::getInstance($fam->ch1, $this->tree);
            $child2 = Individual::getInstance($fam->ch2, $this->tree);

            if ($child1->canShow() && $child2->canShow()) {
                // ! Single array (no list)
                return [
                    'child1' => $child1,
                    'child2' => $child2,
                    'family' => $family,
                    'age'    => $this->calculateAge((int) $fam->age),
                ];
            }
        }

        return [];
    }
577887
def age(self):
        """"""
        if self.Death:
            age =  self.Death - self.Born
        else:    
            age =  datetime.date.today() - self.Born
        return age.days
1351452
def find_start_point(self):
        
        for i, row in enumerate(self.data):
            for j, _ in enumerate(row):
                if self.data[i, j] != 0:  # or not np.isfinite(self.data[i,j]):
                    return i, j