List of account values for the given account,
        or of all accounts if account is left blank.

        Args:
            account: If specified, filter for this account name.
509221
def accountValues(self, account: str = '') -> List[AccountValue]:
        
        if account:
            return [v for v in self.wrapper.accountValues.values()
                    if v.account == account]
        else:
            return list(self.wrapper.accountValues.values())
538589
def positions(self, account: str = '') -> List[Position]:
        
        if account:
            return list(self.wrapper.positions[account].values())
        else:
            return [v for d in self.wrapper.positions.values()
                    for v in d.values()]
493450
public List<String> getAllAccounts(boolean bank) {
        return Common.getInstance().getStorageHandler().getStorageEngine().getAllAccounts(bank);
    }
442282
def get_entries(self, acc: Account, cls=AccountEntry) -> QuerySet:
        
        return cls.objects.filter(Q(account=acc) & (Q(source_invoice=self) | Q(settled_invoice=self))) if acc else cls.objects.none()
1097945
def list(ctx):
    """"""
    if ctx.namespace != 'accounts':
        click.echo(
            click.style('Only account data is available for listing.', fg='red')
        )
        return

    swag = create_swag_from_ctx(ctx)
    accounts = swag.get_all()
    _table = [[result['name'], result.get('id')] for result in accounts]
    click.echo(
        tabulate(_table, headers=["Account Name", "Account Number"])
    )
102505
def _find_account(app, user, account_name):
    
    if not account_name:
        raise ConsoleError("Empty account name given")

    accounts = api.search_accounts(app, user, account_name)

    if account_name[0] == "@":
        account_name = account_name[1:]

    for account in accounts:
        if account['acct'] == account_name:
            return account

    raise ConsoleError("Account not found")
1319410
def blacklist(ctx, blacklist_account, account):
    
    account = Account(account, blockchain_instance=ctx.blockchain)
    print_tx(account.blacklist(blacklist_account))
279007
def get_account_details(self):
        
        headers = self._manager.get_account_headers()
        acct_prefix = "x-account-"
        meta_prefix = ACCOUNT_META_PREFIX.lower()
        ret = {}
        for hkey, hval in list(headers.items()):
            lowkey = hkey.lower()
            if lowkey.startswith(acct_prefix):
                if not lowkey.startswith(meta_prefix):
                    cleaned = hkey.replace(acct_prefix, "").replace("-", "_")
                    try:
                        # Most values are ints
                        ret[cleaned] = int(hval)
                    except ValueError:
                        ret[cleaned] = hval
        return ret
285927
def __get_holding_accounts_query(self):
        
        query = (
            self.book.session.query(Account)
            .filter(Account.commodity == self.security)
            .filter(Account.type != AccountType.trading.value)
        )
        # generic.print_sql(query)
        return query
868563
public void setAccounts(java.util.Collection<String> accounts) {
        if (accounts == null) {
            this.accounts = null;
            return;
        }

        this.accounts = new java.util.ArrayList<String>(accounts);
    }
1164888
def list_locks(self, account_id=None):
        
        account_id = self.get_account_id(account_id)
        return self.http.get(
            "%s/%s/locks" % (self.endpoint, account_id),
            auth=self.get_api_auth())
82091
public void setAccounts(java.util.Collection<Account> accounts) {
        if (accounts == null) {
            this.accounts = null;
            return;
        }

        this.accounts = new java.util.ArrayList<Account>(accounts);
    }
717913
def all_accounts
      all = []
      single_proxy("LIST_ACCOUNTS", {}, nil, true).each do |account|
        all << account
        sub_accounts = single_proxy("GET_SUB_ACCOUNTS_OF_ACCOUNT",
                             {
                                account_id: account["id"],
                                recursive: true,
                             },
                             nil,
                             true)
        all = all.concat(sub_accounts)
      end
      all
    end
747708
def accounts(self):
        
        response = self.graph.get('%s/accounts' % self.id)

        accounts = []
        for item in response['data']:
            account = Structure(
                page = Page(
                    id = item['id'],
                    name = item['name'],
                    category = item['category']
                ),
                access_token = item['access_token'],
                permissions = item['perms']
            )

            accounts.append(account)

        return accounts
1310666
def get_account_details(self, account):
        
        result = {}
        try:
            luser = self._get_account(account.username)
            luser = preload(luser, database=self._database)
        except ObjectDoesNotExist:
            return result

        for i, j in luser.items():
            if i != 'userPassword' and j is not None:
                result[i] = j

        return result
951442
function parseAccountList(resp) {
  return new Promise((resolve, reject) => {
    const $ = cheerio.load(resp.body);
    const accountRows = $('.main_group_account_row');

    if (!accountRows || accountRows.length === 0) {
      return reject(new Error('Cannot find account list.'));
    }

    const accounts = [];
    accountRows.each((index, elem) => {
      try {
        const $$ = cheerio.load(elem);
        const account = {
          name: $$('.NicknameField .left a')
            .text()
            .trim(),
          link: $$('.NicknameField .left a').attr('href'),
          bsb: $$('.BSBField .text')
            .text()
            .replace(/\s+/g, '')
            .trim(),
          account: $$('.AccountNumberField .text')
            .text()
            .replace(/\s+/g, '')
            .trim(),
          balance: parseCurrencyHtml($$('.AccountBalanceField')),
          available: parseCurrencyHtml($$('.AvailableFundsField')),
        };
        //  Assemble the `bsb` and `account` to construct `number`
        account.number = `${account.bsb}${account.account}`;
        account.type = `${/ACCOUNT_PRODUCT_TYPE=(\w+)/.exec(account.link)[1]}`;
        //  push to the final account list if it's valid
        if (account.name && account.link && account.account) {
          accounts.push(account);
        }
      } catch (err) {
        debug(`parseAccountList(): ${err}`);
        debug(`parseAccountList(): elem => ${util.inspect(elem)}`);
      }
    });

    debug(`parseAccountList(): found ${accounts.length} accounts`);
    return resolve(Object.assign({}, resp, { accounts }));
  });
}
616471
def accounts():
    
    import yaml

    for path in account_files:
        try:

            c_dir = os.path.dirname(path)

            if not os.path.exists(c_dir):
                os.makedirs(c_dir)

            with open(path, 'rb') as f:
                return yaml.load(f)['accounts']

        except (OSError, IOError) as e:
            pass

    return {}