Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Working on Side Projects

Allan MacGregor amacgregor

:shipit:
Working on Side Projects
View GitHub Profile
View eth_hero1.sh
WARN [12-22|16:10:27] No etherbase set and no accounts found as default
INFO [12-22|16:10:27] Starting peer-to-peer node instance=Geth/HeroNode1/v1.7.3-stable/darwin-amd64/go1.9.2
INFO [12-22|16:10:27] Allocated cache and file handles database=/Users/.../ethereum_0hero/TestNetData/geth/chaindata cache=128 handles=1024
INFO [12-22|16:10:27] Initialised chain configuration config="{ChainID: 24 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: 0 EIP158: 0 Byzantium: <nil> Engine: unknown}"
INFO [12-22|16:10:27] Disk storage enabled for ethash caches dir=/Users/.../ethereum_0hero/TestNetData/geth/ethash count=3
INFO [12-22|16:10:27] Disk storage enabled for ethash DAGs dir=/Users/.../.ethash count=2
INFO [12-22|16:10:27] Initialising Ethereum protocol versions="[63 62]" network=24
INFO [12-22|16:10:27] Loaded most recent local header number=0 hash=6231b0…a0300b td=1024
INFO [12-22|16:10:27] Loaded mo
View eth_hero2.sh
INFO [12-22|17:07:55] Updated mining threads threads=0
INFO [12-22|17:07:55] Transaction pool price threshold updated price=18000000000
INFO [12-22|17:07:55] Starting mining operation
INFO [12-22|17:07:55] Commit new mining work number=1 txs=0 uncles=0 elapsed=981.307µs
INFO [12-22|17:07:57] Generating DAG in progress epoch=0 percentage=0 elapsed=577.592ms
INFO [12-22|17:07:57] Generating DAG in progress epoch=0 percentage=1 elapsed=1.168s
INFO [12-22|17:07:58] Generating DAG in progress epoch=0 percentage=2 elapsed=1.985s
INFO [12-22|17:07:59] Generating DAG in progress epoch=0 percentage=3 elapsed=2.586s
View .vimrc
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
set encoding=utf8
"""" START Vundle Configuration
View perceptron.py
from random import choice
from numpy import array, dot, random
# Declare activation function
def stepFunction(value):
if value <= 0:
return 0
else:
return 1
@amacgregor
amacgregor / dump-subset-of-magento-orders-and-customer-data.php Proof of concept of script that does mysql dump of subset of Magento orders + related sales tables and customer's data of customer that did the orders. The script also attempts to import the data in local database. Currently the script gets last 1000 orders and customers data of customers that created the orders. Data anonymization is not implem…
View dump-subset-of-magento-orders-and-customer-data.php
<?php
$mysqlCommandPath = 'to be filled';
$mysqldumptCommandPath = 'to be filled';
$remoteDbUnsername = 'to be filled';
$remoteDbPassword = 'to be filled';
$remotePort = 'to be filled';
$remotHost = 'to be filled';
$remoteDb = 'to be filled';
View snn_08.py
from numpy import exp, array, random, dot
ts_inputs = array([[0, 0, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1]])
ts_outputs = array([[0, 0, 0, 1, 1]]).T
#unknown input
un_input = array([1, 0, 0])
# initialize synapse_weights
random.seed(1)
sy_weights = 2 * random.random((3,1)) - 1
View snn_07.py
from numpy import exp, array, random, dot
ts_inputs = array([[0, 0, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1]])
ts_outputs = array([[0, 0, 0, 1, 1]]).T
#unknown input
un_input = array([1, 0, 0])
# initialize synapse_weights
random.seed(1)
sy_weights = 2 * random.random((3,1)) - 1
View snn_06.py
from numpy import exp, array, random, dot
ts_inputs = array([[0, 0, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1]])
ts_outputs = array([[0, 0, 0, 1, 1]]).T
#unknown input
un_input = array([1, 0, 0])
# initialize synapse_weights
random.seed(1)
sy_weights = 2 * random.random((3,1)) - 1
View snn_05.py
from numpy import exp, array, random, dot
ts_inputs = array([[0, 0, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1]])
ts_outputs = array([[0, 0, 0, 1, 1]]).T
#unknown input
un_input = array([1, 0, 0])
# initialize synapse_weights
random.seed(1)
sy_weights = 2 * random.random((3,1)) - 1
View snn_04.py
from numpy import exp, array, random, dot
ts_inputs = array([[0, 0, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 1]])
ts_outputs = array([[0, 0, 0, 1, 1]]).T
#unknown input
un_input = array([1, 0, 0])
# initialize synapse_weights
random.seed(1)
sy_weights = 2 * random.random((3,1)) - 1
You can’t perform that action at this time.