Get the sequence number for a given account via Horizon.

        :return: The current sequence number for a given account
        :rtype: int
189582
def get_sequence(self):
        
        if not self.address:
            raise StellarAddressInvalidError('No address provided.')

        address = self.horizon.account(self.address)
        return int(address.get('sequence'))
1336807
def bank_account_query(self, number, date, account_type, bank_id):
        """"""
        return self.authenticated_query(
            self._bareq(number, date, account_type, bank_id)
        )
240746
@Override
    public int getBanksCount() {
	int penalty = Timing.getInstance().LOCAL_READ;
	log.trace("[getBanksCount] Waiting {} cycles", penalty);
	turnsControl.waitTurns(penalty, "Get Bank count");
	return this.robot.getBanksCount();
    }
1009256
def rpc_get_account_record(self, address, token_type, **con_info):
        
        if not check_account_address(address):
            return {'error': 'Invalid address', 'http_status': 400}

        if not check_token_type(token_type):
            return {'error': 'Invalid token type', 'http_status': 400}

        # must be b58
        if is_c32_address(address):
            address = c32ToB58(address)

        db = get_db_state(self.working_dir)
        account = db.get_account(address, token_type)
        db.close()

        if account is None:
            return {'error': 'No such account', 'http_status': 404}

        state = self.export_account_state(account)
        return self.success_response({'account': state})
627363
def account_balance_before(self):
        """"""
        # TODO: Consider moving to annotation, particularly once we can count on Django 1.11's subquery support
        transaction_date = self.transaction.date
        return self.account.balance(
            leg_query=(
                models.Q(transaction__date__lt=transaction_date)
                | (
                    models.Q(transaction__date=transaction_date)
                    & models.Q(transaction_id__lt=self.transaction_id)
                )
            )
        )
1286885
def generate_simpleaccount(self):
        
        if len(self.portfolio_list.keys()) < 1:
            po = self.new_portfolio()
        else:
            po = list(self.portfolio_list.values())[0]
        ac = po.new_account()
        return ac, po
632370
def next(self):
        
        if self.current_token == len(self.tokens):
            return None
        token = self.tokens[self.current_token]
        if token["type"] == "newline":
            self.line += 1
            self.line_start = token["start"]
        self.current_token += 1
        if token["type"] == "unknown":
            self.error("Unknown token")
        return token
1324686
def get_amount_arrears_balance(self, billing_cycle):
        """"""
        return self.to_account.balance(
            transaction__date__lt=billing_cycle.date_range.lower,
        )
532737
def bank_account_number(self):
        """"""
        start = get_iban_spec(self.country_code).bban_split_pos + 4
        return self._id[start:]
1162619
def namedb_get_account_diff(current, prior):
    
    if current['address'] != prior['address'] or current['type'] != prior['type']:
        raise ValueError("Accounts for two different addresses and/or token types")

    # NOTE: only possible since Python doesn't overflow :P
    return namedb_get_account_balance(current) - namedb_get_account_balance(prior)
518819
def account_number
      return @account_number if @account_number

      begin
        my_arn = AWS::IAM.new(
          access_key_id: @access_key_id,
          secret_access_key: @secret_access_key
        ).client.get_user[:user][:arn]
      rescue AWS::IAM::Errors::AccessDenied => e
        my_arn = e.message.split[1]
      end

      @account_number = my_arn.split(':')[4]
    end
362237
def seq():
    
    current_frame     = inspect.currentframe().f_back
    trace_string      = ""
    while current_frame.f_back:
      trace_string = trace_string + current_frame.f_back.f_code.co_name
      current_frame = current_frame.f_back
    return counter.get_from_trace(trace_string)
948853
def get_sequence(cls, entry):
        
        seq_tag = entry.find("./sequence")
        seq = seq_tag.text
        seq_tag.clear()
        return models.Sequence(sequence=seq)
1011829
def accounts(self):
        
        if self._accounts is None:
            from twilio.rest.accounts import Accounts
            self._accounts = Accounts(self)
        return self._accounts
880335
def get_transaction_by_index(
            self,
            block_number: BlockNumber,
            transaction_index: int,
            transaction_class: Type['BaseTransaction']) -> 'BaseTransaction':
        
        try:
            block_header = self.get_canonical_block_header_by_number(block_number)
        except HeaderNotFound:
            raise TransactionNotFound("Block {} is not in the canonical chain".format(block_number))
        transaction_db = HexaryTrie(self.db, root_hash=block_header.transaction_root)
        encoded_index = rlp.encode(transaction_index)
        if encoded_index in transaction_db:
            encoded_transaction = transaction_db[encoded_index]
            return rlp.decode(encoded_transaction, sedes=transaction_class)
        else:
            raise TransactionNotFound(
                "No transaction is at index {} of block {}".format(transaction_index, block_number))
4464
def next(self):
        

        try:
            self._fetch()
            pkt = self.pkt_queue.popleft()
            try:
                self._infer_acked(pkt)
            except:
                pass
            try:
                self._infer_retry(pkt)
            except:
                pass

            return pkt
        except IndexError:
            raise StopIteration()
335579
def for_account_hash(parent, account_hash):
        
        account = AccountProxy(parent)
        account.account_hash = account_hash
        if account.acquire():
            return account
        return None