Get a non-registration Route53 client.
420122
def get_route53_client(agent, region, cooperator=None):
    
    if cooperator is None:
        cooperator = task
    return region.get_client(
        _Route53Client,
        agent=agent,
        creds=region.creds,
        region=REGION_US_EAST_1,
        endpoint=AWSServiceEndpoint(_OTHER_ENDPOINT),
        cooperator=cooperator,
    )
558376
def client_for(self, config_path, quiet=False, bootstrap_server=False,
                   create_client=False):
        """"""
        client = None
        abs_path = os.path.abspath(config_path)
        if abs_path in self.clients:
            client = self.clients[abs_path]
        elif create_client:
            client = self.create_client(config_path)
            if client.setup(quiet=quiet, bootstrap_server=bootstrap_server):
                self.clients[abs_path] = client
        return client
1007136
function getProxyMiddleware(context, uri) {
  const pathRewrite = {};
  pathRewrite[`^${context}`] = url.parse(uri).pathname;

  return proxy({
    target: getHost(uri),
    changeOrigin: true,
    logLevel: 'warn',
    pathRewrite: pathRewrite,
  });
}
1280920
function getRawRequest (
  { resource, loaderIndex, loaders },
  excludedPreLoaders = /eslint-loader/
) {
  return loaderUtils.getRemainingRequest({
    resource: resource,
    loaderIndex: loaderIndex,
    loaders: loaders.filter(loader => !excludedPreLoaders.test(loader.path))
  })
}
646026
def make_fixed_client_id(self):
        
        machine = platform.node()
        process = os.getpid()
        thread = threading.currentThread().getName()
        return base64.b64encode('%s|%s|%s' % (machine, process, thread))
524208
def network_get(auth=None, **kwargs):
    '''
    

    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.get_network(**kwargs)
1040940
def getMember(self, address, id, headers=None, query_params=None, content_type="application/json"):
        
        uri = self.client.base_url + "/network/"+id+"/member/"+address
        return self.client.get(uri, None, headers, query_params, content_type)
1287886
def routes_register(app, handler, *paths, methods=None, router=None, name=None):
    """"""
    if router is None:
        router = app.router

    handler = to_coroutine(handler)

    resources = []

    for path in paths:

        # Register any exception to app
        if isinstance(path, type) and issubclass(path, BaseException):
            app._error_handlers[path] = handler
            continue

        # Ensure that names are unique
        name = str(name or '')
        rname, rnum = name, 2
        while rname in router:
            rname = "%s%d" % (name, rnum)
            rnum += 1

        path = parse(path)
        if isinstance(path, RETYPE):
            resource = RawReResource(path, name=rname)
            router.register_resource(resource)

        else:
            resource = router.add_resource(path, name=rname)

        for method in methods or [METH_ANY]:
            method = method.upper()
            resource.add_route(method, handler)

        resources.append(resource)

    return resources
506387
def _get_client():
        """"""
        return utils.get_client(url=CONFIG.HNV.url,
                                username=CONFIG.HNV.username,
                                password=CONFIG.HNV.password,
                                allow_insecure=CONFIG.HNV.https_allow_insecure,
                                ca_bundle=CONFIG.HNV.https_ca_bundle)
881174
def update_route53(self):
        
        self.log.debug('Updating Route53 information for {}'.format(self.account))

        # region Update zones
        existing_zones = DNSZone.get_all(self.account)
        zones = self.__fetch_route53_zones()
        for resource_id, data in zones.items():
            if resource_id in existing_zones:
                zone = DNSZone.get(resource_id)
                if zone.update(data):
                    self.log.debug('Change detected for Route53 zone {}/{}'.format(
                        self.account,
                        zone.name
                    ))
                    zone.save()
            else:
                tags = data.pop('tags')
                DNSZone.create(
                    resource_id,
                    account_id=self.account.account_id,
                    properties=data,
                    tags=tags
                )

                self.log.debug('Added Route53 zone {}/{}'.format(
                    self.account,
                    data['name']
                ))

        db.session.commit()

        zk = set(zones.keys())
        ezk = set(existing_zones.keys())

        for resource_id in ezk - zk:
            zone = existing_zones[resource_id]

            db.session.delete(zone.resource)
            self.log.debug('Deleted Route53 zone {}/{}'.format(
                self.account.account_name,
                zone.name.value
            ))
        db.session.commit()
        # endregion

        # region Update resource records
        try:
            for zone_id, zone in DNSZone.get_all(self.account).items():
                existing_records = {rec.id: rec for rec in zone.records}
                records = self.__fetch_route53_zone_records(zone.get_property('zone_id').value)

                for data in records:
                    if data['id'] in existing_records:
                        record = existing_records[data['id']]
                        if record.update(data):
                            self.log.debug('Changed detected for DNSRecord {}/{}/{}'.format(
                                self.account,
                                zone.name,
                                data['name']
                            ))
                            record.save()
                    else:
                        record = DNSRecord.create(
                            data['id'],
                            account_id=self.account.account_id,
                            properties={k: v for k, v in data.items() if k != 'id'},
                            tags={}
                        )
                        self.log.debug('Added new DNSRecord {}/{}/{}'.format(
                            self.account,
                            zone.name,
                            data['name']
                        ))
                        zone.add_record(record)
                db.session.commit()

                rk = set(x['id'] for x in records)
                erk = set(existing_records.keys())

                for resource_id in erk - rk:
                    record = existing_records[resource_id]
                    zone.delete_record(record)
                    self.log.debug('Deleted Route53 record {}/{}/{}'.format(
                        self.account.account_name,
                        zone_id,
                        record.name
                    ))
                db.session.commit()
        except:
            raise
1027561
def should_not_sample_route(request):
    
    blacklisted_routes = request.registry.settings.get(
        'zipkin.blacklisted_routes', [])

    if not blacklisted_routes:
        return False
    route_mapper = request.registry.queryUtility(IRoutesMapper)
    route_info = route_mapper(request).get('route')
    return (route_info and route_info.name in blacklisted_routes)
524459
def get_net_start(ipaddr, netmask):
    '''
    
    '''
    net = ipaddress.ip_network('{0}/{1}'.format(ipaddr, netmask), strict=False)
    return six.text_type(net.network_address)
664191
private Node getNonProxyNode(IndexHits<Node> nodesFound)
    {
        Node node = null;
        if (nodesFound.hasNext())
        {
            node = nodesFound.next();
        }
        else
        {
            return null;
        }

        try
        {
            Object proxyNodeProperty = node.getProperty(PROXY_NODE_TYPE_KEY);
        }
        catch (NotFoundException e)
        {
            return node;
        }
        catch (IllegalStateException e)
        {
            return node;
        }
        return getNonProxyNode(nodesFound);
    }
725715
def get_logout_url(service):
    """"""
    for backend in _get_backends():
        try:
            return backend.get_logout_url(service)
        except AttributeError:
            raise NotImplementedError("%s.%s.get_logout_url() not implemented" % (
                backend.__class__.__module__, backend.__class__.__name__)
            )
    return None
401724
def _routerForAccount(self, identifier):
        
        acct = self.loginSystem.accountByAddress(identifier.localpart,
                                                 identifier.domain)
        return IMessageRouter(acct, None)
179188
def get_client(site=None):
    """"""
    if 'CITRINATION_API_KEY' not in environ:
        raise ValueError("'CITRINATION_API_KEY' is not set as an environment variable")
    if not site:
        site = environ.get("CITRINATION_SITE", "https://citrination.com")
    return CitrinationClient(environ['CITRINATION_API_KEY'], site)
697820
def get_user_client(self, user, password, populate=True):
        
        return XCLIClientForUser(weakproxy(self), user, password,
                                 populate=populate)