Expose local_name as remote_name

            An exposed attribute `local_name` will be sent within the HTTP request as
            a `remote_name`
431783
def expose_attribute(self, local_name, attribute_type, remote_name=None, display_name=None, is_required=False, is_readonly=False, max_length=None, min_length=None, is_identifier=False, choices=None, is_unique=False, is_email=False, is_login=False, is_editable=True, is_password=False, can_order=False, can_search=False, subtype=None, min_value=None, max_value=None):
        
        if remote_name is None:
            remote_name = local_name

        if display_name is None:
            display_name = local_name

        attribute = NURemoteAttribute(local_name=local_name, remote_name=remote_name, attribute_type=attribute_type)
        attribute.display_name = display_name
        attribute.is_required = is_required
        attribute.is_readonly = is_readonly
        attribute.min_length = min_length
        attribute.max_length = max_length
        attribute.is_editable = is_editable
        attribute.is_identifier = is_identifier
        attribute.choices = choices
        attribute.is_unique = is_unique
        attribute.is_email = is_email
        attribute.is_login = is_login
        attribute.is_password = is_password
        attribute.can_order = can_order
        attribute.can_search = can_search
        attribute.subtype = subtype
        attribute.min_value = min_value
        attribute.max_value = max_value

        self._attributes[local_name] = attribute
557979
def remote_url(self, remotename='origin'):
        
        cmd = ['git', 'config', 'remote.%s.url' % remotename]
        return self.sh(cmd, shell=False,
                       ignore_error=True).strip()
48576
public String getLocalName()
    {
        HttpConnection connection= _httpRequest.getHttpConnection();
        if (connection!=null)
            return connection.getServerName();
        return null;
    }
66579
def access(self, name: str, rename: Optional[str] = None) -> 'ProxyAttr':
        
        self.getter(name, rename)
        self.setter(name, rename)
        return self
838168
def request_name(self, name):
        

        while name in self._blacklist:
            name += "_"
        self._blacklist.add(name)
        return name
1306934
def set_attributes_for exc, request
      self.backtrace      = exc.backtrace.join("\n"),
      self.request_url    = request.original_url,
      self.request_method = request.request_method,
      self.parameters     = request.filtered_parameters,
      self.user_agent     = request.user_agent,
      self.client_ip      = request.remote_ip,
      self.status         = "new",
      self.description    = exc.inspect
    end
321570
def _use_remote_connection(self, kwargs):
        '''
        
        '''
        kwargs['host'] = kwargs.get('host')
        kwargs['username'] = kwargs.get('username')
        kwargs['password'] = kwargs.get('password')
        if kwargs['host'] is None or \
           kwargs['username'] is None or \
           kwargs['password'] is None:
            return False
        else:
            return True
429639
def resolve_remote(uri, handlers):
    
    scheme = urlparse.urlsplit(uri).scheme
    if scheme in handlers:
        result = handlers[scheme](uri)
    else:
        req = urlopen(uri)
        encoding = req.info().get_content_charset() or 'utf-8'
        result = json.loads(req.read().decode(encoding),)
    return result
743879
def hostname_for_event(self, clean_server_name):
        """"""
        uri = urlsplit(clean_server_name)
        if '@' in uri.netloc:
            hostname = uri.netloc.split('@')[1].split(':')[0]
        else:
            hostname = uri.netloc.split(':')[0]
        if hostname == 'localhost':
            hostname = self.hostname
        return hostname
909213
function getIriLocalName(iri) {
  if (memory[iri]) return memory[iri]; // !
  if (!(typeof iri === 'string' && iri.includes(colon))) throw new Error(`Given IRI "${iri}" is invalid`);

  let workingIri = iri;
  const protocolArray = iri.split('://');

  if (protocolArray.length > 2) throw new Error(`Given IRI "${iri}" is invalid`);
  if (protocolArray.length > 1) workingIri = protocolArray[1];

  const resPound = sliceOrFail(workingIri, pound);

  if (typeof resPound === 'string') {
    if (!resPound.length) throw new Error(`Given IRI "${iri}" is invalid`);

    return memory[iri] = resPound;
  }

  const resSlash = sliceOrFail(workingIri, slash);

  if (typeof resSlash === 'string') {
    if (!resSlash.length) throw new Error(`Given IRI "${iri}" is invalid`);

    return memory[iri] = resSlash;
  }
  const resColon = sliceOrFail(workingIri, colon);

  if (typeof resColon === 'string') {
    if (!resColon.length) throw new Error(`Given IRI "${iri}" is invalid`);

    return memory[iri] = resColon;
  }

  throw new Error(`Given IRI "${iri}" is invalid`);
}
496793
def name_of(remote)
      dir_defined?(remote)
      dir = remote[:dir].dup
      dir.gsub! '/', '_'
      name = dir.downcase.to_sym
    end
1290102
def make_remote_view(data, settings, more_excluded_names=None):
    
    data = get_remote_data(data, settings, mode='editable',
                           more_excluded_names=more_excluded_names)
    remote = {}
    for key, value in list(data.items()):
        view = value_to_display(value, minmax=settings['minmax'])
        remote[key] = {'type':  get_human_readable_type(value),
                       'size':  get_size(value),
                       'color': get_color_name(value),
                       'view':  view}
    return remote
1320912
function DetectLocalIPAddress(callback) {
            if (!DetectRTC.isWebRTCSupported) {
                return;
            }

            if (DetectRTC.isORTCSupported) {
                return;
            }

            getIPs(function(ip) {
                //local IPs
                if (ip.match(/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/)) {
                    callback('Local: ' + ip);
                }

                //assume the rest are public IPs
                else {
                    callback('Public: ' + ip);
                }
            });
        }
138480
def get_local_variable_from_name(self, variable_name):
        
        return next((v for v in self.variables if v.name == variable_name), None)
110375
def get_requests_for_local_unit(relation_name=None):
    
    local_name = local_unit().replace('/', '_')
    raw_certs_key = '{}.processed_requests'.format(local_name)
    relation_name = relation_name or 'certificates'
    bundles = []
    for rid in relation_ids(relation_name):
        for unit in related_units(rid):
            data = relation_get(rid=rid, unit=unit)
            if data.get(raw_certs_key):
                bundles.append({
                    'ca': data['ca'],
                    'chain': data.get('chain'),
                    'certs': json.loads(data[raw_certs_key])})
    return bundles
755646
def remote(self, name='origin'):
        """"""
        r = Remote(self, name)
        if not r.exists():
            raise ValueError("Remote named '%s' didn't exist" % name)
        return r
1079951
def _to_str(uri: URIRef) -> str:
        
        local_name = str(uri).replace(str(FHIR), '')
        return local_name.rsplit('.', 1)[1] if '.' in local_name else local_name