Skip to content

Instantly share code, notes, and snippets.

name: Work Stats Readme
on:
workflow_dispatch:
schedule:
# Runs every 2 hours
- cron: "0 */2 * * *"
jobs:
update-readme:
name: Run bot
on:
workflow_dispatch:
schedule:
# Runs every 2 hours
- cron: "0 */2 * * *"
jobs:
prep:
import os
import praw
from supabase_py import create_client, Client
reddit = praw.Reddit(
username = os.environ.get('REDDIT_USERNAME'),
password = os.environ.get('REDDIT_PASSWORD'),
client_id = os.environ.get('API_CLIENT'),
client_secret = os.environ.get('API_SECRET'),
user_agent = "Scooby Searcher Bot"
import os
import praw
from supabase_py import create_client, Client
reddit = praw.Reddit(
username = os.environ.get('REDDIT_USERNAME'),
password = os.environ.get('REDDIT_PASSWORD'),
client_id = os.environ.get('API_CLIENT'),
client_secret = os.environ.get('API_SECRET'),
user_agent = "Scooby Searcher Bot"
import os
import praw
from supabase_py import create_client, Client
reddit = praw.Reddit(
username = os.environ.get('REDDIT_USERNAME'),
password = os.environ.get('REDDIT_PASSWORD'),
client_id = os.environ.get('API_CLIENT'),
client_secret = os.environ.get('API_SECRET'),
user_agent = "Scooby Searcher Bot"
API_CLIENT=<YOUR_API_CLIENT>
API_SECRET=<YOUR_API_SECRET>
REDDIT_USERNAME=<YOUR_REDDIT_USERNAME>
REDDIT_PASSWORD=<YOUR_REDDIT_PASSWORD>
SUPABASE_KEY=<YOUR_SUPABASE_KEY>
SUPABASE_URL=<YOUR_SUPABASE_URL>
import os
import praw
reddit = praw.Reddit(
username = os.environ.get('REDDIT_USERNAME'),
password = os.environ.get('REDDIT_PASSWORD'),
client_id = os.environ.get('API_CLIENT'),
client_secret = os.environ.get('API_SECRET'),
user_agent = "Scooby Searcher Bot"
)
import os
import praw
reddit = praw.Reddit(
username = os.environ.get('REDDIT_USERNAME'),
password = os.environ.get('REDDIT_PASSWORD'),
client_id = os.environ.get('API_CLIENT'),
client_secret = os.environ.get('API_SECRET'),
user_agent = "Scooby Searcher Bot"
)
import os
import praw
reddit = praw.Reddit(
username = os.environ.get('REDDIT_USERNAME'),
password = os.environ.get('REDDIT_PASSWORD'),
client_id = os.environ.get('API_CLIENT'),
client_secret = os.environ.get('API_SECRET'),
user_agent = "Scooby Searcher Bot"
)
text = svg.selectAll('.percentRank')
.data(percentileData)
.enter()
.append('text')
.attr('class', 'percentRank')
.attr('x', d => getTextXValue(d.cx))
.attr('y', d => d.cy + 3)
.text(d => Math.floor((d.cx/150)*100))
.attr('font-weight', 'bolder')
.attr('font-size', '.7rem')