Set the proxy account for an account
352084
def setproxy(ctx, proxy_account, account):
    
    print_tx(ctx.bitshares.set_proxy(proxy_account, account=account))
621852
def set_proxy(self, proxy):
        

        if isinstance(proxy, str if py3k else basestring):
            self.__proxy = proxy
        else:
            raise TwitterSearchException(1009)
748253
public static void applyProxy(Proxy use) {
    System.setProperty("java.net.useSystemProxies", "false");
    System.setProperty("http.proxyHost", use.getIp());
    System.setProperty("http.proxyPort", String.valueOf(use.getPort()));
    System.setProperty("https.proxyHost", use.getIp());
    System.setProperty("https.proxyPort", String.valueOf(use.getPort()));
  }
839156
def proxy_set(self, value):
        
        setter = getattr(self, self.proxy_setter)
        if isinstance(value, (list, tuple, set)):
            result = setter(*value)
        elif isinstance(value, dict):
            result = setter(**value)
        else:
            result = setter(value)
        return result
735397
function HttpsProxyingAgent(options) {
  options.tunnel = true;
  ProxyingAgent.call(this, options, https.Agent);
}
802560
public void setProxy(String proxyhost, int proxyport) {
		proxy = new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(proxyhost, proxyport));
	}
150515
def update(self, password=values.unset):
        
        return self._proxy.update(password=password, )
153171
def set_proxy (self, proxy):
        
        self.proxy = proxy
        self.proxytype = "http"
        self.proxyauth = None
        if not self.proxy:
            return
        proxyurl = urlparse.urlparse(self.proxy)
        self.proxytype = proxyurl.scheme
        if self.proxytype not in ('http', 'https'):
            # Note that invalid proxies might raise TypeError in urllib2,
            # so make sure to stop checking at this point, not later.
            msg = _("Proxy value `%(proxy)s' must start with 'http:' or 'https:'.") \
                 % dict(proxy=proxy)
            raise LinkCheckerError(msg)
        if self.ignore_proxy_host():
            # log proxy without auth info
            log.debug(LOG_CHECK, "ignoring proxy %r", self.proxy)
            self.add_info(_("Ignoring proxy setting `%(proxy)s'.") %
                dict(proxy=proxy))
            self.proxy = None
            return
        log.debug(LOG_CHECK, "using proxy %r", self.proxy)
        self.add_info(_("Using proxy `%(proxy)s'.") % dict(proxy=self.proxy))
        self.proxyhost = proxyurl.hostname
        self.proxyport = proxyurl.port
        if proxyurl.username is not None:
            username = proxyurl.username
            password = proxyurl.password if proxy.password is not None else ""
            auth = "%s:%s" % (username, password)
            self.proxyauth = "Basic "+httputil.encode_base64(auth)
1258508
def prepare(self):
        '''
        
        '''
        super(ProxyMinion, self).prepare()

        if not self.values.proxyid:
            self.error('salt-proxy requires --proxyid')

        # Proxies get their ID from the command line.  This may need to change in
        # the future.
        # We used to set this here.  Now it is set in ProxyMinionOptionParser
        # by passing it via setup_config to config.minion_config
        # self.config['id'] = self.values.proxyid

        try:
            if self.config['verify_env']:
                confd = self.config.get('default_include')
                if confd:
                    # If 'default_include' is specified in config, then use it
                    if '*' in confd:
                        # Value is of the form "minion.d/*.conf"
                        confd = os.path.dirname(confd)
                    if not os.path.isabs(confd):
                        # If configured 'default_include' is not an absolute
                        # path, consider it relative to folder of 'conf_file'
                        # (/etc/salt by default)
                        confd = os.path.join(
                            os.path.dirname(self.config['conf_file']), confd
                        )
                else:
                    confd = os.path.join(
                        os.path.dirname(self.config['conf_file']), 'proxy.d'
                    )

                v_dirs = [
                    self.config['pki_dir'],
                    self.config['cachedir'],
                    self.config['sock_dir'],
                    self.config['extension_modules'],
                    confd,
                ]

                verify_env(
                    v_dirs,
                    self.config['user'],
                    permissive=self.config['permissive_pki_access'],
                    root_dir=self.config['root_dir'],
                    pki_dir=self.config['pki_dir'],
                )
        except OSError as error:
            self.environment_failure(error)

        self.setup_logfile_logger()
        verify_log(self.config)
        self.action_log_info('Setting up "{0}"'.format(self.config['id']))

        migrations.migrate_paths(self.config)

        # Bail out if we find a process running and it matches out pidfile
        if self.check_running():
            self.action_log_info('An instance is already running. Exiting')
            self.shutdown(1)

        # TODO: AIO core is separate from transport
        # Late import so logging works correctly
        import salt.minion
        # If the minion key has not been accepted, then Salt enters a loop
        # waiting for it, if we daemonize later then the minion could halt
        # the boot process waiting for a key to be accepted on the master.
        # This is the latest safe place to daemonize
        self.daemonize_if_required()
        self.set_pidfile()
        if self.config.get('master_type') == 'func':
            salt.minion.eval_master_func(self.config)
        self.minion = salt.minion.ProxyMinionManager(self.config)
351632
function set(Account, roles) {

    var Role = app.models.Role;
    for (var name in roles) {
      var role = roles[name];
      var model = app.models[role.model];
      model.belongsTo(Account, {
        foreignKey: 'accountId',
        as: 'account'
      });

      model.validatesUniquenessOf('accountId');

      Account.hasOne(model, {
        foreignKey: 'accountId',
        as: name
      });

      Role.registerResolver(name, function(roleName, context, cb) {

        Promise.resolve()
          .then(function() {

            var result = context.accessToken && context.accessToken.roles && context.accessToken.roles[roleName];
            return result?true:false;

          })
          .asCallback(cb);

      });

    }

  }
939535
def set_primary(self, **params):
        """"""
        data = self.api_client.set_primary_account(self.id, **params)
        self.update(data)
        return data
361473
def use(proxy, options = {}, &block)
      proxy = Moneta.const_get(proxy) if Symbol === proxy
      raise ArgumentError, 'You must give a Class or a Symbol' unless Class === proxy
      @proxies.unshift [proxy, options, block]
      nil
    end
713478
def set_local_proxy(value)
			if value
				uri = URI.parse(value)
				@proxy = Proxy.new(uri.host, uri.port, uri.user, uri.password)
			else
				@proxy = Proxy.new()
			end
		end
480019
def put(self, name=None, user_ids=None):
        
        return self.connection.put('account', data=dict(name=name, user_ids=user_ids))
623867
def account_setup(remote, token=None, response=None,
                  account_setup=None):
    """"""
    gh = GitHubAPI(user_id=token.remote_account.user_id)
    with db.session.begin_nested():
        gh.init_account()

        # Create user <-> external id link.
        oauth_link_external_id(
            token.remote_account.user,
            dict(id=str(gh.account.extra_data['id']), method="github")
        )
340199
def configure_proxy(self, curl_object):
        """"""
        curl_object.setopt(curl_object.PROXY, self._proxy_hostname)
        curl_object.setopt(curl_object.PROXYPORT, self._proxy_port)
        curl_object.setopt(curl_object.PROXYTYPE, curl_object.PROXYTYPE_SOCKS5)
        if self._proxy_user and self._proxy_passwd:
            curl_object.setopt(curl_object.PROXYUSERPWD, '%s:%s' % (self._proxy_user, self._proxy_port))
1326588
public void setProxypassword(String proxypassword) throws ApplicationException {
	try {
	    smtp.getProxyData().setPassword(proxypassword);
	}
	catch (Exception e) {
	    throw new ApplicationException("attribute [proxypassword] of the tag [mail] is invalid", e.getMessage());
	}
    }