Get the section end-points
970708
def _section_end_points(structure_block, id_map):
    ''''''
    soma_idx = structure_block[:, TYPE] == POINT_TYPE.SOMA
    soma_ids = structure_block[soma_idx, ID]
    neurite_idx = structure_block[:, TYPE] != POINT_TYPE.SOMA
    neurite_rows = structure_block[neurite_idx, :]
    soma_end_pts = set(id_map[id_]
                       for id_ in soma_ids[np.in1d(soma_ids, neurite_rows[:, PID])])

    # end points have either no children or more than one
    # ie: leaf or multifurcation nodes
    n_children = defaultdict(int)
    for row in structure_block:
        n_children[row[PID]] += 1
    end_pts = set(i for i, row in enumerate(structure_block)
                  if n_children[row[ID]] != 1)

    return end_pts.union(soma_end_pts)
660964
def get_go2sectiontxt(self):
        """"""
        go2txt = {}
        _get_secs = self.hdrobj.get_sections
        hdrgo2sectxt = {h:" ".join(_get_secs(h)) for h in self.get_hdrgos()}
        usrgo2hdrgo = self.get_usrgo2hdrgo()
        for goid, ntgo in self.go2nt.items():
            hdrgo = ntgo.GO if ntgo.is_hdrgo else usrgo2hdrgo[ntgo.GO]
            go2txt[goid] = hdrgo2sectxt[hdrgo]
        return go2txt
118993
def range_end(self):
        '''
        '''
        count = self.count
        range_end = self.range_start + self.limit - 1
        if count < range_end:
            range_end = count
        return range_end
695764
def paragraph_ends(self):
        """"""
        if not self.is_tagged(PARAGRAPHS):
            self.tokenize_paragraphs()
        return self.ends(PARAGRAPHS)
1013695
def get_endpoints(query = nil)
      @client.make_request(:get, @client.concat_user_path("#{DOMAIN_PATH}/#{id}/endpoints"), query)[0].map do |i|
        endpoint = EndPoint.new(i, @client)
        endpoint.domain_id = id
        endpoint
      end
    end
630333
def extract_ends(rec, sites, flank, fw, maxfragsize=800):
    
    nsites = len(sites)
    size = len(rec)
    for i, s in enumerate(sites):
        newid = "{0}:{1}".format(rec.name, s)
        recs = []

        if i == 0 or s - sites[i - 1] <= maxfragsize:
            newidL = newid + "L"
            left = max(s - flank, 0)
            right = s
            frag = rec.seq[left:right].strip("Nn")
            recL = SeqRecord(frag, id=newidL, description="")
            if i == 0 and s > maxfragsize:  # Contig L-end
                pass
            else:
                recs.append(recL)

        if i == nsites - 1 or sites[i + 1] - s <= maxfragsize:
            newidR = newid + "R"
            left = s
            right = min(s + flank, size)
            frag = rec.seq[left:right].strip("Nn")
            recR = SeqRecord(frag, id=newidR, description="")
            if i == nsites - 1 and size - s > maxfragsize:  # Contig R-end
                pass
            else:
                recs.append(recR)

        SeqIO.write(recs, fw, "fasta")
871632
@Override
    public List<Class<? extends AbstractResource>> getEndpoints() {
        List<Class<? extends AbstractResource>> result = new LinkedList<>();

        result.add(AuditResources.class);
        result.add(AuthResources.class);
        result.add(AuthResourcesV2.class);
        result.add(AlertResources.class);
        result.add(AnnotationResources.class);
        result.add(CollectionResources.class);
        result.add(DashboardResources.class);
        result.add(HistoryResources.class);
        result.add(ManagementResources.class);
        result.add(MetricResources.class);
        result.add(NamespaceResources.class);
        result.add(UserResources.class);
        result.add(DiscoveryResources.class);
        return result;
    }
218280
private ImmutableList<EndPoint> getEndPoints() {
        ImmutableList<EndPoint> endPoints = _endPoints;
        if (endPoints == null) {
            boolean locked = false;
            try {
                long timeout = System.currentTimeMillis() + 10;

                locked = _lock.tryLock(10, TimeUnit.MILLISECONDS);
                if (locked) {
                    endPoints = _endPoints;
                    long waitTime = timeout - System.currentTimeMillis();
                    if (endPoints == null && waitTime > 0) {
                        _endpointsAvailable.await(waitTime, TimeUnit.MILLISECONDS);
                        endPoints = _endPoints;
                    }
                }
            } catch (InterruptedException e) {
                // ignore
            } finally {
                if (locked) {
                    _lock.unlock();
                }
            }

            if (endPoints == null) {
                // Took too long waiting for the background to re-populate endpoints, just fetch from the source
                endPoints = getEndPointsFromHostDiscovery();
            }
        }
        
        return endPoints;
    }
840723
def get_section_data(self, name):
        """"""
        logging.debug(_('Obtaining PE section: %s'), name)
        for section in self.binary.sections:
            if section.Name.rstrip(b'\x00') == name:
                return section.get_data()
        return b''
1031413
private String getDestinationName(Endpoint endpoint) {
        int start = endpoint.getName().lastIndexOf('/') + 1;
        return endpoint.getName().substring(start);
    }
184266
function(endpoint,args,done) {

    var qs = util.getPaginationQS(args);

    endpoint +=  '?' + qs;
    util.getEndpoint(endpoint,args,done);
}
704604
function getEnd() {
		$end = $this->getPageNum() * $this->limit;
		if ($end > $this->getTotal())
			return $this->getTotal();
		return $end;
	}
1139186
def sections(self):
    '''
    
    '''

    if not getattr(self, '_sections', False):
      query_params = {
        'action': 'parse',
        'prop': 'sections',
      }
      query_params.update(self.__title_query_param)

      request = _wiki_request(query_params)
      self._sections = [section['line'] for section in request['parse']['sections']]

    return self._sections
1280860
def _getSectionForDataDirectoryEntry(self, data_directory_entry, sections):
        """"""
        for section in sections:
            if data_directory_entry.VirtualAddress >= section.header.VirtualAddress and \
            data_directory_entry.VirtualAddress < section.header.VirtualAddress + section.header.SizeOfRawData :

                return section
267697
def entrypoints(section):
    
    return {ep.name: ep.load() for ep in pkg_resources.iter_entry_points(section)}
300056
def get_endpoint_map(self):
        
        log.debug("getting end points...")
        cmd, url = DEVICE_URLS["get_endpoint_map"]
        return self._exec(cmd, url)
544483
private function parseEndpoint()
    {
        $pieces = explode("//", $this->endpoint);
        $host = end($pieces);

        $host_pieces = explode(".", $host);
        $this->accountId = $host_pieces[0];
        $region_pieces = explode("-internal", $host_pieces[2]);
        $this->region = $region_pieces[0];
    }