Skip to content

Instantly share code, notes, and snippets.

View gauthamzz's full-sized avatar
🐻‍❄️
Building

Gautham Santhosh gauthamzz

🐻‍❄️
Building
View GitHub Profile
var randomdata = [
{
date: 1547126422.489,
value: 21
},
{
date: 1521688318.548,
value: 26
},
{
<script src="https://raw.githubusercontent.com/gauthamzz/ayyo/master/serve/paywall.js"></script>
def query(self, req):
value = self.state.db.get(prefix_key(req.data))
return ResponseQuery(code=CodeTypeOk, value=value)
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)
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
class State(object):
def __init__(self, db, size, height, apphash):
self.db = db
self.size = size
self.height = height
self.apphash = apphash
# 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
@gauthamzz
gauthamzz / abci-console.sh
Last active January 31, 2019 21:24
Tendermint KV store
# 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
{
"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",
Verifying my Blockstack ID is secured with the address 1AsKEABwZNuuY8PuYQaGPfvv9nLEr4gkSA https://explorer.blockstack.org/address/1AsKEABwZNuuY8PuYQaGPfvv9nLEr4gkSA