Skip to content

Instantly share code, notes, and snippets.

View janduplessis883's full-sized avatar

Jan du Plessis janduplessis883

  • London
  • 18:51 (UTC +01:00)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@janduplessis883
janduplessis883 / 01_Embedding_Data_From_A_Pandas_DataFrame_Chroma_LangChain_Ollama.py
Last active January 30, 2025 13:53
Embedding Data from a Pandas DataFrame into a Chroma Vector Database using LangChain and Ollama
import pandas as pd
from langchain.schema import Document
from langchain_community.embeddings import OllamaEmbeddings
from langchain_community.vectorstores import Chroma
from tqdm import tqdm
@janduplessis883
janduplessis883 / README.txt
Last active May 2, 2024 02:51
Pinecone Preprocessing Data for Vector Database
In this walkthrough we will see how to use Pinecone for semantic search.
@janduplessis883
janduplessis883 / DataPreprocessingTool.py
Created May 6, 2024 21:16 — forked from Cdaprod/DataPreprocessingTool.py
Langchain tool for preprocessing text data. Version one million nine-hundred and fifty two 😂 jk version 1
import spacy
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from langchain.tools import BaseTool
from typing import Optional, Union, List
from langchain.callbacks.manager import CallbackManagerForToolRun, AsyncCallbackManagerForToolRun
class DataPreprocessingTool(BaseTool):
name = "DataPreprocessingTool"
description = "A tool for preprocessing and structuring unstructured data."
@janduplessis883
janduplessis883 / Association Rule Mining in Python Tutorial.ipynb
Last active May 8, 2024 14:26
Association Rule Mining in Python Tutorial
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@janduplessis883
janduplessis883 / research_eoi.py
Created December 30, 2024 14:12
CrewAI FileReadTool() - error
import toml
import pandas as pd
import textwrap
import yaml
from crewai import Agent, Task, Crew, Process, LLM
from crewai.knowledge.source.string_knowledge_source import StringKnowledgeSource
from crewai.knowledge.source.pdf_knowledge_source import PDFKnowledgeSource
# Create a knowledge source
from crewai_tools import PDFSearchTool, FileReadTool
@janduplessis883
janduplessis883 / custom_tools.py
Created January 7, 2025 02:14
crewAI Notion Integration Tools
import toml
from crewai_tools import BaseTool
from typing import ClassVar, Union, Dict, Any, List
import requests
# Load the TOML file
with open("notioncrew/config_secrets.toml", "r") as f:
config_secrets = toml.load(f)
# Load environment variables from streamlit secrets