Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
#! /usr/bin/env node | |
'use strict'; | |
const program = require('commander'); | |
const fs = require('fs'); | |
const { spawn } = require('child_process'); | |
program | |
.version('1.0.0') | |
.option('-e, --environment <environment>', 'Environment to deploy to') |
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
module.exports = { | |
promisify: function (web3) { | |
// Pipes values from a Web3 callback. | |
var callbackToResolve = function (resolve, reject) { | |
return function (error, value) { | |
if (error) { | |
reject(error); | |
} else { | |
resolve(value); | |
} |
'use strict'; | |
const DEF_CURRENCY = 'USD'; | |
const DEF_SCALE_FACTOR = 100; | |
const mongoose = require('mongoose'); | |
const Schema = mongoose.Schema; | |
const ObjectId = Schema.ObjectId; | |
const MoneySchema = new Schema({ |
import tensorflow as tf | |
import numpy as np | |
NUM_STATES = 10 | |
NUM_ACTIONS = 2 | |
GAMMA = 0.5 | |
def hot_one_state(index): | |
array = np.zeros(NUM_STATES) |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |