Skip to content

Instantly share code, notes, and snippets.

View janduplessis883's full-sized avatar

Jan du Plessis janduplessis883

  • London
  • 00:14 (UTC +01:00)
View GitHub Profile
@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
@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 / 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 / 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 / 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 / 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@janduplessis883
janduplessis883 / jupyter_notebook_theme.css
Created December 14, 2023 17:20
Custom Jupyter Notebook Theme based on Pop Lite
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
.CodeMirror pre, .CodeMirror-dialog, .CodeMirror-dialog .CodeMirror-search-field, .terminal-app .terminal {
font-family: 'Inter';
font-size: 12pt;
}
body {
font-family: 'Inter', sans-serif !important;
color: #263333; /* change to the color you want */
}
h1 {
@janduplessis883
janduplessis883 / custom.css
Created June 30, 2023 22:58
POP Light Theme for Jupyter Notebook
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
.CodeMirror pre, .CodeMirror-dialog, .CodeMirror-dialog .CodeMirror-search-field, .terminal-app .terminal {
font-family: 'Inter';
font-size: 12pt;
}
body {
font-family: 'Inter', sans-serif !important;
color: #263333; /* change to the color you want */
}
h1 {