Skip to content

Instantly share code, notes, and snippets.

View Cdaprod's full-sized avatar
🫠
Learn something new everyday!

David Cdaprod

🫠
Learn something new everyday!
View GitHub Profile
@Cdaprod
Cdaprod / yt-oai-tagging-and-extraction-langchain.ipynb
Created August 15, 2023 15:32
YT OAI Tagging and Extraction Langchain.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Cdaprod
Cdaprod / yt-babyagi.ipynb
Created August 18, 2023 19:51
yt-babyagi.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Cdaprod
Cdaprod / keys_extension_readme.ipynb
Last active August 21, 2023 18:23
Python Extension - Local Env Loader using IPython Magic
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Cdaprod
Cdaprod / AirtableToWeaviateChatVectorDBChain.py
Last active September 5, 2023 05:47
This is a demo script for an Airtable to Weaviate ChatVectorDBChain QA Agent with Chat History
#!/usr/local/bin/python
import logging
import weaviate
import langchain
from langchain.document_loaders import AirtableLoader
from langchain.vectorstores.weaviate import Weaviate
from langchain.llms import OpenAI
from langchain.chains import ChatVectorDBChain
from llama_index.langchain_helpers.agents import IndexToolConfig, LlamaIndexTool, create_llama_chat_agent
@Cdaprod
Cdaprod / LangchainIndexingTool.py
Created September 7, 2023 18:17
This Langchain Tool is for indexing objects via Supabase Postgres as well as Weaviate Database using the weaviate-client.
from functools import wraps
import logging
from supabase_py import create_client
from weaviate import Client, AuthClientSecret
import os
# BaseTool class
class BaseTool:
def execute(self, input_data: str) -> str:
pass
@Cdaprod
Cdaprod / post.py
Created September 7, 2023 18:59
A Flask App for posting to social media platforms via POST request
from flask import Flask, jsonify
import logging
from airtable import Airtable
from twitter_api import TwitterAPI # This is a placeholder, replace it with the actual Twitter API library you are using
from linkedin_api import LinkedinAPI # This is a placeholder, replace it with the actual Linkedin API library you are using
from facebook_api import FacebookAPI # This is a placeholder, replace it with the actual Facebook API library you are using
app = Flask(__name__)
@Cdaprod
Cdaprod / YouTubeShortsAirtableScript.py
Last active January 16, 2025 12:28
This is a custom Langchain tool to pass to an agent, for building YouTubeShorts with a tool like Canva.
import requests
import openai
from pydantic import BaseModel, Field
from langchain.tools import tool
AIRTABLE_BASE_ID = "your_airtable_base_id"
AIRTABLE_API_KEY = "your_airtable_api_key"
TABLE = "your_airtable_table"
MODEL_NAME = "gpt-3.5-turbo-0613"
@Cdaprod
Cdaprod / TableToWeaviateClassTool.py
Created September 7, 2023 23:08
A custom Langchain Tool for converting a table to a Weaviate Schema
from langchain.agents import AgentType, initialize_agent
from langchain.chat_models import ChatOpenAI
from langchain.tools import BaseTool
from typing import Optional, Type
from langchain.callbacks.manager import (
AsyncCallbackManagerForToolRun,
CallbackManagerForToolRun,
)
class TableToWeaviateClassTool(BaseTool):
@Cdaprod
Cdaprod / Dotfiles_Websocket.ipynb
Created September 12, 2023 06:38
A basic WebSocket server script that listens for incoming connections, receives Python code, executes it, and sends back the results.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Cdaprod
Cdaprod / WarpScreenRecordingPrespective.ipynb
Created September 12, 2023 20:21
WarpScreenRecordingPrespective - A Python script to warp the perspective of a screen recording and superimpose it onto a dynamic video background.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.