Skip to content

Instantly share code, notes, and snippets.

View exocomet's full-sized avatar
🚀

Alexander Kutterer exocomet

🚀
View GitHub Profile
@exocomet
exocomet / coinbasepro_request.py
Created July 13, 2021 20:20
Coinbase Pro - creating a request, Python 3
import json, hmac, hashlib, time, requests, base64
from requests.auth import AuthBase
# Create custom authentication for Exchange
class CoinbaseExchangeAuth(AuthBase):
def __init__(self, api_key, secret_key, passphrase):
self.api_key = api_key
self.secret_key = secret_key
self.passphrase = passphrase
@exocomet
exocomet / calendar.sql
Last active April 29, 2024 17:00
sqlite calendar table
-- sqlite
CREATE TABLE IF NOT EXISTS calendar (
d date UNIQUE NOT NULL,
dayofweek INT NOT NULL,
weekday TEXT NOT NULL,
quarter INT NOT NULL,
year INT NOT NULL,
month INT NOT NULL,
day INT NOT NULL
);