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
SELECT | |
ROUND((input_value - output_value)/ size, 0) AS fees_per_byte, | |
COUNT(*) AS txn_cnt | |
FROM | |
`bigquery-public-data.crypto_bitcoin.transactions` | |
WHERE TRUE | |
AND block_timestamp >= '2018-01-01' | |
AND is_coinbase IS FALSE | |
GROUP BY 1 |
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
WITH | |
output_ages AS ( | |
SELECT | |
ARRAY_TO_STRING(outputs.addresses,',') AS output_ages_address, | |
MIN(block_timestamp_month) AS output_month_min, | |
MAX(block_timestamp_month) AS output_month_max | |
FROM `bigquery-public-data.crypto_bitcoin.transactions` AS transactions JOIN UNNEST(outputs) AS outputs | |
GROUP BY output_ages_address | |
) | |
,input_ages AS ( |
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
WITH double_entry_book AS ( | |
-- debits | |
SELECT | |
array_to_string(inputs.addresses, ",") as address | |
, inputs.type | |
, -inputs.value as value | |
FROM `bigquery-public-data.crypto_bitcoin.inputs` as inputs | |
UNION ALL | |
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
WITH double_entry_book AS ( | |
-- debits | |
SELECT | |
array_to_string(inputs.addresses, ",") as address | |
, inputs.type | |
, -inputs.value as value | |
FROM `crypto-etl-bitcoin-prod.dogecoin_blockchain.inputs` as inputs | |
UNION ALL | |
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
SELECT | |
SQRT( | |
POWER((h0-0.0417),2)+POWER((h1-0.0417),2)+POWER((h2-0.0417),2)+POWER((h3-0.0417),2)+ | |
POWER((h4-0.0417),2)+POWER((h5-0.0417),2)+POWER((h6-0.0417),2)+POWER((h7-0.0417),2)+ | |
POWER((h8-0.0417),2)+POWER((h9-0.0417),2)+POWER((h10-0.0417),2)+POWER((h11-0.0417),2)+ | |
POWER((h12-0.0417),2)+POWER((h13-0.0417),2)+POWER((h14-0.0417),2)+POWER((h15-0.0417),2)+ | |
POWER((h16-0.0417),2)+POWER((h17-0.0417),2)+POWER((h18-0.0417),2)+POWER((h19-0.0417),2)+ | |
POWER((h20-0.0417),2)+POWER((h21-0.0417),2)+POWER((h22-0.0417),2)+POWER((h23-0.0417),2) | |
) AS daemon_distance, | |
address,hsum, |
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
CREATE TABLE events ( | |
id bigint not null primary key auto_increment, | |
created_at timestamp DEFAULT now(), | |
event character varying(255), | |
nick character varying(255), | |
ip character varying(255), | |
host character varying(255), | |
user_name character varying(255), | |
ident character varying(255), | |
server character varying(255), |
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
#!/usr/bin/perl | |
use strict; | |
use LWP::Simple qw(get); | |
my $p = 1; | |
while ( 1 ) { | |
my $response = get(qq(https://www.4byte.directory/signatures/?page=$p)); | |
while ( $response =~ m#\G.+?<td class="text_signature">(\S+)</td>\s*<td class="bytes_signature"><code>(\w{10})</code></td>#gs ) { |
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
window.addEventListener("blur",function(){ | |
window.setTimeout(function(){ | |
var outerIframe = document.activeElement; | |
if (! outerIframe instanceof HTMLIFrameElement) { console.log("fail 1");return } | |
if (outerIframe.id.match("google_ads") == null) { console.log("fail 2");return } | |
var innerDoc = outerIframe.contentWindow | |
? outerIframe.contentWindow.document | |
: frameRef.contentDocument; | |
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
#!/usr/bin/perl | |
use strict; | |
use IO::Socket::INET; | |
$IO::Socket::INET::DEBUG=2; | |
#Credit to Gisle Aas | |
#http://www.farhadsaberi.com/perl/2012/01/http-post-stream-upload-file-chunked-transfer.html | |
my $verbose = 1; | |
my $server = shift; |
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
a q | |
a z | |
b n | |
b v | |
b g | |
b h | |
c d | |
c v | |
c x | |
c f |