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 max_val(t): | |
""" t, tuple or list | |
Each element of t is either an int, a tuple, or a list | |
No tuple or list is empty | |
Returns the maximum int in t or (recursively) in an element of t """ | |
max_v=0 | |
def test(t,max_v): | |
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
pragma solidity^0.4.21; | |
contract Test { | |
mapping(address => patientStruct) public map; | |
struct patientStruct{ | |
address[] deptArray; | |
mapping(string => string); | |
} | |
constructor() { |
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
// Establish a Socket.io connection | |
const socket = io(); | |
// Initialize our Feathers client application through Socket.io | |
// with hooks and authentication. | |
const client = feathers(); | |
client.configure(feathers.socketio(socket)); | |
// Use localStorage to store our login token | |
client.configure(feathers.authentication({ | |
storage: window.localStorage |
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
{ | |
"validationCode": 0, | |
"transactionEnvelope": { | |
"signature": { | |
"type": "Buffer", | |
"data": [ | |
48, | |
68, | |
2, | |
32, |
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
613c8f75a87118da7e5091dc5ecac4ec96733c5e6f486be74dcca8acd7427befc286a968f2b79d266a41e3ba09434cfd232e407fd21988a52fef0e5f2cfac57c |
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
import LinkdropSDK from '@linkdrop/sdk' | |
import 'babel-polyfill'; | |
var linkdropMasterAddress="0x7068f16f66bCdAA7FCF575De47d094765772977A"; | |
var factoryAddress="0xBa051891B752ecE3670671812486fe8dd34CC1c8"; | |
const linkdropSDK = new LinkdropSDK({ | |
linkdropMasterAddress, | |
factoryAddress, | |
сhain : 'kovan', |
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 linkdropMasterAddress = "0x7068f16f66bCdAA7FCF575De47d094765772977A"; | |
var factoryAddress = "0xBa051891B752ecE3670671812486fe8dd34CC1c8"; | |
var linkdropSigningKey = 'A663EC3E46FD14E52B145EE5B58F356246723FF1EA95E3D5E51358B66AE9DA39' | |
const uuidv4 = require('uuid/v4') | |
const linkdropSDK = new LinkdropSDK({ | |
linkdropMasterAddress, | |
factoryAddress, | |
сhain: 'kovan', | |
jsonRpcUrl: `https://kovan.infura.io`, |
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
const kafka = require('kafka-node') | |
const Producer = kafka.Producer; | |
const client = new kafka.KafkaClient('http://localhost:9092'); | |
const producer = new Producer(client); | |
const kafka_topic = 'contract-events'; | |
console.log(kafka_topic); | |
let struct = { | |
"details":{ | |
"name":"Opened", |
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 linkdropMasterAddress = "0x7068f16f66bCdAA7FCF575De47d094765772977A"; | |
var factoryAddress = "0xBa051891B752ecE3670671812486fe8dd34CC1c8"; | |
var linkdropSigningKey = 'A663EC3E46FD14E52B145EE5B58F356246723FF1EA95E3D5E51358B66AE9DA39' | |
const campaignId = uuidv4(); | |
let proxyAddress = linkdropSDK.getProxyAddress( | |
new web3.utils.BN(uuidv4().replace(/-/g, "")).toString() | |
) | |
console.log(proxyAddress) |
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
const ethers = require('ethers') | |
var addr = '0xF2B971B7509DBE603e5a2204d799E73Be9DF35D6' // receiver addr | |
var w = new ethers.Wallet('A663EC3E46FD14E52B145EE5B58F356246723FF1EA95E3D5E51358B66AE9DA39', ethers.getDefaultProvider('rinkeby')) | |
w.signMessage(addr) |
OlderNewer