Skip to content

Instantly share code, notes, and snippets.

@jhodges10
jhodges10 / keybase.md
Created March 28, 2018 18:10
Keybase verification

Keybase proof

I hereby claim:

  • I am jhodges10 on github.
  • I am jhodges (https://keybase.io/jhodges) on keybase.
  • I have a public key ASDJiVGsB_IkBv0dS9YtyKea9eu6ioAzis-JActWcaJB6Qo

To claim this, I am signing this object:

@jhodges10
jhodges10 / liqui_tx_history_to_csv
Last active April 9, 2018 03:48
Export Liqui trades via the API to a Bitcoin Tax compatible CSV
from liqui import Liqui # https://pypi.python.org/pypi/liqui
import datetime
import pandas as pd
api_key = 'YOUR_API_KEY'
api_secret = 'YOU_API_SECRET'
csv_filename = 'liqui_tx.csv'
import requests
import json
from json import JSONDecodeError
import random
from multiprocessing import Pool
from functools import partial
from functools import lru_cache
# Insight API
@jhodges10
jhodges10 / voteindicator.ino
Last active May 25, 2018 22:52
Particle Photon Dash Treasury Vote Indicator
//The pin you want to control, in this case I'm blinking the on-board blue LED on digital pin D7 and an LED on pin D0
int led1 = D0;
int led2 = D7;
//This function is called after the Photon has started
void setup(){
//We set the pin mode to output
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
@jhodges10
jhodges10 / vote_check.py
Created May 25, 2018 16:23
Particle Photon Dash Treasury Python
import json
import requests
import os
from datetime import datetime
# Set this to be the change delta you want to trigger your notifications
delta_setting = int(os.getenv('DELTA_SETTING'))
def get_mn_count():
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import time, os, sys
print("Starting Spam Program")
password = "d9060549bd53cda3fc0f891b5f4a586271d5ee6a180ade1ea2bfe3985ccc7b01"
user = "6594052d2802c63e763caad3afdd5a2babcdacc4daf47277ca91d4d050d25d16"
def rpc_conn(user=user, password=password):
rpc_conn = AuthServiceProxy("http://%s:%s@localhost:9998" % (user, password))
@jhodges10
jhodges10 / insight_class.py
Last active August 31, 2018 07:38
Insight API as a class
import requests
import json
from json import JSONDecodeError
import random
from multiprocessing import Pool
from functools import partial
class Insight(object):
self.round_robin_url = ""
@jhodges10
jhodges10 / zmq_test.py
Last active July 3, 2018 19:11
Dash ZeroMQ Test
#!/usr/bin/env python
import binascii
import zmq
import struct
import csv
import time
port = 28332
import os
import sys
import time
import json
from pprint import pprint
from json import JSONDecodeError
data_dir = os.path.abspath("G:\hyperscratch\Dash Network Stats")
@jhodges10
jhodges10 / vote_switcher.py
Created August 8, 2018 00:02
Checks for swapped votes using the Dash Intel vote Database
from bin.db_functions import IntelDatabase
from bin.DashInfo import DataPreparation
test_prop_hash = '7877338b947d7fe25d4dcc80979ee1f918736596677188ebadc79e5b9009d847'
def check_for_changed_votes():
node_dict = {}
votes_dict = IntelDatabase.get_votes_for_hash(test_prop_hash)
DataPreparation.write_json(votes_dict, 'votes_data')