text
stringlengths
3
8.33k
repo
stringclasses
52 values
path
stringlengths
6
141
language
stringclasses
35 values
sha
stringlengths
64
64
chunk_index
int32
0
273
n_tokens
int32
1
896
from __future__ import annotations from collections.abc import Mapping from pathlib import Path import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.model_selection import GroupShuffleSplit from . import config def _as_indices(values: np.ndar...
mlpc_task_4
src/splits.py
Python
887dec25b325ea2d524a3c02e7571a35ff462ef018fc20c290eeb3a193436dd3
0
896
row[f"{split_name}_total"] = total row[f"{split_name}_rate"] = float(positives / total) if total else 0.0 rows.append(row) return pd.DataFrame(rows) def save_splits( splits: Mapping[str, np.ndarray], path: Path | str | None = None, ) -> None: output = Path(path) if path is not None...
mlpc_task_4
src/splits.py
Python
1b56a723958cf7e139c2e1f98ddaf305c5c84befeb3145b3a95936b9aced7641
1
504
from __future__ import annotations import itertools import time import warnings from collections.abc import Iterable from pathlib import Path from typing import Any import joblib import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import pandas as pd from joblib import paralle...
mlpc_task_4
src/train_lr.py
Python
4105ff3f70fe2578a87d258a9caff7185c5f61bb602878b74fc722ff7278d356
0
896
| None = None, max_iter: int = 2000, n_jobs: int = 1, parallel_backend_name: str | None = None, ) -> pd.DataFrame: dataset = data if data is not None else load_preprocessed() x = np.asarray(dataset.get("features_scaled", dataset.get("features")), dtype=np.float32) y = np.asarray(dataset["labels"...
mlpc_task_4
src/train_lr.py
Python
7e16374f7bb207116d0e60c0a475ade8724694b95438f11128febfbdde3f4fb9
1
896
"C") ax.set_title("LR validation macro AP") fig.colorbar(image, ax=ax, label="macro AP") fig.tight_layout() fig.savefig(output, dpi=180) plt.close(fig) def main() -> None: sweep_lr() plot_lr_sweep() if __name__ == "__main__": main()
mlpc_task_4
src/train_lr.py
Python
23d09d4f6e843f075fc57d04ef128bf58de2a39cd7211441fe5098db579ff857
2
78
from __future__ import annotations import itertools import time from collections.abc import Iterable from pathlib import Path from typing import Any import joblib import numpy as np import pandas as pd from sklearn.neural_network import MLPClassifier from . import config from .metrics import macro_ap, micro_ap, per_...
mlpc_task_4
src/train_mlp.py
Python
56a45121b8bf9b4c9917e1faaed70aa7ccbc0adf92d1b7be37df11ba93a505bb
0
896
[-1], int(out_dim))) self.net = torch_nn.Sequential(*layers) def forward(self, x: Any) -> Any: return self.net(x) else: TorchMLP = None def positive_class_weights(labels: np.ndarray, max_weight: float = 20.0) -> np.ndarray: y = np.asarray(labels, dtype=np.float32) positiv...
mlpc_task_4
src/train_mlp.py
Python
9221010ef6f8b56e221013221b55c90e89b622c8ad7c41a2fb2bcd460c16bc47
1
896
.ndarray, y_val: np.ndarray, hidden_dims: Iterable[int], dropout: float, lr: float, epochs: int = config.MLP_EPOCHS, batch_size: int = config.MLP_BATCH, patience: int = config.MLP_PATIENCE, seed: int = config.SEED, model_path: Path | str | None = None, ) -> tuple[MLP, np.ndarray, dic...
mlpc_task_4
src/train_mlp.py
Python
eefc5d09e67f6a2a377218a24b7a9dfc31eb4391242f9532dc577f85472fff59
2
896
.AdamW(model.parameters(), lr=float(lr), weight_decay=1e-4) pos_weight = torch.from_numpy(positive_class_weights(y_train)).to(device) criterion = torch_nn.BCEWithLogitsLoss(pos_weight=pos_weight) history: list[dict[str, float]] = [] best_macro = -np.inf best_scores: np.ndarray | None = None bes...
mlpc_task_4
src/train_mlp.py
Python
8d2cf1fdd237901722b4456dc284346bd36adbd702f0d13a29d42b0214a2f1e5
3
896
np.ndarray, x_val: np.ndarray, y_val: np.ndarray, hidden_dims: Iterable[int], dropout: float, lr: float, epochs: int = config.MLP_EPOCHS, batch_size: int = config.MLP_BATCH, patience: int = config.MLP_PATIENCE, seed: int = config.SEED, model_path: Path | str | None = None, ) -> t...
mlpc_task_4
src/train_mlp.py
Python
a0d7e93b537ef43ad9e3b68fbb7fd6dbac114ed04c45c86392f5c5671d565f66
4
896
/{len(grid_rows)} " f"hidden_dims={params['hidden_dims']} dropout={params['dropout']} lr={params['lr']}" ) candidate_path = model_output if len(grid_rows) == 1 else None model, val_scores, metrics = train_one( x[train_idx], y[train_idx], x[val_idx]...
mlpc_task_4
src/train_mlp.py
Python
fe00a26894d2bf67c14190d579c3fa11c35beca9294fb2467466632ef24b8c47
5
558
import numpy as np import pandas as pd import pytest from src import config from src.data import ( aggregate_labels, build_dataset, concat_features, load_annotations, load_metadata, ) def test_config_class_names_are_alphabetical(): assert config.NUM_CLASSES == 15 assert config.CLASS_NAMES...
mlpc_task_4
tests/test_data.py
Python
4ddbd4f4bdb0810064d87d3f9cfef050516a92b7ef60ba77ab45f48623ad9821
0
896
test_aggregate_labels_masks_nan_annotator(): annotations = np.array([[[0.8, np.nan]], [[0.1, np.nan]]], dtype=np.float32) labels = aggregate_labels(annotations) expected = np.array([[1], [0]], dtype=np.uint8) np.testing.assert_array_equal(labels, expected) def test_aggregate_labels_masks_all_zero_in...
mlpc_task_4
tests/test_data.py
Python
c33bdfbcbb50ae0e39a029b9a9ba2faf7b6519c7e9274ab814af2e2dd5ad691c
1
665
import json import numpy as np from src.final_eval import ( build_final_table, plot_case_study, select_case_studies, write_case_study_notes, ) def test_build_final_table_compares_baseline_lr_and_mlp(tmp_path): baseline_path = tmp_path / "baseline.json" predictions_path = tmp_path / "predicti...
mlpc_task_4
tests/test_final_eval.py
Python
b2831f92da2381a6c7109f807569f51db56b735440ca97a3ca8e505ac71f4202
0
681
import json import numpy as np import pandas as pd from src import config from src.baseline import class_prior_baseline_scores, evaluate_baseline, run_baseline from src.metrics import best_threshold_f1, macro_ap, micro_ap, per_class_ap, per_class_f1_at_optimal from src.preprocess import ( add_temporal_context, ...
mlpc_task_4
tests/test_phase2.py
Python
5dab453991c32be4473249a570ad7c24c58bd121fc2198a998b9229a007fc03e
0
896
np.testing.assert_allclose(contextual[1], np.array([1.0, 2.0, 0.0])) np.testing.assert_allclose(contextual[2], np.array([0.0, 10.0, 0.0])) def test_per_file_iou_and_high_agreement_mask(): annotations = np.array( [ [ [[1.0, 1.0], [1.0, 0.0]], [[0.0, 0.0], [1....
mlpc_task_4
tests/test_phase2.py
Python
833b326dd9df0e602dcf50cf7c71235f86a3497cf1fd2771e8209f3feaa0a562
1
840
import numpy as np import pandas as pd from src.train_lr import fit_one, plot_lr_sweep, sweep_lr def _synthetic_lr_data(): x = np.array( [ [0.0, 0.0], [0.2, 0.1], [1.0, 1.0], [1.2, 1.1], [0.0, 1.0], [0.1, 1.2], [1.0, 0.0]...
mlpc_task_4
tests/test_train_lr.py
Python
7afb85a92bfc2d266492ec4ee4f5f7263bea37fb80379d1f684c3abc00c7b70f
0
683
import joblib import numpy as np from src.train_mlp import ( HAS_MLX, MLP, _train_one_sklearn, positive_class_weights, predict_proba, sweep_mlp, train_one, ) def _synthetic_mlp_data(): x = np.array( [ [0.0, 0.0], [0.1, 0.2], [1.0, 1.0], ...
mlpc_task_4
tests/test_train_mlp.py
Python
d868df85ab15922431e857f2f484b70a096c3e73ed912d3d423f761f8c158d84
0
896
[data["train_idx"]], data["features_context"][data["val_idx"]], data["labels"][data["val_idx"]], hidden_dims=[4], dropout=0.0, lr=1e-2, epochs=2, batch_size=4, patience=2, model_path=model_path, ) assert model_path.exists() assert jobl...
mlpc_task_4
tests/test_train_mlp.py
Python
72110661a07e3b612da7cb96bc59706fb5dcbd131a5ed6e95864ce291e83533a
1
115
/** @type {import('next').NextConfig} */ const nextConfig = { images: { remotePatterns: [ { protocol: "https", hostname: "images.unsplash.com", port: "", }, { protocol: "https", hostname: "imagedelivery.net", port: "", }, ], }, }; expo...
mystahd
next.config.mjs
JavaScript
7e4cd1a8fccb5e112dc4cd88f3d831c27eb28b5108cc83f5cd89756e0234f5cf
0
83
{ "name": "shadowoverlay", "version": "1.0.0", "private": false, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "@headlessui/react": "^1.7.18", "@hookform/resolvers": "^3.3.4", "@radix-ui/react-alert-dialog":...
mystahd
package.json
JSON
09a9e42dfac901a9ccf4fa3a99fb0c9f495aec66f555dc99cbd5b5fa45bbaf9a
0
594
import type { Config } from "tailwindcss"; const colors = require("tailwindcss/colors"); const { default: flattenColorPalette, } = require("tailwindcss/lib/util/flattenColorPalette"); const config = { darkMode: ["class"], content: [ "./pages/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}", "./app/**/*....
mystahd
tailwind.config.ts
TypeScript
ed4485429217d5c676fc6b582df447ab0fbdba140441007852c64368096cab1c
0
896
: any) { let allColors = flattenColorPalette(theme("colors")); let newVars = Object.fromEntries( Object.entries(allColors).map(([key, val]) => [`--${key}`, val]) ); addBase({ ":root": newVars, }); } export default config;
mystahd
tailwind.config.ts
TypeScript
a473699dd6395fd338cf48d964d0d660de5e62b6cd371ead10f736942b3f804a
1
75
"use server"; import { SupportTicketSchema } from "@/lib/validations/support"; import { z } from "zod"; export const actionSubmitSupportTicket = async ( data: z.infer<typeof SupportTicketSchema> ) => { const { title, content, fullName, email } = data; const { DISCORD_WEBHOOK_URL } = process.env; if (!DISCORD...
mystahd
actions/discord.ts
TypeScript
c2873fa6c70b3a8aed12c8f711e1a46f0401785b9d89933f846b7a06aa4f530b
0
252
"use server"; import { CartItem } from "@/lib/provider/shopping-cart-context"; const { SELLIX_API_KEY } = process.env; export const getProducts = async (): Promise<{ error: string | null; data: StoreData | null; }> => { try { if (!SELLIX_API_KEY) { return { error: "Sellix API key is ...
mystahd
actions/sellix.ts
TypeScript
d541c5143c9841cad3eb8c36b9ffefd53a976155259d940053aaab96cd375b75
0
599
import "@/styles/globals.css"; import { Inter as FontSans } from "next/font/google"; import { cn } from "@/lib/utils"; import { Toaster } from "@/components/ui/sonner"; import Footer from "@/components/footer"; import Navbar from "@/components/header"; import { Provider } from "@/components/theme-provider"; const fon...
mystahd
app/layout.tsx
TypeScript
4de676a1b23c2d370fbcd778fcf666e2c709e4465be82454f135cc596b584508
0
233
import { Metadata } from "next"; export const metadata: Metadata = { title: "404 Not Found - Shadow Overlay", description: "Best Call Of Duty cheats", }; export default function NotFoundPage() { const navigations = [ { icon: ( <svg xmlns="http://www.w3.org/2000/svg" fill="n...
mystahd
app/not-found.tsx
TypeScript
5c20d31a5c4c233d0625d81a6130f80f856abe9906f6a635439c4f0533c0b8ab
0
896
"> Sorry, the page you are looking for could not be found or has been removed. </p> </div> <div className="mt-8"> <ul className="divide-y"> {navigations.map((item, idx) => ( <li key={idx} className="flex gap-x-4 py-6">...
mystahd
app/not-found.tsx
TypeScript
8e3f5229c006c89407526f0a5abb19609b38b895892dc2e665b5db2ea19f2c75
1
396
import Hero from "@/components/landing-page/hero"; import Features from "@/components/landing-page/features"; import CTA from "@/components/landing-page/cta"; import Pricing from "@/components/landing-page/pricing"; import Testimonial from "@/components/landing-page/testimonials"; import type { Metadata } from "next"; ...
mystahd
app/page.tsx
TypeScript
ff4dee546d534014c0499cfad4d0bc7e77815ffe0956285e2622e38bb8c761c9
0
196
import { StoreShell } from "@/components/store/shell"; interface RootLayoutProps { children: React.ReactNode; } export default function RootLayout({ children }: RootLayoutProps) { return <StoreShell>{children}</StoreShell>; }
mystahd
app/store/layout.tsx
TypeScript
b525fc3e6ca7c979bba48f077defbb7cda31ca508c5a7544a2f99479994dabcd
0
50
import Pricing from "@/components/landing-page/pricing"; import type { Metadata } from "next"; export const metadata: Metadata = { title: "Store - Shadow Overlay", description: "Best Call Of Duty cheats", }; export default function Store() { return ( <div> <Pricing title="Please select a category" /> ...
mystahd
app/store/page.tsx
TypeScript
a65a31d975f918905e3a4365d55a52d71ea781fafe9e9a46af5027b778caa753
0
84
"use client"; import { usePathname } from "next/navigation"; import ProductCatalog from "@/components/products/product-catalog"; import { notFound } from "next/navigation"; enum ProductCategory { ACCOUNTS = "accounts", CHEATS = "cheats", SERVICES = "services", } export default function Store() { const pathna...
mystahd
app/store/[categoryId]/page.tsx
TypeScript
3306769823e0d617dc4f0c8576af69098675ccd52992992485bb13748c7b44bc
0
150
import type { Metadata } from "next"; import SupportForm from "@/components/support/support-form"; export const metadata: Metadata = { title: "Support - Shadow Overlay", description: "Best Call Of Duty cheats", }; export default function Store() { return <SupportForm />; }
mystahd
app/support/page.tsx
TypeScript
1dcbfe661a672954b0036bbc5148579044706b93b86efe88d4f3e4a5dff8b2fc
0
67
"use client"; import React from "react"; import { motion } from "framer-motion"; import { cn } from "@/lib/utils"; export const BackgroundBeams = React.memo( ({ className }: { className?: string }) => { const paths = [ "M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875", "M-373 -197C-373 ...
mystahd
components/background-beams.tsx
TypeScript
e26dfd194540ca274fbdc1b000f1a881ce231b09728519775572a180963c6ddb
0
896
627", "M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619", "M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611", "M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603", "M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595", "M-128 -477C-128 -477 -60 -72 40...
mystahd
components/background-beams.tsx
TypeScript
7c373d2e2afcd12ae1d924f30c323316613bf1fa094cd7677b9a81f483eac0b9
1
896
285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -19...
mystahd
components/background-beams.tsx
TypeScript
f141e9c5ffaba880f391d35b0d573ac2710a9a39a0e7aad22a369b15ca8f1847
2
896
-57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 ...
mystahd
components/background-beams.tsx
TypeScript
f05b62af55e365d1c616f3a556879bb20f76998a702d277486346a49ed84d167
3
664
import Image from "next/image"; import Logo from "@/public/images/logo.gif"; const Brand = ({ ...props }) => ( <Image src={Logo} alt="ShadowOverlay logo" className="rounded-full" {...props} width={48} height={48} priority /> ); export default Brand;
mystahd
components/brand.tsx
TypeScript
3687dd244a7343385d684ac94becad95e47640b432db68d6c38754d2b9c0ebbd
0
83
"use client"; import PayPal from "@/public/images/paypal.webp"; import Bitcoin from "@/public/images/bitcoin.png"; import Image from "next/image"; const Footer = () => { const footerNavs = [ { href: "https://discord.gg/5Ws2CAvr3G", name: "About", }, { href: "/support", name: "Su...
mystahd
components/footer.tsx
TypeScript
8b83bb539828937ad883251824cf75db0fbf5df105dbfe8b82a7f64883f86706
0
523
interface GradientWrapperProps extends React.HTMLAttributes<HTMLDivElement> { wrapperClassName?: string; } const GradientWrapper = ({ children, ...props }: GradientWrapperProps) => ( <div {...props} className={`relative ${props.className || ""}`}> <div className={`absolute m-auto blur-[160px] ${props.wra...
mystahd
components/gradient-wrapper.tsx
TypeScript
e0de56e13f54a32c8b36e0aa456ff82f9f5be47bb3cabde83ef06e7b578697d3
0
168
"use client"; import Link from "next/link"; import { useEffect, useRef, useState } from "react"; import NavHeader from "@/components/nav-header"; import NavLink from "@/components/nav-link"; import { IconDownload, IconShoppingCart } from "./icons"; import { ShoppingCartSheet } from "./shopping-cart/shopping-cart-sheet...
mystahd
components/header.tsx
TypeScript
169b8739c07c1fd8cfbb6de7b77ac659cc6eb11b989479701a91009a59b3a86a
0
803
"use client"; import * as React from "react"; import { cn } from "@/lib/utils"; export function IconShoppingCart({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg strokeWidth={1} fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" stroke="cur...
mystahd
components/icons.tsx
TypeScript
9be47c41cccd033a5207b2532e37d0e2a1bf261126058852d26857e88554d842
0
896
#FBBC05" /> <path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335" /> </svg> ); } function IconHelp({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg ...
mystahd
components/icons.tsx
TypeScript
aa51df61174d43eb096d6ed33b06a213113333d7b80fe09cee625e93d40de6f0
3
896
" viewBox="0 0 256 256" fill="currentColor" className={cn("h-4 w-4", className)} {...props} > <path d="M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 ...
mystahd
components/icons.tsx
TypeScript
1e7102f98a458aa42a0da5ddd79a225803ae1704e5e24afec8d8c9404dc06284
5
896
<path d="M13.0001 13.9996H11.0001V17.9996H13.0001V13.9996Z" /> </g> </svg> ); } function IconArrowElbow({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" className={cn("h-4 w-4", c...
mystahd
components/icons.tsx
TypeScript
1bebb3c50c0193925d455c887a36e84a88c288c4560c07a966ca27e59ab70bd1
6
896
svg> ); } function IconRefresh({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" className={cn("h-4 w-4", className)} {...props} > <path d="M197.67 186.37a8 8 0 0 1 0 11.29C1...
mystahd
components/icons.tsx
TypeScript
085c839b09ba244d6307a098e083b2c208c1064ca9b448487dcec21771f9d68f
7
896
13.2835 21.797 13.1198 21.64 12.9999ZM12.14 19.6899C10.4618 19.6781 8.82821 19.1478 7.46301 18.1716C6.0978 17.1955 5.06768 15.8212 4.5137 14.237C3.95971 12.6528 3.90895 10.9361 4.36835 9.32191C4.82776 7.70773 5.77487 6.27501 7.08001 5.21991V5.48991C7.08266 8.17839 8.15183 10.756 10.0529 12.657C11.9539 14.5581 14.5315 1...
mystahd
components/icons.tsx
TypeScript
cb586537b58b7c40c36aaca7f8cf8d564b02aac56f9631be4ef27e44414f767e
8
896
4855 15.7503 18.2812 15.4809 18.9313 14.9837C19.5814 14.4864 20.0497 13.789 20.264 12.9991H23C23.2652 12.9991 23.5196 12.8937 23.7071 12.7062C23.8946 12.5187 24 12.2643 24 11.9991C24 11.7339 23.8946 11.4795 23.7071 11.292C23.5196 11.1044 23.2652 10.9991 23 10.9991ZM16.667 13.7491C16.3209 13.7491 15.9825 13.6465 15.6948...
mystahd
components/icons.tsx
TypeScript
d4fcd829ad549f1c8dcc1edef444120a30d301c0931a3831a786177bcb618998
9
896
-26.34-26.35a8 8 0 0 0-11.32 11.32Z" /> </svg> ); } function IconClose({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" className={cn("h-4 w-4", className)} {...props} > ...
mystahd
components/icons.tsx
TypeScript
7c9239f4018df219ad4a5ecaf8d888a23c53508ec5009bc6d2a5cb40bb933751
10
896
Z" /> </svg> ); } function IconExternalLink({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" className={cn("h-4 w-4", className)} viewBox="0 0 256 256" {...props} > <path d="M224 104a8 8 ...
mystahd
components/icons.tsx
TypeScript
574df7a6936be07d6e67b34304662bf535bf6277d95d7bcd892017f720f00b57
11
896
8.06087 0 7 0V0ZM9 7C9 7.53043 8.78929 8.03914 8.41421 8.41421C8.03914 8.78929 7.53043 9 7 9H4C3.46957 9 2.96086 8.78929 2.58579 8.41421C2.21071 8.03914 2 7.53043 2 7V4C2 3.46957 2.21071 2.96086 2.58579 2.58579C2.96086 2.21071 3.46957 2 4 2H7C7.53043 2 8.03914 2.21071 8.41421 2.58579C8.78929 2.96086 9 3.46957 9 4V7Z" /...
mystahd
components/icons.tsx
TypeScript
68040600a81a1762f969c1aeabaea13fc1afe300cfb6c7b81aeb6206f4754f0d
12
606
"use client"; import { cn } from "@/lib/utils"; import { useInView } from "framer-motion"; import { ReactElement, cloneElement, useRef } from "react"; interface LayoutEffectProps extends React.HTMLAttributes<HTMLDivElement> { isInviewState: { trueState: string; falseState: string; }; } const LayoutEffect...
mystahd
components/layout-effect.tsx
TypeScript
addc6159f3348de89ed288707d580789de84b3976643bd2f0d92a05edc3ba808
0
150
import Link from "next/link"; import Brand from "@/components/brand"; interface NavHeaderProps { onClick: () => void; state: boolean; menuBtnEl?: React.RefObject<HTMLButtonElement>; } const NavHeader = ({ onClick, state, menuBtnEl }: NavHeaderProps) => ( <div className="flex justify-between py-5 lg:block"> ...
mystahd
components/nav-header.tsx
TypeScript
1e44ac99701ab599dc4908e76b5101134de971a7169bf036c20663c5af059fd0
0
442
import Link from "next/link"; interface NavLinkProps extends React.HTMLAttributes<HTMLAnchorElement> { href: string; } const NavLink = ({ children, href, ...props }: NavLinkProps) => ( <Link href={href} {...props} className={`py-2.5 px-4 text-center rounded-full duration-150 ${ props?.className ...
mystahd
components/nav-link.tsx
TypeScript
fc63ba3a31e1798dc8b00e7300bf79b03c5ad2733af3f1d59e41444bea464f71
0
103
interface SectionWrapperProps extends React.HTMLAttributes<HTMLDivElement> {} const SectionWrapper = ({ children, ...props }: SectionWrapperProps) => ( <section {...props} className={`py-16 lg:py-24 ${props.className || ""}`}> {children} </section> ); export default SectionWrapper;
mystahd
components/section-wrapper.tsx
TypeScript
8be3bcd44e5fcafe283a08f0bd1a44e6a4843e28579467fd401384ce6e670351
0
75
"use client"; import * as React from "react"; import { type ThemeProviderProps } from "next-themes/dist/types"; import { ShoppingCartProvider } from "@/lib/provider/shopping-cart-context"; export function Provider({ children, ...props }: ThemeProviderProps) { return <ShoppingCartProvider>{children}</ShoppingCartPro...
mystahd
components/theme-provider.tsx
TypeScript
6ba62b518965dbb19d2eff7f774a2e923aef949f7807cabc52edc35a9c3fef4f
0
78
import GradientWrapper from "@/components/gradient-wrapper"; import Image from "next/image"; import NavLink from "@/components/nav-link"; import bgPattern from "@/public/images/bg-pattern.webp"; import LayoutEffect from "@/components/layout-effect"; const CTA = () => ( <section> <GradientWrapper wrapperClassName...
mystahd
components/landing-page/cta.tsx
TypeScript
24adc93c872da8c72311c38c639c5f24330ace2f5693eeb35a803a179446b7f2
0
536
import SectionWrapper from "@/components/section-wrapper"; import Feature1 from "@/public/images/Feature1.jpeg"; import Feature2 from "@/public/images/feature2.jpg"; import Image from "next/image"; const VisualFeatures = () => { const features = [ { title: "Choose between multiple plans", desc: "We o...
mystahd
components/landing-page/features.tsx
TypeScript
8409f679fe8140156c9546edc5390d4039affae5ab3752f64db583c2097d1dbe
0
567
"use client"; import GradientWrapper from "@/components/gradient-wrapper"; import NavLink from "@/components/nav-link"; import YouTube from "react-youtube"; import LayoutEffect from "@/components/layout-effect"; import { IconDiscord, IconExternalLink, IconTelegram } from "../icons"; const Hero = () => ( <section> ...
mystahd
components/landing-page/hero.tsx
TypeScript
574ca882e564ed274b7e559d6887b864013f7d8a724174ee2c898eaac21c1e92
0
476
"use client"; import { useState, useRef, Fragment } from "react"; import type { StaticImageData } from "next/image"; import { Dialog, Transition } from "@headlessui/react"; import Image from "next/image"; interface ModalVideoProps { thumb: StaticImageData; thumbWidth: number; thumbHeight: number; thumbAlt: st...
mystahd
components/landing-page/modal-video.tsx
TypeScript
82ab3c8e2d37a25237b872825daa6ac48ff6cce4dff49a4d87316a440919b7c3
0
896
videoHeight} loop controls > <source src={video} type="video/mp4" /> Your browser does not support the video tag. </video> </Dialog.Panel> </div> </Transition.Child> {/* ...
mystahd
components/landing-page/modal-video.tsx
TypeScript
976ab0cb0a8fc0ebc1f993b95654f738c2e489ad4d64076a480d41539e2b53bf
1
75
import LayoutEffect from "@/components/layout-effect"; import SectionWrapper from "@/components/section-wrapper"; import { Button, buttonVariants } from "../ui/button"; import Link from "next/link"; import { cn } from "@/lib/utils"; interface PricingPlanProps { title?: string; } const Pricing = ({ title }: PricingP...
mystahd
components/landing-page/pricing.tsx
TypeScript
fdd6ebe44abcdc727073e8b35b27ed863a1f6dc2ae262d3a0d2894e747c8fd75
0
896
010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" ></path> </svg> {featureItem} </li> ))} </ul> ...
mystahd
components/landing-page/pricing.tsx
TypeScript
a0ff9b4357a22f173f5dc3ff83638db0da0548181ea5471837b41d8c51205d8a
1
218
"use client"; import React from "react"; import GradientWrapper from "../gradient-wrapper"; import YouTube from "react-youtube"; const PromoVideo = () => { return ( <GradientWrapper className="mt-16 sm:mt-28" wrapperClassName="max-w-3xl h-[250px] top-12 inset-0 sm:h-[300px] lg:h-[650px]" > ...
mystahd
components/landing-page/promo-video.tsx
TypeScript
71c62847b17fc1a4aa42d5ddee2ff652c8d70768ce531504b12540f137766069
0
164
import SectionWrapper from "@/components/section-wrapper"; import GradientWrapper from "@/components/gradient-wrapper"; import user1 from "@/public/images/user1.png"; import user2 from "@/public/images/user2.jpg"; import user3 from "@/public/images/user3.webp"; import Image from "next/image"; import LayoutEffect from "...
mystahd
components/landing-page/testimonials.tsx
TypeScript
3ff385b8af95653a135726db6002b4a9ec3bb29964e50cb7796d44c2c26a0602
0
713
"use client"; import React from "react"; import { Button } from "../ui/button"; import { Badge } from "../ui/badge"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "../ui/dialog"; import ProductCard from "../products/product-card"; import...
mystahd
components/modals/add-product-to-cart-modal.tsx
TypeScript
a44b3b2049158fe3d4326ded4b967790870610f83df555a6b0f21f7dcc406dcb
0
553
"use client"; import React from "react"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { IconTrash } from "../icons"; imp...
mystahd
components/modals/clear-shopping-cart-modal.tsx
TypeScript
487cf048815b392b877cf4b3be1dc5c232ba2ac670ecd69d130d120433d10d73
0
262
import React from "react"; import { ScrollArea } from "../ui/scroll-area"; import Image from "next/image"; import { cn } from "@/lib/utils"; interface ProductModalContentProps { description: string; image: string | undefined; title: string; } const ProductModalContent = ({ description, image, title, }: Pr...
mystahd
components/modals/product-modal-content.tsx
TypeScript
cc94ea395a19146053094c677a5379465a4cb3cc338b1ff42521eb364e031f7c
0
274
"use client"; import React, { useState } from "react"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Button } from "../ui/button"; import { toast } from "sonner"; import { useRouter } from "next/navigat...
mystahd
components/modals/user-checkout-modal.tsx
TypeScript
1b648b199a7194afe3ee56fdad52c7af69feb04574e3989ec865192660891134
0
671
"use client"; import React, { useState } from "react"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Button } from "../ui/button"; import { toast } from "sonner"; import { useRouter } from "next/navigat...
mystahd
components/modals/user-email-modal.tsx
TypeScript
7e65806ee4ae772c39c8ef5fd51a9a64a4917adf01e16c88919e73d58a964865
0
656
import React from "react"; import { Badge } from "@/components/ui/badge"; import { ProductGrade } from "@/components/products/product-card"; interface ProductBadgesProps { product: Product; } const ProductBadges = ({ product }: ProductBadgesProps) => { if (!product) return null; const { grade, type, recurring_i...
mystahd
components/products/product-badges.tsx
TypeScript
2b50ab75d9114cc42e4f14187f01f4ffd3fe4655ae1e24490f070c962c3e3c46
0
584
import Image from "next/image"; import React from "react"; import { cn } from "@/lib/utils"; import ProductBadges from "./product-badges"; export enum ProductGrade { PREMIUM_PLUS, PREMIUM, ESP_ONLY, ACCOUNT, SERVICE, SPOOFER, } interface ProductCardProps { product: Product; disableAnimations?: boolean...
mystahd
components/products/product-card.tsx
TypeScript
86ca291b4f995a5a8d344519ee76dfe43fe9c7c863edd63fdbd7c841dc683c15
0
631
"use client"; import { useProducts } from "@/lib/hooks/use-products"; import React, { Suspense } from "react"; import ProductCard, { ProductGrade } from "./product-card"; import ProductSkeleton from "./product-skeleton"; import { useShoppingCart } from "@/lib/provider/shopping-cart-context"; import AddProductToCartMod...
mystahd
components/products/product-catalog.tsx
TypeScript
98002e48dc6f370883273aa3e590befa6cb27172f40aed742f137a6be93bf4b9
0
583
import React from "react"; import { Skeleton } from "../ui/skeleton"; const ProductSkeleton = () => { return ( <div className="flex flex-col space-y-3"> <div className="relative inline-block duration-300 ease-in-out transition-transform transform hover:-translate-y-2 w-full cursor-pointer"> <div cl...
mystahd
components/products/product-skeleton.tsx
TypeScript
0a71253a3f6a0be7d8116d9e802e0f9730de5848bcff086edbbeaf3831f1be87
0
510
import Image from "next/image"; import React from "react"; import { Button } from "../ui/button"; import { Badge } from "../ui/badge"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "../ui/dialog"; import { cn } from "@/lib/utils"; import ...
mystahd
components/shopping-cart/shopping-cart-item.tsx
TypeScript
6aff12d1e19c7b8ca61539d11aa49b582f6afa6d8c508c4fa16462b07b52a16b
0
531
"use client"; import { Button, buttonVariants } from "@/components/ui/button"; import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; import { IconShoppingCart, IconSpinner, IconSubmit } from "../icons"; import { useShoppingCart } from "@/lib/...
mystahd
components/shopping-cart/shopping-cart-sheet.tsx
TypeScript
4e91e6d4c5428e6bb78bebc99fbc9f8caf8eb9d3b09a81b59412063abc56e80e
0
710
import * as React from "react"; import { cn } from "@/lib/utils"; interface StoreShellProps extends React.HTMLAttributes<HTMLDivElement> {} export function StoreShell({ children, className, ...props }: StoreShellProps) { return ( <div className={cn(className)} {...props}> {children} </div> ); }
mystahd
components/store/shell.tsx
TypeScript
7266eaf3dcac8a4ecb43963c49c8b813036d574ec0d0a80921ef7e4df42bcae1
0
80
"use client"; import React, { useState } from "react"; import { Button } from "@/components/ui/button"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; import { SupportTicketSchema } from "@/lib/validatio...
mystahd
components/support/support-form.tsx
TypeScript
bbfae3cb59c67ed7f34aee0b0f2234219cba6ddc705dd4020e5a0ca947650c5d
0
896
({ field }) => ( <FormItem> <FormLabel>Message</FormLabel> <FormControl> <Textarea cols={4} maxLength={500} className="resize-none h-24" placeho...
mystahd
components/support/support-form.tsx
TypeScript
d5aac4c8aa9ac0766160d74def650ffbd5986eee76a39de96bd22db8fefd4bb9
1
261
import { ProductGrade } from "@/components/products/product-card"; import { getProducts } from "@/actions/sellix"; import { useState, useEffect } from "react"; enum ProductCategory { ACCOUNTS = "accounts", CHEATS = "cheats", SERVICES = "services", } export const useProducts = () => { const [products, setProdu...
mystahd
lib/hooks/use-products.ts
TypeScript
12e9e4ef95276437386ee3bcf5258283cb044db491e4ec4b44a1a08ce665c4b4
0
480
import { createPaymentLink } from "@/actions/sellix"; import React, { createContext, useContext, useState, ReactNode } from "react"; import { toast } from "sonner"; export interface CartItem extends Product { quantity: number; } interface ShoppingCartContextType { cartItems: CartItem[]; isLoading: boolean; ad...
mystahd
lib/provider/shopping-cart-context.tsx
TypeScript
f172a928f7c72534130d01209d77e7e8cfb7b222bc2eb2a7f936984747e98ffd
0
896
.id !== productId) ); }; const clearCart = () => { setCartItems([]); }; const value = { cartItems, isLoading, addToCart, removeFromCart, getPaymentLink, getPaymentLinkForProduct, getPaymentLinkForProducts, clearCart, }; return ( <ShoppingCartContext.Provider va...
mystahd
lib/provider/shopping-cart-context.tsx
TypeScript
6e84c724cbad21fac5cfe84011fd74a6076b9f5a1fde7e6d911c004ca01ded48
1
74
import { z } from "zod"; export const SupportTicketSchema = z.object({ title: z .string() .min(3, { message: "Title must be at least 3 characters long" }), content: z .string() .min(10, { message: "Message must be at least 10 characters long" }), fullName: z .string() .min(3, { message: "...
mystahd
lib/validations/support.ts
TypeScript
2c82ea8b63ca23db7364343914654eab7b0f61b4fc8b9f17ed940c26f7cec48a
0
127
@tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --background: 221 39% 11%; --foreground: 0 0% 98%; --card: 0 0% 3.9%; --card-foreground: 0 0% 98%; --popover: 0 0% 3.9%; --popover-foreground: 0 0% 98%; --primary: 0 0% 98%; --primary-foreground: 0 0% 9%;...
mystahd
styles/globals.css
CSS
8d42048b91ba56192fd9f1d9d6f6c283d1f76ace293de791e147fc20bf5a7464
0
258
interface ProductImage { id: number; name: string; type: string; uniqid: string; shop_id: number; storage: string; extension: string; created_at: number; product_id: number; original_name: string; cloudflare_image_id: string; } interface Product { id: number; uniqid: string; slug: string; ...
mystahd
types/index.d.ts
TypeScript
02bd103b35958c5ef2662c69fb8c69514c77eee7d5997cbdc8c60a56ffa27672
0
201
{ "name": "next-todo", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "geist": "^1.3.0", "nanoid": "^5.0.7", "next": "14.2.4", "react": "^18", "react-dom": "^18" ...
next-todo
package.json
JSON
8afc934666d2cefd13231e66729b41392343026dfe1871672b37048f547363ad
0
229
import type { Config } from "tailwindcss"; const config: Config = { content: [ "./pages/**/*.{js,ts,jsx,tsx,mdx}", "./components/**/*.{js,ts,jsx,tsx,mdx}", "./app/**/*.{js,ts,jsx,tsx,mdx}", ], theme: { extend: { backgroundImage: { "gradient-radial": "radial-gradient(var(--tw-gradien...
next-todo
tailwind.config.ts
TypeScript
ff9126203edbe510cf53e455cbf66149596ecac259ed5311e06817c6191a6681
0
173
@tailwind base; @tailwind components; @tailwind utilities; .todoWrapper { @apply max-w-full p-9 bg-white rounded-lg shadow-lg w-96 } .btn { @apply p-1 px-2 text-sm bg-gray-200 text-gray-700 rounded-md } input[type=checkbox]:checked+label span:first-of-type { background-color: #10B981; border-color: #10B981...
next-todo
app/globals.css
CSS
ee5292639261b51d08a17d9a9ed7798f021d30a525e811642a73b37e64aece6c
0
142
import type { Metadata } from "next"; import { TodoProvider } from "@/lib/hooks/use-todos"; import { GeistSans } from "geist/font/sans"; import "./globals.css"; export const metadata: Metadata = { title: "Create Next App", description: "Generated by create next app", }; export default function RootLayout({ chil...
next-todo
app/layout.tsx
TypeScript
834ed3e37ae8da8ffc2768cf99de31f9e7969a2262505b95013d170c266f9862
0
186
import Link from "next/link"; import React from "react"; // Funktionskomponente für die 404-Seite const NotFound = () => { return ( <div className="font-semibold flex flex-col gap-5 text-center text-2xl"> Seite nicht gefunden <Link href="/" className="btn"> {" "} {/* Link zur Startsei...
next-todo
app/not-found.tsx
TypeScript
4ac1982da6a36b51a0fc92c8547b7313759bc4ebef918ca8439a81d17288dfec
0
108
// Route client seiting rendern "use client"; import { useTodos } from "@/lib/hooks/use-todos"; import { IconInbox, IconPlus } from "@/components/icons"; import { TodoItem } from "@/components/todo-item"; import Link from "next/link"; export default function Home() { const { todos, updateTodo, removeTodo } = useTod...
next-todo
app/page.tsx
TypeScript
d4de241d2e7858ef28b25274b006cdcf7cada42b6f743e02cf8bb3db563ee10a
0
342
// Route client seiting rendern "use client"; import { notFound, useRouter, useSearchParams } from "next/navigation"; import { useTodos } from "@/lib/hooks/use-todos"; import Link from "next/link"; import { IconChevronLeft } from "@/components/icons"; import { useState } from "react"; // Definiere das Interface für d...
next-todo
app/edit/[id]/page.tsx
TypeScript
59784859c6268d13f6715c1f494e8eaaa21180c3b0c05f1918cf61a56a7a1b7c
0
647
"use client"; import { IconChevronLeft } from "@/components/icons"; import { useTodos } from "@/lib/hooks/use-todos"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { useState } from "react"; export default function Page() { const { addTodo } = useTodos(); const router = useRout...
next-todo
app/new/page.tsx
TypeScript
d79693a3609ba318c4651539cc07cfa65aad8f94dba11550524222a93acb638d
0
456
export function IconInbox({ className, ...props }: React.ComponentProps<"svg">) { return ( <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" className={className} {...props} > <path d="M11 19.5H21" stroke="currentColor" st...
next-todo
components/icons.tsx
TypeScript
07a60c4f228c5fec401da33b4fb74700693e691f495ba00d443dca112ca3e49d
0
896
9.83003 19.71 9.82003 19.65 9.80003C17.02 9.06003 14.93 6.97003 14.19 4.34003C14.08 3.94003 14.31 3.53003 14.71 3.41003C15.11 3.30003 15.52 3.53003 15.63 3.93003C16.23 6.06003 17.92 7.75003 20.05 8.35003C20.45 8.46003 20.68 8.88003 20.57 9.28003C20.48 9.62003 20.18 9.83003 19.85 9.83003Z" fill="currentColor" ...
next-todo
components/icons.tsx
TypeScript
aa21fd6300f3a18c89d239cc0e29881d1c25bfb0ba898007b32ef6793ae1a7dd
1
737
import { Todo } from "@/types"; import Link from "next/link"; import { IconEdit, IconTrash } from "./icons"; interface TodoItemProps extends React.HTMLAttributes<HTMLDivElement> { todo: Todo; updateTodo: (id: string, updatedTodo: Partial<Todo>) => void; removeTodo: (id: string) => void; } export function TodoIt...
next-todo
components/todo-item.tsx
TypeScript
77abce97c6b173d15cfa3e1ec63a73efa131d787ee97b95933009bb2cf6a1ddf
0
489
import { useEffect, useState } from "react"; export const useLocalStorage = <T>( key: string, initialValue: T ): [T, (value: T) => void] => { const [storedValue, setStoredValue] = useState(initialValue); useEffect(() => { // Retrieve from localStorage const item = window.localStorage.getItem(key); ...
next-todo
lib/hooks/use-local-storage.ts
TypeScript
adf8051800d6d2b55a4a8a666cb6532f0cf79b5255f312e938787649858c6b36
0
154
"use client"; import React, { createContext, useContext, ReactNode } from "react"; import { nanoid } from "nanoid"; import { useLocalStorage } from "./use-local-storage"; import { Todo } from "@/types"; interface TodoContextType { todos: Todo[]; addTodo: (todo: Omit<Todo, "id" | "createdAt" | "isCompleted">) => v...
next-todo
lib/hooks/use-todos.tsx
TypeScript
cb0b3531b1ee9575214f90ef79b06d3f220e34dea044351ca01afb7de7620beb
0
425
export interface Todo { id: string; title: string; isCompleted: boolean; createdAt: string; }
next-todo
types/index.d.ts
TypeScript
36acb7b435ddba85b659efea23f4a0966550029a6b1be154b05ee5ffde5f27b4
0
21
.gitattributes text eol=lf .agents/skills/** text eol=lf *.md text eol=lf *.json text eol=lf *.yml text eol=lf *.toml text eol=lf docs/archive/source/** -text
openai-build-week
.gitattributes
Git Attributes
12329e96d2ed4cdccd0017650158392655152b3cd99ce77488fdd5b62c7669a1
0
55