Skip to content

Instantly share code, notes, and snippets.

@NikhilVerma
NikhilVerma / App.vue.ts
Created August 21, 2023 13:57
Volar generated virtual file for App.vue
/**
// App.vue
<script setup lang="ts">
import HelloWorld from "./components/HelloWorld.vue";
import Header from "./components/Header.vue";
import HeaderAlt from "./components/HeaderAlt.vue";
const isAlternateHeader = Math.random() > 0.5;
const items = [1, 2, 3];
@NikhilVerma
NikhilVerma / thresholdClusteringWithAdaptiveSimilarity.ts
Last active December 13, 2024 06:29
thresholdClusteringWithAdaptiveSimilarity
import { cos_sim } from "@huggingface/transformers";
export type ClusteringSentence = {
str: string;
embedding: number[];
};
export function thresholdClusteringWithAdaptiveSimilarity(
data: ClusteringSentence[],
minSimilarityThreshold: number,