This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import discord | |
import os | |
from dotenv import load_dotenv | |
load_dotenv() | |
reddit = praw.Reddit( | |
client_id=os.getenv('API_CLIENT'), | |
client_secret=os.getenv('API_SECRET'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import os | |
import requests | |
import pandas as pd | |
from dotenv import load_dotenv | |
load_dotenv() | |
reddit = praw.Reddit( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib.request | |
import re | |
import urllib | |
import praw | |
import os | |
from dotenv import load_dotenv | |
load_dotenv() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import os | |
from dotenv import load_dotenv | |
load_dotenv() | |
reddit = praw.Reddit( | |
client_id=os.getenv('API_CLIENT'), | |
client_secret=os.getenv('API_SECRET'), | |
password=os.getenv('REDDIT_PASSWORD'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import whisper | |
import pytube | |
import requests | |
def whisperMagic(url): | |
r = requests.get(url) | |
status = "Video unavailable" in r.text | |
if status == False: | |
data = pytube.YouTube(url) | |
audio = data.streams.get_audio_only() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the current page URL | |
var currentURL = window.location.href; | |
// Replace the protocol with 'https://12ft.io/' | |
var modifiedURL = currentURL.replace(/^https?:\/\//i, 'https://12ft.io/'); | |
// Create a new <a> element | |
var link = document.createElement('a'); | |
// Set the href attribute of the <a> element to the modified URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain import OpenAI | |
from langchain.chains import RetrievalQA | |
from langchain.embeddings.openai import OpenAIEmbeddings | |
from langchain.text_splitter import RecursiveCharacterTextSplitter | |
from langchain.vectorstores import Chroma | |
from langchain.document_loaders import TextLoader | |
import os | |
os.environ["OPENAI_API_KEY"] = '' | |
vectordb_directory = 'db' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain.agents.agent_toolkits import create_python_agent | |
from langchain.tools.python.tool import PythonREPLTool | |
from langchain.python import PythonREPL | |
from langchain.llms.openai import OpenAI | |
from langchain.agents import load_tools | |
from langchain.utilities import BashProcess | |
bash = BashProcess() | |
agent_executor = create_python_agent( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain.agents.agent_toolkits import create_python_agent | |
from langchain.tools.python.tool import PythonREPLTool | |
from langchain.python import PythonREPL | |
from langchain.llms.openai import OpenAI | |
import os | |
os.ENVIRON['OPENAI_API_KEY'] = "sk-xxxxxxxxxxxxxxx" | |
agent_executor = create_python_agent( | |
llm=OpenAI(temperature=0, max_tokens=1000), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are submission Keywords that are Filtered | |
type: submission | |
~title+body+url (includes-word, regex): ['r/mysub', 'r/my-sub', 'my sub', 'my name'] | |
title+body+url (includes-word, regex): ['/?r/\w+','war', 'ban'] | |
moderators_exempt: true | |
action: filter | |
action_reason: "Words not allowed: {{match}}" |
NewerOlder