Fetches the IANA link relation registry
358076
def emit_iana_rels(rels_url):
    ''''''
    text = requests.get(rels_url).text.encode('ascii', 'ignore')
    xml = objectify.fromstring(text)
    iana_rels = {str(rec.value): str(rec.description)
                 for rec in xml.registry.record}
    keys = sorted(iana_rels)
    print('# IANA link relation registry last updated on:', xml.updated)
    print('# Obtained from', rels_url)
    print()
    print('iana_rels = {')
    for key in keys:
        print('    {0!r}: ('.format(key))
        desc_list = list(linewrap(iana_rels[key], width=68))
        for i, line in enumerate(desc_list):
            line_ = line.replace('"', '\\"')  # escape double quotes
            if i < len(desc_list) - 1:
                print('        "{0} "'.format(line_))
            else:
                print('        "{0}"'.format(line_))
        print('    ),')
    print('}')
827835
def get_issue_remotelinks(self, issue_key, global_id=None, internal_id=None):
        
        return self.get_issue_remote_links(issue_key, global_id, internal_id)
991499
def RegistryKeyFromClient(args):
  
  for path in _GetExpandedPaths(args):
    pathspec = rdf_paths.PathSpec(
        path=path, pathtype=rdf_paths.PathSpec.PathType.REGISTRY)
    with vfs.VFSOpen(pathspec) as file_obj:
      yield file_obj.Stat()
459891
public Link getRequiredLink(LinkRelation relation) {

		Assert.notNull(relation, "Link relation must not be null!");

		return getRequiredLink(relation.value());
	}
1284517
def _get_network_interface(name, resource_group):
    '''
    
    '''
    public_ips = []
    private_ips = []
    netapi_versions = get_api_versions(kwargs={
        'resource_provider': 'Microsoft.Network',
        'resource_type': 'publicIPAddresses'
        }
    )
    netapi_version = netapi_versions[0]
    netconn = get_conn(client_type='network')
    netiface_query = netconn.network_interfaces.get(
        resource_group_name=resource_group,
        network_interface_name=name
    )

    netiface = netiface_query.as_dict()
    for index, ip_config in enumerate(netiface['ip_configurations']):
        if ip_config.get('private_ip_address') is not None:
            private_ips.append(ip_config['private_ip_address'])
        if 'id' in ip_config.get('public_ip_address', {}):
            public_ip_name = get_resource_by_id(
                ip_config['public_ip_address']['id'],
                netapi_version,
                'name'
            )
            public_ip = _get_public_ip(public_ip_name, resource_group)
            public_ips.append(public_ip['ip_address'])
            netiface['ip_configurations'][index]['public_ip_address'].update(public_ip)

    return netiface, public_ips, private_ips
242181
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return LinkType(key)
        if key not in LinkType._member_map_:
            extend_enum(LinkType, key, default)
        return LinkType[key]
44324
def get_referencer(registry):
    
    # Argument might be a config or request
    regis = getattr(registry, 'registry', None)
    if regis is None:
        regis = registry
    return regis.queryUtility(IReferencer)
1134760
function getLinkGroupIndex(linksOption, axis) {
    var axisModel = axis.model;
    var dim = axis.dim;
    for (var i = 0; i < linksOption.length; i++) {
        var linkOption = linksOption[i] || {};
        if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id)
            || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex)
            || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)
        ) {
            return i;
        }
    }
}
279937
def gather_registries() -> Tuple[Dict, Mapping, Mapping]:
    
    id2devices = copy.copy(_id2devices)
    registry = copy.copy(_registry)
    selection = copy.copy(_selection)
    dict_ = globals()
    dict_['_id2devices'] = {}
    dict_['_registry'] = {Node: {}, Element: {}}
    dict_['_selection'] = {Node: {}, Element: {}}
    return id2devices, registry, selection
343488
def retrieve_instance_links(self):
        
        instance_links = {}
        self.log.debug("LINKS IS %s", LINKS)
        for key, value in LINKS.items():
            if value not in self.pipeline_config['instance_links'].values():
                instance_links[key] = value
        return instance_links
634218
function fetchIdFromRelationshipLink(node, relationship) {
    // If id is not embedded in request, Private node ids can be accessed under initializedRelationships.
    // May still return undefined if parent, for example, does not exist.
    if (node) {
        let initializedRelationship = node._internalModel._relationships.initializedRelationships[relationship];
        if (initializedRelationship && initializedRelationship.link) {
            return initializedRelationship.link.split('nodes')[1].replace(/\//g, '');
        }
    }
    return undefined;
}
1363404
public List<Link> getLinks(LinkRelation relation) {

		Assert.notNull(relation, "Link relation must not be null!");

		return getLinks(relation.value());
	}
788891
public function getRegistrationLink($program_id, $session_id) {
    $uri = $this->getUrlFromOpenyProgramsSearchSettings('registration_path');

    $query = [
      'program_id' => $program_id,
      'session_ids' => $session_id,
    ];

    $path = Url::fromUri(
      $uri,
      [
        'query' => $query,
        'absolute' => TRUE,
        'https' => TRUE,
      ]
    );

    return $path->toString();
  }
211622
def get_registered(self):
        """"""

        doc = self._request(self.ws_prefix + ".getInfo", True)

        return _extract(doc, "registered")
693265
private Registry getRegistry(int port) throws RemoteException {
        Registry reg;
        String hostName = System.getProperty("java.rmi.server.hostname");
        if (hostName != null && !hostName.isEmpty()) {
            reg = LocateRegistry.getRegistry(hostName, port);
        }
        else {
            reg = LocateRegistry.getRegistry(port);
        }
        return reg;
    }
1124213
public static LinkRelation parse(String relation) {

		return LINK_RELATIONS.stream() //
				.filter(it -> it.value().equalsIgnoreCase(relation)) //
				.findFirst() //
				.orElseThrow(() -> new IllegalArgumentException(relation + " is not a valid IANA link relation!"));
	}
209811
def get_pid(self, uri):
        
        # if the wikibase is wikidata, and we give a wikidata uri or a PID with no URI specified:
        if (self.sparql_endpoint_url == 'https://query.wikidata.org/sparql' and
                (uri.startswith("P") or uri.startswith("http://www.wikidata.org/entity/"))):
            # don't look up anything, just return the same value
            return uri
        if uri.startswith("P"):
            uri = "http://www.wikidata.org/entity/" + uri
        return self.URI_PID[uri]