Create AlluxioMaster web url.
192833
private static String createMasterWebUrl() {
    InetSocketAddress masterWeb = NetworkAddressUtils.getConnectAddress(
        ServiceType.MASTER_WEB, ServerConfiguration.global());
    return "http://" + masterWeb.getHostString() + ":" + masterWeb.getPort();
  }
1163472
def build_url (self):
        """"""
        super(UnknownUrl, self).build_url()
        if self.is_ignored():
            self.add_info(_("%(scheme)s URL ignored.") %
                          {"scheme": self.scheme.capitalize()})
            self.set_result(_("ignored"))
        else:
            self.set_result(_("URL is unrecognized or has invalid syntax"),
                        valid=False)
328791
def write(url, content, **args):
    """"""
    with HTTPSResource(url, **args) as resource:
        resource.write(content)
665013
def create(model_config, url, local_dir, sequence_length=64, batch_size=64, train_val_split=0.8):
    
    if not os.path.isabs(local_dir):
        local_dir = model_config.project_data_dir(local_dir)

    return TextUrlSource(
        url,
        absolute_data_path=local_dir,
        sequence_length=sequence_length,
        batch_size=batch_size,
        train_val_split=train_val_split,
    )
1247522
def write(url, content, **args):
    """"""
    with FTPResource(url, **args) as resource:
        resource.write(content)
848338
def url(proto, server, port=None, uri=None):
        """"""
        url_parts = [proto, '://', server]
        if port:
            port = int(port)
            if port < 1 or port > 65535:
                raise ValueError('invalid port value')
            if not ((proto == 'http' and port == 80) or
                    (proto == 'https' and port == 443)):
                url_parts.append(':')
                url_parts.append(str(port))

        if uri:
            url_parts.append('/')
            url_parts.append(requests.utils.quote(uri.strip('/')))

        url_parts.append('/')
        return ''.join(url_parts)
901687
def url(self):
        """"""
        return URL.format(http=self.web_proto, host=self.host, port=self.port)
1139686
def _new_url(self, relative_url):
        """"""

        return Url(
            urljoin(self._base_url, relative_url),
            **self._default_kwargs
        )
161242
def create_url(artist, song):
    """"""
    return (__BASE_URL__ +
            '/wiki/{artist}:{song}'.format(artist=urlize(artist),
                                           song=urlize(song)))
1063012
def make_url(invocation, args=[], kwargs={}):
    
    if not invocation.endswith('/'):
        invocation += '/'
    if not invocation.startswith('/'):
        invocation = '/' + invocation

    url = invocation

    for arg in args:
        url += str(arg) + "/"

    if kwargs:
        url = url[:-1]
        url += "?" + urlencode(kwargs)
    
    return url
967966
def make_full_url(request, url):
    
    urlparts = request.urlparts
    return '{scheme}://{site}/{url}'.format(
        scheme=urlparts.scheme,
        site=get_site_name(request),
        url=url.lstrip('/'),
    )
328504
def display_url(target):
    """"""

    prefix = u"http://" if not target.startswith("http") else u""
    target = prefix + target
    display(HTML(u'<a href="{t}" target=_blank>{t}</a>'.format(t=target)))
1035072
def url(self):
        """"""
        url = u'{home_url}{permalink}'.format(home_url=settings.HOME_URL,
                                              permalink=self._permalink)
        url = re.sub(r'/{2,}', r'/', url)
        return url
525534
def create(self, url):
        """"""
        bucket, obj_key = _parse_url(url)

        if not bucket:
            raise InvalidURL(url,
                             "You must specify a bucket and (optional) path")

        if obj_key:
            target = "/".join((bucket, obj_key))
        else:
            target = bucket

        return self.call("CreateBucket", bucket=target)
1203183
def absolutify(url):
    """"""
    site_url = getattr(settings, 'SITE_URL', False)

    # If we don't define it explicitly
    if not site_url:
        protocol = settings.PROTOCOL
        hostname = settings.DOMAIN
        port = settings.PORT
        if (protocol, port) in (('https://', 443), ('http://', 80)):
            site_url = ''.join(map(str, (protocol, hostname)))
        else:
            site_url = ''.join(map(str, (protocol, hostname, ':', port)))

    return site_url + url
106471
def url(url: str, method: str):
    """"""
    try:
        url_rule, params = (current_app.url_map.bind('localhost')
                            .match(url, method=method, return_rule=True))
    except (NotFound, MethodNotAllowed)\
            as e:
        click.secho(str(e), fg='white', bg='red')
    else:
        headings = ('Method(s)', 'Rule', 'Params', 'Endpoint', 'View', 'Options')
        print_table(headings,
                    [(_get_http_methods(url_rule),
                      url_rule.rule if url_rule.strict_slashes
                                    else url_rule.rule + '[/]',
                      _format_dict(params),
                      url_rule.endpoint,
                      _get_rule_view(url_rule),
                      _format_rule_options(url_rule))],
                    ['<' if i > 0 else '>' for i, col in enumerate(headings)],
                    primary_column_idx=1)
958274
public static URLEntity createUrlEntity(int start, int end, String url, String expandedURL, String displayURL) {
        return new URLEntityJSONImpl(start, end, url, expandedURL, displayURL);
    }