Skip to content

Instantly share code, notes, and snippets.

View tinybike's full-sized avatar

Jack Peterson tinybike

  • Merica
View GitHub Profile
my mom wanted to mine some of the .5eth block reward blocks, so i team viewed into her computer & installed alethzero, made her a fresh account, and let it start downloading blocks --- haven't mined anything yet, but she has 2048.9 finney
extremely weird --- decided to try to send a tx to my computer for a few hundred finney:
i 20:12:01|main New transaction ee56e0fd…{[CREATE]/0$47+21000@10000000000000<-b291451f… #0}
X 20:12:01|eth Sending from non-existant account. How did it pay!?!
i 20:12:01|eth #ee56e0fd… Dropping invalid transaction: State.cpp(977): Throw in function void __thiscall dev::eth::State::subBalance(class dev::FixedHash<20>,class boost::multiprecision::number<struct boost::multiprecision::backends::cpp_int_backend<0,0,1,0,class std::allocator<unsigned long> >,1>)
Dynamic exception type: class boost::exception_detail::clone_impl<struct dev::eth::NotEnoughCash>
std::exception::what: Unknown exception
@grandadmiral-thrawn
grandadmiral-thrawn / cambellold.py
Created October 19, 2014 00:03
campbellold.py
import csv
import glob
import datetime
from decimal import Decimal
## This is a script (soon to be a module) for reading old campbell logger files
## These files usually end in an extension such as .099 or .012 indicative of their year
## The example name for this file is seen in the main runing loop of this script at the bottom
## The "delimiting" between the file and values is done on a "+" sign or "-" sign depending on the signature of the value
## Often one array (loggerid) will have a longer instruction than others, and will be delimited differently.
@grandadmiral-thrawn
grandadmiral-thrawn / readme
Created September 6, 2014 20:28
Sun Algorithm, REVISED
this is the revised version of the solar algorithm for HJ andrews data! It now takes advantage of the suncycle.m function which can be found in this gist as well (NOAA). it now knows when night is and turns radiation to 0. previously there was some extraneous radiation which apparently is problematic in this type of equation due to the way in which clouds are incorporated- false "backscattering" takes effect. output will be included later.
import sys
import tornado.ioloop
import psycopg2
import psycopg2.extensions
io_loop = tornado.ioloop.IOLoop.instance()
conn = psycopg2.connect('dbname=mytest user=lbolla password=secret')
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9