Fetches all available unspent transaction outputs.

        :rtype: ``list`` of :class:`~bit.network.meta.Unspent`
179089
def get_unspents(self):
        
        self.unspents[:] = list(map(
            lambda u: u.set_type('p2pkh' if self.is_compressed() else
                                 'p2pkh-uncompressed'),
            NetworkAPI.get_unspent(self.address)
        ))
        if self.segwit_address:
            self.unspents += list(map(
                lambda u: u.set_type('np2wkh'),
                NetworkAPI.get_unspent(self.segwit_address)
            ))
        self.balance = sum(unspent.amount for unspent in self.unspents)
        return self.unspents
203067
List<Transaction> getAllTxns() throws IOException {
    Log log = this.persistence.getLog();
    List<Transaction> txns = new ArrayList<Transaction>();
    try(Log.LogIterator iter = log.getIterator(new Zxid(0, 0))) {
      while(iter.hasNext()) {
        txns.add(iter.next());
      }
      return txns;
    }
  }
134853
def to_dict(self):
        
        if self.txid is None and self.output is None:
            return None
        else:
            return {
                'transaction_id': self.txid,
                'output_index': self.output,
            }
517655
def list_migrations(self):
        
        connection = connections[self._database_name]
        loader = MigrationLoader(connection, ignore_no_migrations=True)
        unapplied = self._get_unapplied_migrations(loader)
        currents = self._get_current_migration_state(loader, [u[0] for u in unapplied])
        return unapplied, currents
1205795
def getAllFtpConnections(self):
        
        outputMsg = "Current ftp connections:\n"
        counter = 1
        for k in self.ftpList:
            outputMsg += str(counter) + ". " + k + " "
            outputMsg += str(self.ftpList[k]) + "\n"
            counter += 1
        if self.printOutput:
            logger.info(outputMsg)
        return self.ftpList
1010882
def parse_networks_output(out):
    
    if not out:
        return []
    line_iter = islice(out.splitlines(), 1, None)  # Skip header
    return list(map(_network_info, line_iter))
1071523
def _get_all_unmapped_reads(self, fout):
        ''''''
        sam_reader = pysam.Samfile(self.bam, "rb")
        for read in sam_reader.fetch(until_eof=True):
            if read.is_unmapped:
                print(mapping.aligned_read_to_read(read, ignore_quality=not self.fastq_out), file=fout)
869452
def GetTransactionResults(self):
        
        if self.References is None:
            return None

        results = []
        realresults = []
        for ref_output in self.References.values():
            results.append(TransactionResult(ref_output.AssetId, ref_output.Value))

        for output in self.outputs:
            results.append(TransactionResult(output.AssetId, output.Value * Fixed8(-1)))

        for key, group in groupby(results, lambda x: x.AssetId):
            sum = Fixed8(0)
            for item in group:
                sum = sum + item.Amount

            if sum != Fixed8.Zero():
                realresults.append(TransactionResult(key, sum))

        return realresults
1162879
def find_unallocated_holdings(self):
        
        # Get linked securities
        session = self.open_session()
        linked_entities = session.query(AssetClassStock).all()
        linked = []
        # linked = map(lambda x: f"{x.symbol}", linked_entities)
        for item in linked_entities:
            linked.append(item.symbol)

        # Get all securities with balance > 0.
        from .stocks import StocksInfo

        stocks = StocksInfo()
        stocks.logger = self.logger
        holdings = stocks.get_symbols_with_positive_balances()

        # Find those which are not included in the stock links.
        non_alloc = []
        index = -1
        for item in holdings:
            try:
                index = linked.index(item)
                self.logger.debug(index)
            except ValueError:
                non_alloc.append(item)

        return non_alloc
1343410
def get_without_invoice(self):
        
        qs = Transaction.objects.filter(
            children__isnull=True, invoice__isnull=True)
        return qs
311039
def get_unaligned_lines(self):
    """"""
    sys.stderr.write("error unimplemented get_unaligned_lines\n")
    sys.exit()
    return [self._lines[x-1] for x in self._unaligned]
687314
def untracked_files(self) -> typing.List[str]:
        
        untracked_files = list(self.repo.untracked_files)
        LOGGER.debug('untracked files: %s', untracked_files)
        return untracked_files
106891
def _get_block_transactions(
            self,
            transaction_root: Hash32,
            transaction_class: Type['BaseTransaction']) -> Iterable['BaseTransaction']:
        
        for encoded_transaction in self._get_block_transaction_data(self.db, transaction_root):
            yield rlp.decode(encoded_transaction, sedes=transaction_class)
920664
def get_outputs_by_public_key(self, public_key):
        """"""
        txs = list(query.get_owned_ids(self.connection, public_key))
        return [TransactionLink(tx['id'], index)
                for tx in txs
                for index, output in enumerate(tx['outputs'])
                if condition_details_has_owner(output['condition']['details'],
                                               public_key)]
469261
def fetch_deposits(self, limit: int) -> List[Deposit]:
        """"""
        return self._transactions(self._deposits, 'deposits', limit)
406197
def _get_outputs(self):
        
        out_size = mx_uint()
        handles = ctypes.POINTER(NDArrayHandle)()
        check_call(_LIB.MXExecutorOutputs(self.handle,
                                          ctypes.byref(out_size), ctypes.byref(handles)))
        num_output = out_size.value
        outputs = [_ndarray_cls(NDArrayHandle(handles[i])) for i in range(num_output)]
        return outputs
90656
def get_unspents(self):
        
        self.unspents[:] = NetworkAPI.get_unspent(self.address)
        self.balance = sum(unspent.amount for unspent in self.unspents)
        return self.unspents