mirror of
https://github.com/developersIndia/deviras.git
synced 2024-12-02 03:31:33 +05:30
made the required change
This commit is contained in:
parent
c5d9651101
commit
13ca61590f
37
dataset.json
37
dataset.json
@ -1,21 +1,20 @@
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"titles" : [
|
"titles": [
|
||||||
"ranting about jira",
|
"ranting about jira",
|
||||||
"siting in a meeting",
|
"siting in a meeting",
|
||||||
"squashing bugs",
|
"squashing bugs",
|
||||||
"centering divs",
|
"centering divs",
|
||||||
"waiting for staging deployment",
|
"waiting for staging deployment",
|
||||||
"writing tests",
|
"writing tests",
|
||||||
"pushing directly to prod",
|
"pushing directly to prod",
|
||||||
"doing code review",
|
"doing code review",
|
||||||
"deleting jira tickets",
|
"deleting jira tickets",
|
||||||
"Creating a pull request",
|
"Creating a pull request",
|
||||||
"forgot to run DB migrations",
|
"forgot to run DB migrations",
|
||||||
"Broke production",
|
"Broke production",
|
||||||
"running on staging ENV",
|
"running on staging ENV",
|
||||||
"merging git branches",
|
"merging git branches",
|
||||||
"releasing the MVP", "finding JIRA tickets"
|
"releasing the MVP",
|
||||||
]
|
"finding JIRA tickets"
|
||||||
|
]
|
||||||
}
|
}
|
11
main.py
11
main.py
@ -4,21 +4,18 @@ import random
|
|||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
|
|
||||||
with open('dataset.json', 'r') as f:
|
|
||||||
data = json.load(f)
|
|
||||||
|
|
||||||
titles = data['titles']
|
|
||||||
|
|
||||||
client_id = os.environ["REDDIT_CLIENT_ID"]
|
client_id = os.environ["REDDIT_CLIENT_ID"]
|
||||||
client_secret = os.environ["REDDIT_CLIENT_SECRET"]
|
client_secret = os.environ["REDDIT_CLIENT_SECRET"]
|
||||||
reddit_pass = os.environ["REDDIT_PASSWORD"]
|
reddit_pass = os.environ["REDDIT_PASSWORD"]
|
||||||
|
|
||||||
|
|
||||||
def get_titles():
|
def get_titles():
|
||||||
|
with open('dataset.json', 'r') as f:
|
||||||
|
data = json.load(f)
|
||||||
|
|
||||||
|
titles = data['titles']
|
||||||
currentlyViewingText, subscribersText = random.sample(titles, 2)
|
currentlyViewingText, subscribersText = random.sample(titles, 2)
|
||||||
return [currentlyViewingText, subscribersText]
|
return [currentlyViewingText, subscribersText]
|
||||||
|
|
||||||
|
|
||||||
def update_titles():
|
def update_titles():
|
||||||
reddit = praw.Reddit(
|
reddit = praw.Reddit(
|
||||||
client_id=client_id,
|
client_id=client_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user