This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randomdata = [ | |
{ | |
date: 1547126422.489, | |
value: 21 | |
}, | |
{ | |
date: 1521688318.548, | |
value: 26 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://raw.githubusercontent.com/gauthamzz/ayyo/master/serve/paywall.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def query(self, req): | |
value = self.state.db.get(prefix_key(req.data)) | |
return ResponseQuery(code=CodeTypeOk, value=value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def commit(self): | |
byte_length = max(ceil(self.state.size.bit_length() / 8), 1) | |
app_hash = self.state.size.to_bytes(byte_length, byteorder='big') | |
self.state.app_hash = app_hash | |
self.state.height += 1 | |
self.state.save() | |
return ResponseCommit(data=app_hash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deliver_tx(self, tx): | |
"""Validate the transaction before mutating the state. | |
Args: | |
raw_tx: a raw string (in bytes) transaction. | |
""" | |
parts = tx.split(b'=') | |
if len(parts) == 2: | |
key, value = parts[0], parts[1] | |
else: | |
key, value = tx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class State(object): | |
def __init__(self, db, size, height, apphash): | |
self.db = db | |
self.size = size | |
self.height = height | |
self.apphash = apphash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the genesis block, for the node. | |
tendermint init | |
# Now that the gensis block is inilaised we can start | |
# the application on the system | |
tendermint node --proxy_app=kvstore | |
# This will start the kvstore application in your | |
# computer in port 26657. | |
# Lets test the kv store application by sending a request to the application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lets do in a different way | |
tendermint init --home ".node" | |
# Start a tendermint node | |
tendermint node --home ".node" | |
# Open a new terminal and start kvstore from abci-console | |
abci-console kvstore | |
# Open new terminal and start abci-console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "mast rcnn balloon", | |
"version": "2.1", | |
"url": "https://github.com/matterport/Mask_RCNN/releases/download/v2.1/mask_rcnn_balloon.h5", | |
"description": "We train the model to detect balloons only, and then we use the generated masks to keep balloons in color while changing the rest of the image to grayscale.", | |
"input_parameters": "<optional>", | |
"output_parameters": "<optional", | |
"repository": { | |
"type": "git", | |
"sample": "https://github.com/matterport/Mask_RCNN/tree/master/samples/balloon", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1AsKEABwZNuuY8PuYQaGPfvv9nLEr4gkSA https://explorer.blockstack.org/address/1AsKEABwZNuuY8PuYQaGPfvv9nLEr4gkSA |
NewerOlder