Method to create the blank transaction nodes as a dict. If bic is True,
        the BIC node will also be created.
797
def _create_TX_node(self, bic=True):
        
        ED = dict()
        ED['DrctDbtTxInfNode'] = ET.Element("DrctDbtTxInf")
        ED['PmtIdNode'] = ET.Element("PmtId")
        ED['EndToEndIdNode'] = ET.Element("EndToEndId")
        ED['InstdAmtNode'] = ET.Element("InstdAmt")
        ED['DrctDbtTxNode'] = ET.Element("DrctDbtTx")
        ED['MndtRltdInfNode'] = ET.Element("MndtRltdInf")
        ED['MndtIdNode'] = ET.Element("MndtId")
        ED['DtOfSgntrNode'] = ET.Element("DtOfSgntr")
        ED['DbtrAgtNode'] = ET.Element("DbtrAgt")
        ED['FinInstnId_DbtrAgt_Node'] = ET.Element("FinInstnId")
        if bic:
            ED['BIC_DbtrAgt_Node'] = ET.Element("BIC")
        ED['DbtrNode'] = ET.Element("Dbtr")
        ED['Nm_Dbtr_Node'] = ET.Element("Nm")
        ED['DbtrAcctNode'] = ET.Element("DbtrAcct")
        ED['Id_DbtrAcct_Node'] = ET.Element("Id")
        ED['IBAN_DbtrAcct_Node'] = ET.Element("IBAN")
        ED['RmtInfNode'] = ET.Element("RmtInf")
        ED['UstrdNode'] = ET.Element("Ustrd")
        return ED
337195
private void initialiseMetaConcepts(TransactionOLTP tx) {
        VertexElement type = tx.addTypeVertex(Schema.MetaSchema.THING.getId(), Schema.MetaSchema.THING.getLabel(), Schema.BaseType.TYPE);
        VertexElement entityType = tx.addTypeVertex(Schema.MetaSchema.ENTITY.getId(), Schema.MetaSchema.ENTITY.getLabel(), Schema.BaseType.ENTITY_TYPE);
        VertexElement relationType = tx.addTypeVertex(Schema.MetaSchema.RELATION.getId(), Schema.MetaSchema.RELATION.getLabel(), Schema.BaseType.RELATION_TYPE);
        VertexElement resourceType = tx.addTypeVertex(Schema.MetaSchema.ATTRIBUTE.getId(), Schema.MetaSchema.ATTRIBUTE.getLabel(), Schema.BaseType.ATTRIBUTE_TYPE);
        tx.addTypeVertex(Schema.MetaSchema.ROLE.getId(), Schema.MetaSchema.ROLE.getLabel(), Schema.BaseType.ROLE);
        tx.addTypeVertex(Schema.MetaSchema.RULE.getId(), Schema.MetaSchema.RULE.getLabel(), Schema.BaseType.RULE);

        relationType.property(Schema.VertexProperty.IS_ABSTRACT, true);
        resourceType.property(Schema.VertexProperty.IS_ABSTRACT, true);
        entityType.property(Schema.VertexProperty.IS_ABSTRACT, true);

        relationType.addEdge(type, Schema.EdgeLabel.SUB);
        resourceType.addEdge(type, Schema.EdgeLabel.SUB);
        entityType.addEdge(type, Schema.EdgeLabel.SUB);
    }
925411
async def main():
    
    # Create Client from endpoint string in Duniter format
    client = Client(BMAS_ENDPOINT)
    tasks = []

    # Get the node summary infos by dedicated method (with json schema validation)
    print("\nCall bma.node.summary:")
    task = asyncio.ensure_future(client(bma.node.summary))
    tasks.append(task)

    # Get the money parameters located in the first block
    print("\nCall bma.blockchain.parameters:")
    task = asyncio.ensure_future(client(bma.blockchain.parameters))
    tasks.append(task)

    responses = await asyncio.gather(*tasks)
    # you now have all response bodies in this variable
    print("\nResponses:")
    print(responses)

    # Close client aiohttp session
    await client.close()
1109721
def buildTransaction(self, transaction=None):
        

        if transaction is None:
            built_transaction = {}
        else:
            built_transaction = dict(**transaction)
            self.check_forbidden_keys_in_transaction(built_transaction,
                                                     ["data", "to"])

        if self.web3.eth.defaultAccount is not empty:
            built_transaction.setdefault('from', self.web3.eth.defaultAccount)

        built_transaction['data'] = self.data_in_transaction
        built_transaction['to'] = b''
        return fill_transaction_defaults(self.web3, built_transaction)
3022
def create_empty(cls, tstart, tstop, fill=0.0, nside=64):
        """"""
        cth_edges = np.linspace(0, 1.0, 41)
        domega = utils.edge_to_width(cth_edges) * 2.0 * np.pi
        hpx = HPX(nside, True, 'CEL', ebins=cth_edges)
        data = np.ones((len(cth_edges) - 1, hpx.npix)) * fill
        return cls(data, hpx, cth_edges, tstart=tstart, tstop=tstop)
558341
def create
      request = if receivers.empty?
                  Request.post('transactions', api_version, params)
                else
                  Request.post_xml('transactions/', nil, credentials, xml_params)
                end

      Response.new(request, self).serialize
    end
677822
def _create_ring(self, nodes):
        
        _weight_sum = 0
        for node_conf in self._nodes.values():
            _weight_sum += node_conf['weight']
        self._weight_sum = _weight_sum

        _distribution = Counter()
        _keys = []
        _ring = {}
        for node_name, node_conf in self._nodes.items():
            for h in self._hashi_weight_generator(node_name, node_conf):
                _ring[h] = node_name
                insort(_keys, h)
                _distribution[node_name] += 1
        self._distribution = _distribution
        self._keys = _keys
        self._ring = _ring
721176
def do(self):
        
        if not self._nodes:
            return
        # Let's retain original copy of _nodes
        node_copy = dict(self._nodes)

        self._do(node_copy)

        return self._factory.get_instantiated_services()
729806
def create_transaction(self, *args: Any, **kwargs: Any) -> BaseTransaction:
        
        return self.get_transaction_class()(*args, **kwargs)
160008
private Transaction createTransaction(long writePointer, TransactionType type) {
    // For holding the first in progress short transaction Id (with timeout >= 0).
    long firstShortTx = Transaction.NO_TX_IN_PROGRESS;
    LongArrayList inProgressIds = new LongArrayList(inProgress.size());
    for (Map.Entry<Long, InProgressTx> entry : inProgress.entrySet()) {
      long txId = entry.getKey();
      inProgressIds.add(txId);
      // add any checkpointed write pointers to the in-progress list
      LongArrayList childIds = entry.getValue().getCheckpointWritePointers();
      if (childIds != null) {
        for (int i = 0; i < childIds.size(); i++) {
          inProgressIds.add(childIds.get(i));
        }
      }
      if (firstShortTx == Transaction.NO_TX_IN_PROGRESS && !entry.getValue().isLongRunning()) {
        firstShortTx = txId;
      }
    }

    return new Transaction(readPointer, writePointer, invalidArray, inProgressIds.toLongArray(), firstShortTx, type);
  }
374374
def transaction
      transaction = database.create_transaction(transaction_code,
                                                write: write_collections,
                                                read:  read_collections)
      transaction.wait_for_sync = true

      transaction
    end
697195
private void createNewStore(NetworkParameters params) throws BlockStoreException {
        try {
            // Set up the genesis block. When we start out fresh, it is by
            // definition the top of the chain.
            StoredBlock storedGenesisHeader = new StoredBlock(params.getGenesisBlock().cloneAsHeader(), params.getGenesisBlock().getWork(), 0);
            // The coinbase in the genesis block is not spendable. This is because of how Bitcoin Core inits
            // its database - the genesis transaction isn't actually in the db so its spent flags can never be updated.
            List<Transaction> genesisTransactions = Lists.newLinkedList();
            StoredUndoableBlock storedGenesis = new StoredUndoableBlock(params.getGenesisBlock().getHash(), genesisTransactions);
            put(storedGenesisHeader, storedGenesis);
            setChainHead(storedGenesisHeader);
            setVerifiedChainHead(storedGenesisHeader);
        } catch (VerificationException e) {
            throw new RuntimeException(e); // Cannot happen.
        }
    }
504420
def _create_node(self, name, factory, directory=None, create=1):
        
        import SCons.Util
        node = factory(name, directory, create)
        node.set_noclean(self.noclean)
        node.set_precious(self.precious)
        if self.nodefault:
            self.env.Ignore('.', node)
        if self.alias:
            self.env.AlwaysBuild(self.env.Alias(self.alias, node))
        return node
479324
def create_transaction(self):
        """"""
        request = urlllib.request.urlopen(
            urllib.parse.urljoin(self.base_url, 'fcr:tx'))
        self.transaction = request.read()
97006
def _create_PmtInf_node(self):
        
        ED = dict()  # ED is element dict
        ED['PmtInfNode'] = ET.Element("PmtInf")
        ED['PmtInfIdNode'] = ET.Element("PmtInfId")
        ED['PmtMtdNode'] = ET.Element("PmtMtd")
        ED['BtchBookgNode'] = ET.Element("BtchBookg")
        ED['NbOfTxsNode'] = ET.Element("NbOfTxs")
        ED['CtrlSumNode'] = ET.Element("CtrlSum")
        ED['PmtTpInfNode'] = ET.Element("PmtTpInf")
        ED['SvcLvlNode'] = ET.Element("SvcLvl")
        ED['Cd_SvcLvl_Node'] = ET.Element("Cd")
        ED['LclInstrmNode'] = ET.Element("LclInstrm")
        ED['Cd_LclInstrm_Node'] = ET.Element("Cd")
        ED['SeqTpNode'] = ET.Element("SeqTp")
        ED['ReqdColltnDtNode'] = ET.Element("ReqdColltnDt")
        ED['CdtrNode'] = ET.Element("Cdtr")
        ED['Nm_Cdtr_Node'] = ET.Element("Nm")
        ED['CdtrAcctNode'] = ET.Element("CdtrAcct")
        ED['Id_CdtrAcct_Node'] = ET.Element("Id")
        ED['IBAN_CdtrAcct_Node'] = ET.Element("IBAN")
        ED['CdtrAgtNode'] = ET.Element("CdtrAgt")
        ED['FinInstnId_CdtrAgt_Node'] = ET.Element("FinInstnId")
        if 'BIC' in self._config:
            ED['BIC_CdtrAgt_Node'] = ET.Element("BIC")
        ED['ChrgBrNode'] = ET.Element("ChrgBr")
        ED['CdtrSchmeIdNode'] = ET.Element("CdtrSchmeId")
        ED['Nm_CdtrSchmeId_Node'] = ET.Element("Nm")
        ED['Id_CdtrSchmeId_Node'] = ET.Element("Id")
        ED['PrvtIdNode'] = ET.Element("PrvtId")
        ED['OthrNode'] = ET.Element("Othr")
        ED['Id_Othr_Node'] = ET.Element("Id")
        ED['SchmeNmNode'] = ET.Element("SchmeNm")
        ED['PrtryNode'] = ET.Element("Prtry")
        return ED
1323887
def make_tx(version, tx_ins, tx_outs, lock_time,
            expiry=None, value_balance=0, tx_shielded_spends=None,
            tx_shielded_outputs=None, tx_witnesses=None, tx_joinsplits=None,
            joinsplit_pubkey=None, joinsplit_sig=None, binding_sig=None):
    '''
    
    '''
    n = riemann.get_current_network_name()
    if 'decred' in n:
        return tx.DecredTx(
            version=utils.i2le_padded(version, 4),
            tx_ins=tx_ins,
            tx_outs=tx_outs,
            lock_time=utils.i2le_padded(lock_time, 4),
            expiry=utils.i2le_padded(expiry, 4),
            tx_witnesses=[tx_witnesses])
    if 'sprout' in n and tx_joinsplits is not None:
        return tx.SproutTx(
            version=version,
            tx_ins=tx_ins,
            tx_outs=tx_outs,
            lock_time=utils.i2le_padded(lock_time, 4),
            tx_joinsplits=tx_joinsplits if tx_joinsplits is not None else [],
            joinsplit_pubkey=joinsplit_pubkey,
            joinsplit_sig=joinsplit_sig)
    if 'overwinter' in n:
        return tx.OverwinterTx(
            tx_ins=tx_ins,
            tx_outs=tx_outs,
            lock_time=utils.i2le_padded(lock_time, 4),
            expiry_height=utils.i2le_padded(expiry, 4),
            tx_joinsplits=tx_joinsplits if tx_joinsplits is not None else [],
            joinsplit_pubkey=joinsplit_pubkey,
            joinsplit_sig=joinsplit_sig)
    if 'sapling' in n:
        return tx.SaplingTx(
            tx_ins=tx_ins,
            tx_outs=tx_outs,
            lock_time=utils.i2le_padded(lock_time, 4),
            expiry_height=utils.i2le_padded(expiry, 4),
            value_balance=utils.i2le_padded(value_balance, 8),
            tx_shielded_spends=(tx_shielded_spends
                                if tx_shielded_spends is not None else []),
            tx_shielded_outputs=(tx_shielded_outputs
                                 if tx_shielded_outputs is not None else []),
            tx_joinsplits=tx_joinsplits if tx_joinsplits is not None else [],
            joinsplit_pubkey=joinsplit_pubkey,
            joinsplit_sig=joinsplit_sig,
            binding_sig=binding_sig)
    flag = riemann.network.SEGWIT_TX_FLAG \
        if tx_witnesses is not None else None
    return tx.Tx(version=utils.i2le_padded(version, 4),
                 flag=flag,
                 tx_ins=tx_ins,
                 tx_outs=tx_outs,
                 tx_witnesses=tx_witnesses,
                 lock_time=utils.i2le_padded(lock_time, 4))
301615
def _do(self, nodes):
        
        if not isinstance(nodes, dict):
            raise TypeError('"nodes" must be a dictionary')

        if not nodes:
            # we're done!
            return
        starting_num_nodes = len(nodes)
        newly_instantiated = set()

        # Instantiate services with an empty dependency set
        for (name, dependency_set) in six.iteritems(nodes):
            if dependency_set:
                # Skip non-empty dependency sets
                continue

            # Instantiate
            config = self._config[name]
            service = self._factory.create_from_dict(config)
            self._factory.add_instantiated_service(name, service)

            newly_instantiated.add(name)

        # We ALWAYS should have instantiated a new service
        # or we'll end up in an infinite loop.
        if not newly_instantiated:
            raise Exception('No newly instantiated services')

        # Remove from Nodes
        for name in newly_instantiated:
            del nodes[name]

        # Check if the number of nodes have changed
        # to prevent infinite loops.
        # We should ALWAYS have removed a node.
        if starting_num_nodes == len(nodes):
            raise Exception('No nodes removed!')

        # Remove newly instantiated services from dependency sets
        for (name, dependency_set) in six.iteritems(nodes):
            nodes[name] = dependency_set.difference(newly_instantiated)

        # Recursion is recursion is ...
        self._do(nodes)