Extract the available calculation IDs from the datadir, in order.
322059
def get_calc_ids(datadir=None):
    
    datadir = datadir or get_datadir()
    if not os.path.exists(datadir):
        return []
    calc_ids = set()
    for f in os.listdir(datadir):
        mo = re.match(CALC_REGEX, f)
        if mo:
            calc_ids.add(int(mo.group(2)))
    return sorted(calc_ids)
1334074
def _read_id_numbers(self):
        """"""
        _byte = self._read_fileng(4)
        _addr = '.'.join([str(_) for _ in _byte])
        return _addr
802576
def _ordered_idx_from_perm(self, perm_str):
        """"""
        for i, ordered_str in enumerate(ORDERED_PERM_LIST):
            if perm_str == ordered_str:
                return i
504114
def metric_ids(self):
        
        return self._sorted_ingredients([
            d.id for d in self.values() if isinstance(d, Metric)
        ])
1276850
def get_ids_by_program(self, program):
		
		return set(row.process_id for row in self if row.program == program)
553103
def _get_selected_ids(self):
        """"""
        selection = self.get_selection()
        if selection.get_mode() != gtk.SELECTION_MULTIPLE:
            raise AttributeError('selected_ids only valid for select_multiple')
        model, selected_paths = selection.get_selected_rows()
        if selected_paths:
            return zip(*selected_paths)[0]
        else:
            return ()
1187209
private function extractRules()
    {
        // Keep in mind we don't support recursive directories (or cache the results)
        $possibleModels = glob(Strata::getSRCPath() . "Model" . DIRECTORY_SEPARATOR . "*.php");
        $this->batchModelFileRegistrationAttempt((array)$possibleModels);

        $possibleTaxonomies = glob(Strata::getSRCPath() . "Model" . DIRECTORY_SEPARATOR . "Taxonomy" . DIRECTORY_SEPARATOR . "*.php");
        $this->batchTaxonomyFileRegistrationAttempt((array)$possibleTaxonomies);
    }
171306
private WritableIntegerDataStore computeSubtreeSizes(DBIDs order) {
    WritableIntegerDataStore siz = DataStoreUtil.makeIntegerStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_TEMP, 1);
    DBIDVar v1 = DBIDUtil.newVar();
    for(DBIDIter it = order.iter(); it.valid(); it.advance()) {
      if(DBIDUtil.equal(it, parent.assignVar(it, v1))) {
        continue;
      }
      siz.increment(v1, siz.intValue(it));
    }
    return siz;
  }
290901
def get_ids(cs):
    """"""
    records = []
    for c in cs:
        records.append({k: c[k] for k in c if k in {'names', 'labels'}})
    return records
573959
def get_datarect(self):
        
        x1, y1, x2, y2 = self._org_x1, self._org_y1, self._org_x2, self._org_y2
        return (x1, y1, x2, y2)
1367322
def get_processing_block_ids(self):
        """"""

        # Initialise empty list
        _processing_block_ids = []

        # Pattern used to search processing block ids
        pattern = '*:processing_block:*'
        block_ids = self._db.get_ids(pattern)

        for block_id in block_ids:
            id_split = block_id.split(':')[-1]
            _processing_block_ids.append(id_split)
        return sorted(_processing_block_ids)
1191651
function extractDependencyIds(options) {
  const dependencies = [];

  function extract(items) {
    // Invalid if not Array
    if (Array.isArray(items)) {
      items.reduce((dependencies, item) => {
        // Items can be Array with depedency as first param
        const dep = Array.isArray(item) ? item[0] : item;

        // Only gather string references, not functions/modules
        if ('string' == typeof dep) dependencies.push(dep);
        return dependencies;
      }, dependencies);
    }
  }

  if (options.plugins) extract(options.plugins);
  if (options.presets) extract(options.presets);

  return dependencies;
}
1286197
def get_jids():
    '''
    
    '''
    serv = _get_serv(ret=None)
    jids = _get_list(serv, 'jids')
    loads = serv.get_multi(jids)  # {jid: load, jid: load, ...}
    ret = {}
    for jid, load in six.iteritems(loads):
        ret[jid] = salt.utils.jid.format_jid_instance(jid, salt.utils.json.loads(load))
    return ret
943071
def get_jids():
    '''
    
    '''
    log.debug('sdstack_etcd returner <get_jids> called')
    ret = []
    client, path = _get_conn(__opts__)
    items = client.get('/'.join((path, 'jobs')))
    for item in items.children:
        if item.dir is True:
            jid = str(item.key).split('/')[-1]
            ret.append(jid)
    return ret
275316
def calc_dirs_with_files(sources)
      filemap = {}
      sources.keys.sort.reverse.each do |o|
        d = File.dirname(o)
        if filemap.include?(d)
          filemap[d] << o
        else
          filemap[d] = [o]
        end
      end
      return filemap
    end
241128
def dovds(data):
    
    vds, X = 0, []
    for rec in data:
        X.append(dir2cart(rec))
    for k in range(len(X) - 1):
        xdif = X[k + 1][0] - X[k][0]
        ydif = X[k + 1][1] - X[k][1]
        zdif = X[k + 1][2] - X[k][2]
        vds += np.sqrt(xdif**2 + ydif**2 + zdif**2)
    vds += np.sqrt(X[-1][0]**2 + X[-1][1]**2 + X[-1][2]**2)
    return vds
787926
def dir_tails(self, rr_id: str) -> str:
        

        return Tails.dir(self._dir_tails, rr_id)