Skip to content

Instantly share code, notes, and snippets.

View mistermichaelll's full-sized avatar

Michael Johnson mistermichaelll

View GitHub Profile
@mistermichaelll
mistermichaelll / coinbase_auth.jl
Last active January 24, 2022 23:26
This script generates the headers for making API requests to Coinbase's API, as documented here: https://docs.cloud.coinbase.com/exchange/docs/welcome
# libraries
# ---------
import SHA.hmac_sha256, Base64.base64encode, Base64.base64decode
# this is the URL we'll use as a base for all requests.
# -----------------------------------------------------
api_url = "https://api.exchange.coinbase.com"
# struct for required CB info
# ---------------------------
# This script is a first pass at creating a clean Hinge dataset that one can use to
# visualize using Python or R.
#
# You can request your Hinge data from the app, and the file in question that we're
# using here is "matches.json".
#
# Author: Michael Johnson
# Last Updated: June 2, 2021
#
@mistermichaelll
mistermichaelll / apex_information.py
Created July 28, 2020 02:34
This is necessary for the other piece of my script.
# ====================================================================
# ----------------
# APEX Information
# ----------------
# This script simply defines the urls of the information that we need
# exported out of APEX.
#
# Note that the cost basis URLs access APEX's API. This means that
# we only have to open these pages in Selenium in order to export this
# information.
# ================================================
# Export portfolio information using Selenium & R
# ================================================
# note that apex_information.py is a separate script that you need
# to run this one. I've uploaded that (sans account information) here:
# https://gist.github.com/mistermichaelll/7d6cb085000adf8c33087df3ae1b3a40
# libraries utilized
# & APEX information script
@mistermichaelll
mistermichaelll / m1_googlesheets.R
Last active April 11, 2024 00:59
Entire script for my small M1 Finance project.
# ==================================================================================
# M1 Finance/Google Sheets Tracker
# --------------------------------
# Author: Michael Johnson
# Last updated: May 25, 2020
#
# This script works in tandem with a Python script to easily
# access and update information relating to my M1 Finance portfolio
# in a Google Sheet.
#
@mistermichaelll
mistermichaelll / span_ling.py
Last active May 31, 2019 15:39
This script parses text interviews for certain words/phrases. It writes a DataFrame to a csv file containing the word/phrase searched for, subject ID number, subject gender, subject age, subject gender, appearance number, the phrase before and after, and the word before and after.
# =====================================================
# This script was created to help parse the information
# in a text interview programmatically as opposed to
# doing so by hand. Currently, this program will
# find a specifed word, number the first ocurrence of
# the word, and return the phrase before and after the
# word.
# =====================================================
import os