Skip to content

Instantly share code, notes, and snippets.

View janduplessis883's full-sized avatar
🎯
Focusing

Jan du Plessis janduplessis883

🎯
Focusing
  • London
  • 14:09 (UTC)
View GitHub Profile
@janduplessis883
janduplessis883 / app.css
Created August 23, 2026 15:09
Great Colours and CSS for Website Modern Keep
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f7f7f5;--card:#fff;--ink:#171717;--muted:#777;--line:#e7e6e2;--accent:#2e4737;--soft:#eef1ec;--danger:#a33d32}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Manrope,system-ui,sans-serif}.topbar{height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 5vw;gap:48px;background:rgba(247,247,245,.92);position:sticky;top:0;z-index:3;backdrop-filter:blur(14px)}.brand{font-weight:800;letter-spacing:-.04em;font-size:18px;color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:9px}.brand em{color:#829480;font-style:normal}.brand-mark{height:28px;width:28px;border-radius:9px;display:grid;place-items:center;background:var(--accent);color:white;font-size:15px}.nav{display:flex;gap:26px;height:100%;align-items:center}.nav a,.account-nav>a{font-size:13px;color:var(--muted);text-decoration:none
We couldn’t find that file to show.
@janduplessis883
janduplessis883 / config.toml
Created January 30, 2026 18:28
Streamlit Full Theme Code
# Apple-inspired Streamlit Theme
# Uses Inter (similar to SF Pro) and JetBrains Mono for code
# Apple's design language: clean, minimalist, elegant with generous white space
[theme]
primaryColor = "#0071e3"
backgroundColor = "#ffffff"
secondaryBackgroundColor = "#f5f5f7"
codeBackgroundColor = "#fbfbfd"
textColor = "#1d1d1f"
@janduplessis883
janduplessis883 / theme.toml
Last active November 18, 2025 06:22
streamlit_custom_theme
[theme]
# The theme that your custom theme inherits from.
#
# This can be one of the following:
# - "light": Streamlit's default light theme.
# - "dark": Streamlit's default dark theme.
# - A local file path to a TOML theme file: A local custom theme, like
# "themes/custom.toml".
# - A URL to a TOML theme file: An externally hosted custom theme, like
@janduplessis883
janduplessis883 / dataset.py
Created November 11, 2025 13:56
SetFit Synthetic Dataset
# Healthcare Feedback Dataset for SetFit
# 90 examples (15 per class) - suitable for few-shot learning
# Optimized label names for ML
LABEL_MAPPING = {
0: "access_availability",
1: "information_provision",
2: "privacy_confidentiality",
3: "continuity_care",
4: "clinical_communication",
import spacy
from spacy.matcher import Matcher
import math
import pandas as pd
# ============================================================================
# Installation Requirements:
# 1. pip install spacy
# 2. python -m spacy download en_core_web_sm
# ============================================================================
@janduplessis883
janduplessis883 / data.py
Created November 5, 2025 20:59
Project Noema
import math
import os
import re
from nltk import pos_tag, word_tokenize
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import pairwise_distances
import warnings
warnings.filterwarnings("ignore")
import matplotlib.pyplot as plt
@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 / 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."