Skip to content

Instantly share code, notes, and snippets.

View jnmclarty's full-sized avatar

Jeffrey McLarty jnmclarty

View GitHub Profile
@jnmclarty
jnmclarty / SampleMnemonicKeys.csv
Created August 24, 2024 01:28
Keys for `grocery exercise sweet odor define alpha emerge start federal fade blanket ahead off promote salad`
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 4 columns, instead of 1 in line 6.
path,address,public key,private key
m/44'/60'/0'/0/0,0xB4b3D3eC0c14e55bd856f04b5F0BF3d15CC03cF4,0x02bf3294aefb1e7449d0e5ff2a3df468a37770f866bd28925cfd9167ada1c0c76e,0xefe34d79e2efdacb982092d4ded87409b03bac8960dadceb4e90795729586020
m/44'/60'/0'/0/1,0x1F9df55c00e041f70eB4A5399f1E3161115f3053,0x03b35f46982d46b61a013192e71a42f1955719ff41ff1cc94a9d23a937b953b0cf,0xb30e95f1bfce7bb9496c73ad72c9481f08d51fa18d5f46d1111b89c69f2e43d9
m/44'/60'/0'/0/2,0x93443CDDC3b6Be51a83a82E1f9fFA4EF713c9783,0x02c14f08b95aaa745b024b1bee7e6b2d29dfd5d83d1738551619eac9bb018b3552,0xc4d714ca8db704e444b66b0d0f52d4a98b3172d4cf0077336086a3056e72f37b
m/44'/60'/0'/0/3,0xd18eEC3eef20F4DFb6EdEe60cB7c1D080783190c,0x03aad500d0ef4ecddeb9f94ead624061a8ac13cd9692fa01530cb7689500303273,0x64e975a5c18dd5d2db3f78ffa844aa4d75025055bd5969def9617a24fbcf8656
m/44'/60'/0'/0/4,0xd0571D3166ce86474670A8fB9124807f1228D15d,0x0235f250422e6104473d277e3e7db1e56b0031670ca84f88408125ca20727927d4,0x3eeefa16e9ac915cedc2ba947e18624bbad6b383ad7af94e265a80828812792f
m/44'/60
@jnmclarty
jnmclarty / postgresql_df_upsert.py
Created June 15, 2024 03:10 — forked from gordthompson/postgresql_df_upsert.py
Build a PostgreSQL INSERT … ON CONFLICT statement and upsert a DataFrame
# version 1.2 - 2022-10-04
import pandas as pd
import sqlalchemy as sa
def df_upsert(data_frame, table_name, engine, schema=None, match_columns=None):
"""
Perform an "upsert" on a PostgreSQL table from a DataFrame.
Constructs an INSERT … ON CONFLICT statement, uploads the DataFrame to a
@jnmclarty
jnmclarty / pull_liquidity.py
Created August 3, 2023 13:43
Pull UniV3 Topics
# -*- coding: utf-8 -*-
import json
import datetime as dt
import requests as r
MINT_TOPIC = '0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde'
BURN_TOPIC = '0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c'
@jnmclarty
jnmclarty / lighthouse_reth.sh
Created July 29, 2023 02:19
Boot up Lighthouse 4.30 from Binary & Reth from Source
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
echo source $HOME/.cargo/env >> ~/.bashrc
# Install Reth Dependencies
sudo apt-get install libclang-dev pkg-config build-essential
git clone https://github.com/paradigmxyz/reth
cd reth
@jnmclarty
jnmclarty / rex_user_benefit_map.md
Last active July 23, 2017 22:26
REX User Benefit Map - A Critic & Questions

The text below has been transcribed from a video produced by REX MLS. For certain bullets, I broke out lines where there were two ideas on one line.

1. BROKER

  • List for $0.10 - $0.20/per listing
  • Global Listing Exposure
  • Data Ownership
  • Earn REX for listing
  • Monetize listings via ads/market reports
  • Earn REX Merits based on reputation
  • Predictable commission payouts (Phase 3)
@jnmclarty
jnmclarty / flask_pyenvdiff.py
Created February 12, 2017 02:19
How to add an endpoint for environment info to any Flask App
import json
# Assuming you've instantiated a Flask app...
from pyenvdiff import Environment
@app.route('/pyenv')
def pyenv():
info = Environment().info()
resp = json.dumps(info)
@jnmclarty
jnmclarty / python_ubuntu_16.04.1.md
Last active March 3, 2018 20:58
How to Set up Python w/ a Seperate Anaconda for Multiple-Projects on Ubuntu 16.04.1 LTS x64

1. Setup Ubuntu-level Stuff for a Python Dev

apt-get update
adduser jnmclarty
usermod -aG sudo jnmclarty
su - jnmclarty
sudo apt-get -y upgrade
sudo apt-get install make build-essential libssl-dev libffi-dev python-dev python-virtualenv zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils
@jnmclarty
jnmclarty / cent_os_pymqi_27_35.sh
Last active November 15, 2016 01:48
Create dev environment for CentOS/PyMQI
cd ~
wget http://repo.continuum.io/archive/Anaconda3-4.2.0=Linux-x86-64.sh
sudo yum install git
sudo yum groupinstall -y development
sudo yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
sudo yum install python-devel
bash Anaconda3-4.2.0-Linux-x86_64.sh
source .bashrc
conda create -n py27pymqi python=2.7
conda create -n py35pyqmi python=3.5
@jnmclarty
jnmclarty / performance.md
Last active April 28, 2023 22:05
Redis vs SQLlite In Memory vs SQLite Disk

Redis Results

0.00922203063965

2611-04-18

0.0102469921112

2385-05-21

@jnmclarty
jnmclarty / partial.py
Last active December 1, 2015 02:42
partial usage of partial
from functools import partial
import os
rel_path = partial(os.path.join, os.path.dirname(__file__))
f = rel_path("../config/foo.ini")
print_stderr = partial(print, file=sys.stderr)