This file contains hidden or 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
package ionflow | |
import ( | |
"bytes" | |
"context" | |
"math/big" | |
"regexp" | |
"strings" | |
"testing" |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/ethdb/memorydb" | |
"github.com/ethereum/go-ethereum/rlp" | |
"github.com/ethereum/go-ethereum/trie" |
This file contains hidden or 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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/ethclient" | |
"github.com/ethereum/go-ethereum/ethdb" |
This file contains hidden or 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
#!/bin/bash | |
UP_SYMBOL=▲ | |
DOWN_SYMBOL=▼ | |
# BTC_SYMBOL="<fc=#FFFF00>฿</fc>" | |
BTC_SYMBOL="<fc=#FF9900><fn=1></fn></fc>" | |
#ETH_SYMBOL="<fc=#7777FF>Ξ</fc>" | |
ETH_SYMBOL="<fc=#7777FF><fn=1></fn></fc>" | |
This file contains hidden or 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 printMatrix = (matrix) => matrix.forEach((line,j) => console.log('('+j+')',line)); | |
// USES ALGORITHM THAT I DESCRIBED WHICH WAS WRONG!!!! | |
const countIslandsMyAlgorithm = (matrix) => { | |
const checkCounterMatrix = (counterMatrix,i,j) => { | |
if((i-1 >= 0) && (counterMatrix[i-1][j] !== 0)) return counterMatrix[i-1][j]; | |
if((j-1 >= 0) && (counterMatrix[i][j-1] !== 0)) return counterMatrix[i][j-1]; | |
// this 2 cases are never considered in any of the matrices, this causes issues | |
if((i+1 < matrix.length) && (matrix[i+1][j] !== 0)) return counterMatrix[i+1][j] = 0; |
This file contains hidden or 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 level = require('level'); | |
const levelup = require('levelup'); | |
const RLP = require('rlp'); | |
const Trie = require('merkle-patricia-tree') | |
const DATADIR_PATH = '../../simple_geth_launcher/data_node1'; | |
/* | |
const nodeDb = level('/home/da/.ethereum/geth/nodes'); | |
const nodeDataArr = []; |
This file contains hidden or 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
#!/bin/bash | |
COUNTER=0 | |
trap '{ echo "Hey, you pressed Ctrl-C. Loop Counter: $COUNTER Time to quit." ; exit 1; }' INT | |
#./go-ethereum/build/bin/geth --bootnodes enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fbaf6416c0@33.4.2.1:30303 --rpc | |
#Libs used for keccak-256sum | |
#https://github.com/maandree/libkeccak.git |
This file contains hidden or 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
//self running function to encapsulate all the variables | |
var Test = function() { | |
var testBIN = '6060604052341561000c57fe5b5b60326000819055505b5b60e7806100256000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063b69ef8a8146044578063b6b55f25146067575bfe5b3415604b57fe5b60516098565b6040518082815260200191505060405180910390f35b3415606e57fe5b60826004808035906020019091905050609e565b6040518082815260200191505060405180910390f35b60005481565b60008160006000828254019250508190555060005490505b9190505600a165627a7a723058206751dd5bc72fc42f08633904726ab78c48328a747e7fa4147ad042d513e1a9480029'; | |
var testABI = [ | |
{ | |
"constant": true, |
This file contains hidden or 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
0x6167a665587a1c19d23f6452fdcc1b6fd60a0264 |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am daragao on github. | |
* I am doart3 (https://keybase.io/doart3) on keybase. | |
* I have a public key ASCPzNJiX4eeyjQbTN39wEvDLLO2eZMejZGzRJkZl6c2mwo | |
To claim this, I am signing this object: |