Skip to content

Instantly share code, notes, and snippets.

@kmedved
kmedved / contemplative-llms.txt
Created January 6, 2025 21:03 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@kmedved
kmedved / weighted_chaterjee.py
Created April 29, 2022 16:07 — forked from bbstats/weighted_chaterjee.py
weighted_chaterjee.py
from scipy.stats import rankdata
import numpy as np
def weighted_chaterjee_correlation(x, y, sample_weight=None):
"""x and y must be 1d, probably"""
n = x.size
rk_x = rankdata(x, method="average")
rk_y = rankdata(y, method="average")
@kmedved
kmedved / hebo_patch.py
Created January 4, 2022 21:30 — forked from bbstats/hebo_patch.py
Simple patch of HEBO to support sample weights (via fit_params argument)
# requirements to pip install:
#
# numpy
# pandas
# sklearn
# HEBO
#
#
import numpy as np
import pandas as pd
@kmedved
kmedved / useful_pandas_snippets.md
Created December 13, 2020 03:49 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.