<commit_before>import { memo, useCallback } from "react"
import { render } from "react-dom"
import create from "zustand"
import shallow from "zustand/shallow"

const useStore = create((set) => ({
	data: [],
	selected: null,
	run: () => set({ data: buildData(1000) }),
	runLots: () => set({ data: buildData(10000) }),
	add: () => set((state) => ({ data: [...state.data, buildData(1000)] })),
	update: () =>
		set((state) => {
			let newData = state.data.slice(0)
			for (let i = 0, len = newData.length; i < len; i += 10) {
				const r = newData[i]

				newData[i] = { id: r.id, label: r.label + " !!!" }
			}

			return { data: newData }
		}),
	clear: () => set({ data: [] }),
	swapRows: () =>
		set((state) => {
			const d = state.data.slice(0)<commit_msg>fix add<commit_after>import { memo, useCallback } from "react"
import { render } from "react-dom"
import create from "zustand"
import shallow from "zustand/shallow"

const useStore = create((set) => ({
	data: [],
	selected: null,
	run: () => set({ data: buildData(1000) }),
	runLots: () => set({ data: buildData(10000) }),
	add: () => set((state) => ({ data: [...state.data, ...buildData(1000)] })),
	update: () =>
		set((state) => {
			let newData = state.data.slice(0)
			for (let i = 0, len = newData.length; i < len; i += 10) {
				const r = newData[i]

				newData[i] = { id: r.id, label: r.label + " !!!" }
			}

			return { data: newData }
		}),
	clear: () => set({ data: [] }),
	swapRows: () =>
		set((state) => {
			const d = state.data.slice(0)
{'fraction_non_alphanumeric': 0.22303110522832562, 'fraction_numerical': 0.02382528127068167, 'mean_word_length': 3.357348703170029, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3620329', 'n_tokens_mistral': 625, 'n_tokens_neox': 563, 'n_words': 140}