Skip to content

Instantly share code, notes, and snippets.

View mkirlin's full-sized avatar

Michael Gandhi-Kirlin mkirlin

View GitHub Profile
@mkirlin
mkirlin / yahoo-google-sheets-script.py
Created October 4, 2023 20:35
ChatGPT script for pulling transactions from Yahoo fantasy sports API
import requests
from urllib.parse import urlencode
import gspread
from oauth2client.service_account import ServiceAccountCredentials
# Define your API credentials
client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"
redirect_uri = "YOUR_REDIRECT_URI" # You set this when registering your app
access_token = None
@mkirlin
mkirlin / send_groupme_message_with_notifications.py
Created February 20, 2020 20:33
An attempt at sending a message to a GroupMe group that includes @mentions for users.
def _send_message(bot, message_to_send):
attachments = _format_attachments(bot, message_to_send)
print(attachments)
response = requests.post(
f"{GROUPME_URL}/bots/post",
params={"token": GROUPME_TOKEN},
data = {
"bot_id": bot.get("bot_id"),
"text": message_to_send,
"attachments": attachments