mirror of
https://github.com/developersIndia/deviras.git
synced 2024-11-08 13:42:34 +05:30
made some changes to main.py
This commit is contained in:
parent
233be593e3
commit
c5d9651101
27
main.py
27
main.py
@ -2,30 +2,18 @@ import praw
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
import json
|
||||
|
||||
titles = [
|
||||
"ranting about jira",
|
||||
"siting in a meeting",
|
||||
"squashing bugs",
|
||||
"centering divs",
|
||||
"waiting for staging deployment",
|
||||
"writing tests",
|
||||
"pushing directly to prod",
|
||||
"doing code review",
|
||||
"deleting jira tickets",
|
||||
"Creating a pull request",
|
||||
"forgot to run DB migrations",
|
||||
"Broke production",
|
||||
"running on staging ENV",
|
||||
"merging git branches",
|
||||
"releasing the MVP",
|
||||
"finding JIRA tickets"
|
||||
]
|
||||
with open('dataset.json', 'r') as f:
|
||||
data = json.load(f)
|
||||
|
||||
titles = data['titles']
|
||||
|
||||
client_id = os.environ["REDDIT_CLIENT_ID"]
|
||||
client_secret = os.environ["REDDIT_CLIENT_SECRET"]
|
||||
reddit_pass = os.environ["REDDIT_PASSWORD"]
|
||||
|
||||
|
||||
def get_titles():
|
||||
currentlyViewingText, subscribersText = random.sample(titles, 2)
|
||||
return [currentlyViewingText, subscribersText]
|
||||
@ -53,4 +41,5 @@ def update_titles():
|
||||
widgets.refresh()
|
||||
widgets.id_card.mod.update(subscribersText=titles[1])
|
||||
|
||||
update_titles()
|
||||
|
||||
update_titles()
|
||||
|
Loading…
Reference in New Issue
Block a user