Create a local client.
505686
async def load_remote(
            self, email: str, password: str,
            skip_existing: bool = True) -> None:
        """"""
        auth_resp = await self._request(
            'post',
            'https://my.rainmachine.com/login/auth',
            json={'user': {
                'email': email,
                'pwd': password,
                'remember': 1
            }})

        access_token = auth_resp['access_token']

        sprinklers_resp = await self._request(
            'post',
            'https://my.rainmachine.com/devices/get-sprinklers',
            access_token=access_token,
            json={'user': {
                'email': email,
                'pwd': password,
                'remember': 1
            }})

        for sprinkler in sprinklers_resp['sprinklers']:
            if skip_existing and sprinkler['mac'] in self.controllers:
                continue

            controller = RemoteController(self._request, self._websession)
            await controller.login(
                access_token, sprinkler['sprinklerId'], password)

            version_data = await controller.api.versions()
            controller.api_version = version_data['apiVer']
            controller.hardware_version = version_data['hwVer']
            controller.mac = sprinkler['mac']
            controller.name = sprinkler['name']
            controller.software_version = version_data['swVer']

            self.controllers[sprinkler['mac']] = controller
1180796
def create(self):
        """"""
        self.server_attrs = self.consul.create_server(
                "%s-%s" % (self.stack.name, self.name),
                self.disk_image_id,
                self.instance_type,
                self.ssh_key_name,
                tags=self.tags,
                availability_zone=self.availability_zone,
                timeout_s=self.launch_timeout_s,
                security_groups=self.security_groups,
                **self.provider_extras
                )
        log.debug('Post launch delay: %d s' % self.post_launch_delay_s)
        time.sleep(self.post_launch_delay_s)
1253259
def connect_to_images(region=None, public=True):
    """"""
    return _create_client(ep_name="image", region=region, public=public)
347647
function createAdminClient(conf) {
  var client = new AdminClient(conf);

  // Wrap the error so we throw if it failed with some context
  LibrdKafkaError.wrap(client.connect(), true);

  // Return the client if we succeeded
  return client;
}
884353
def connect(self):
        """"""
        self._client = self._create_client()
        self._db = getattr(self._client, self._db_name)
        self._generic_dao = GenericDAO(self._client, self._db_name)
986301
def new(localfile, jottapath, JFS):
    """"""
    with open(localfile) as lf:
        _new = JFS.up(jottapath, lf)
    return _new
611515
def create(self, **kwargs):
        """"""
        resp = self.client.create(url=self.base_url,
                                  json=kwargs)
        return resp
522240
def execute_with_client(quiet=False,
                        bootstrap_server=False,
                        create_client=True):
    """"""
    def wrapper(f):

        def wrapper2(self, *args, **kwargs):
            client = self.current_client(
                quiet=quiet,
                bootstrap_server=bootstrap_server,
                create_client=create_client)
            if client and client.running:
                return f(self, client, *args, **kwargs)
        return wrapper2

    return wrapper
1172739
def create(cls, ip_version, datacenter, bandwidth, vm=None, vlan=None,
               ip=None, background=False):
        
        return Iface.create(ip_version, datacenter, bandwidth, vlan, vm, ip,
                            background)
956881
function createClient(url, opts) {
  // Attempt to get Url from this instance.
  url = url || this.url || (this.opts || {}).url || (opts || {}).url;
  if (! url) {
    throw 'No url specified for ActiveDirectory client.';
  }
  log.trace('createClient(%s)', url);

  var opts = getLdapClientOpts(_.defaults({}, { url: url }, opts, this.opts));
  log.debug('Creating ldapjs client for %s. Opts: %j', opts.url, _.omit(opts, 'url', 'bindDN', 'bindCredentials'));
  var client = ldap.createClient(opts);
  return(client);
}
182157
def instantiate_client(_unused_client, _unused_to_delete):
    """"""

    # [START client_create_default]
    from google.cloud import logging

    client = logging.Client()
    # [END client_create_default]

    credentials = object()
    # [START client_create_explicit]
    from google.cloud import logging

    client = logging.Client(project="my-project", credentials=credentials)
735327
def open(self):
        """"""
        self._id = str(uuid.uuid4())
        self._client.open_connection(self._id, info=self._connection_args)
603523
def create(self):
        """"""
        required_nodes = self._get_required_nodes()
        self.lb_attrs = self.consul.create_lb(
                self.instance_name,
                protocol=self.protocol,
                port=self.port,
                nodes=required_nodes,
                node_port=str(self.backend_port),
                algorithm=getattr(self, 'algorithm', None)
                )
958532
def create_new_client(self, give_focus=True, filename='', is_cython=False,
                          is_pylab=False, is_sympy=False, given_name=None):
        """"""
        self.master_clients += 1
        client_id = dict(int_id=to_text_string(self.master_clients),
                         str_id='A')
        cf = self._new_connection_file()
        show_elapsed_time = self.get_option('show_elapsed_time')
        reset_warning = self.get_option('show_reset_namespace_warning')
        ask_before_restart = self.get_option('ask_before_restart')
        client = ClientWidget(self, id_=client_id,
                              history_filename=get_conf_path('history.py'),
                              config_options=self.config_options(),
                              additional_options=self.additional_options(
                                      is_pylab=is_pylab,
                                      is_sympy=is_sympy),
                              interpreter_versions=self.interpreter_versions(),
                              connection_file=cf,
                              menu_actions=self.menu_actions,
                              options_button=self.options_button,
                              show_elapsed_time=show_elapsed_time,
                              reset_warning=reset_warning,
                              given_name=given_name,
                              ask_before_restart=ask_before_restart,
                              css_path=self.css_path)

        # Change stderr_dir if requested
        if self.test_dir is not None:
            client.stderr_dir = self.test_dir

        self.add_tab(client, name=client.get_name(), filename=filename)

        if cf is None:
            error_msg = self.permission_error_msg.format(jupyter_runtime_dir())
            client.show_kernel_error(error_msg)
            return

        # Check if ipykernel is present in the external interpreter.
        # Else we won't be able to create a client
        if not CONF.get('main_interpreter', 'default'):
            pyexec = CONF.get('main_interpreter', 'executable')
            has_spyder_kernels = programs.is_module_installed(
                                                        'spyder_kernels',
                                                        interpreter=pyexec,
                                                        version='>=1.0.0')
            if not has_spyder_kernels:
                client.show_kernel_error(
                        _("Your Python environment or installation doesn't "
                          "have the <tt>spyder-kernels</tt> module or the "
                          "right version of it installed. "
                          "Without this module is not possible for "
                          "Spyder to create a console for you.<br><br>"
                          "You can install it by running in a system terminal:"
                          "<br><br>"
                          "<tt>conda install spyder-kernels</tt>"
                          "<br><br>or<br><br>"
                          "<tt>pip install spyder-kernels</tt>"))
                return

        self.connect_client_to_kernel(client, is_cython=is_cython,
                                      is_pylab=is_pylab, is_sympy=is_sympy)
        if client.shellwidget.kernel_manager is None:
            return
        self.register_client(client)
960587
def client(self, *args, **kwargs):
        

        return self._makeApiCall(self.funcinfo["client"], *args, **kwargs)
400054
def copy_from_local(self, localsrc, dest, **kwargs):
        
        with io.open(localsrc, 'rb') as f:
            self.create(dest, f, **kwargs)
278875
public static LocalFsClient create(Eventloop eventloop, Path storageDir, Object lock) {
		return new LocalFsClient(eventloop, storageDir, Executors.newSingleThreadExecutor(), lock);
	}