Skip to content

Instantly share code, notes, and snippets.

View bubogunz's full-sized avatar
🎯

Federico Brian bubogunz

🎯
View GitHub Profile
#include<iostream>
#include<algorithm>
#include<typeinfo>
using namespace std;
main(){
vector<string> titolo;
vector<string> artista;
titolo.push_back("blood");
@bubogunz
bubogunz / tree
Last active November 26, 2019 21:53
.
├── chaincode
├── configtx.yaml
├── crypto-config
│   ├── ordererOrganizations
│   │   └── orderer.it.firstNetwork
│   │   ├── ca
│   │   │   ├── 69cf75f0461ff984d7dafac8db741ae222bfb67f4699cab022abb5be37749d86_sk
│   │   │   └── ca.orderer.it.firstNetwork-cert.pem
│   │   ├── msp
@Contract(name = "myassetcontract", info = @Info(title = "MyAsset contract", description = "", version = "0.0.1", license = @License(name = "", url = ""), contact = @Contact(email = "", name = "", url = "")))
@Default
public class Deploy implements Chaincode{
public static void main( String[] args ){
//System.out.println( "Hello World!" );
}
@Override
public Response init(ChaincodeStub stub) {
admin | 2019-12-05 12:44:46.652 UTC [endorser] callChaincode -> INFO 5e5 [smartcontract][348a2f52] Entry chaincode: name:"lscc"
admin | 2019-12-05 12:44:46.652 UTC [chaincode] Execute -> DEBU 5e6 Entry
admin | 2019-12-05 12:44:46.652 UTC [chaincode] handleMessage -> DEBU 5e7 [348a2f52] Fabric side handling ChaincodeMessage of type: GET_STATE in state ready
admin | 2019-12-05 12:44:46.652 UTC [chaincode] HandleTransaction -> DEBU 5e8 [348a2f52] handling GET_STATE from chaincode
admin | 2019-12-05 12:44:46.652 UTC [chaincode] HandleGetState -> DEBU 5e9 [348a2f52] getting state for chaincode lscc, key myassetcontract, channel smartcontract
admin | 2019-12-05 12:44:46.652 UTC [stateleveldb] GetState -> DEBU 5ea GetState(). ns=lscc, key=myassetcontract
admin | 2019-12-05 12:44:46.652 UTC [chaincode] HandleGetState -> DEBU 5eb [348a2f52] No state associated with key: myassetcontract. Sending RESPONSE with an empty payload
admin | 2019-12-05 12:44:46.652 UTC [chaincode] Handl
package it.notaiosmart.blockchain.exception;
public class ConnectionToEthereumException extends Exception {
/**
* prova
*/
private static final long serialVersionUID = 1L;
public ConnectionToEthereumException() {
super("Non è stato possibile connettersi alla rete ethereum.");
import numpy as np
import matplotlib.pyplot as plt
np.random.seed([42])
X = np.array([[0,0,1],
[0,1,1],
[1,0,1],
[1,1,1]])
num_iters = 2000
eps = 0.5
mse = np.zeros(num_iters)
for it in range(num_iters):
for n in range(len(X)):
x_n = np.reshape(X[n], (3,1))
y_target = y[n]