file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
frontend/src/components/ui/sheet.tsx
TypeScript (TSX)
import { cn } from '@/lib/utils'; import * as SheetPrimitive from '@radix-ui/react-dialog'; import { type VariantProps, cva } from 'class-variance-authority'; import { X } from 'lucide-react'; import * as React from 'react'; const Sheet = SheetPrimitive.Root; const SheetTrigger = SheetPrimitive.Trigger; const SheetC...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/components/ui/sonner.tsx
TypeScript (TSX)
import { useTheme } from 'next-themes'; import { Toaster as Sonner } from 'sonner'; type ToasterProps = React.ComponentProps<typeof Sonner>; const Toaster = ({ ...props }: ToasterProps) => { const { theme = 'system' } = useTheme(); return ( <Sonner theme={theme as ToasterProps['theme']} className...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/components/ui/switch.tsx
TypeScript (TSX)
import { cn } from '@/lib/utils'; import * as SwitchPrimitives from '@radix-ui/react-switch'; import * as React from 'react'; const Switch = React.forwardRef< React.ElementRef<typeof SwitchPrimitives.Root>, React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> >(({ className, ...props }, ref) => ( <Switch...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/components/ui/table.tsx
TypeScript (TSX)
import { cn } from '@/lib/utils'; import * as React from 'react'; const Table = React.forwardRef< HTMLTableElement, React.HTMLAttributes<HTMLTableElement> >(({ className, ...props }, ref) => ( <div className="relative w-full overflow-auto"> <table ref={ref} className={cn('w-full caption-bottom te...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/components/ui/textarea.tsx
TypeScript (TSX)
import { cn } from '@/lib/utils'; import * as React from 'react'; const Textarea = React.forwardRef< HTMLTextAreaElement, React.ComponentProps<'textarea'> >(({ className, ...props }, ref) => { return ( <textarea className={cn( 'flex min-h-[60px] w-full rounded-md border border-input bg-transpar...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/components/ui/tooltip.tsx
TypeScript (TSX)
import { cn } from '@/lib/utils'; import * as TooltipPrimitive from '@radix-ui/react-tooltip'; import * as React from 'react'; const TooltipProvider = TooltipPrimitive.Provider; const Tooltip = TooltipPrimitive.Root; const TooltipTrigger = TooltipPrimitive.Trigger; const TooltipContent = React.forwardRef< React.E...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/useCurrentEditState.ts
TypeScript
import { editStateState } from '@/state'; import FunctionViewContext from '@/views/function/context'; import { useContext } from 'react'; import { useRecoilValue } from 'recoil'; export default function useCurrentEditState() { const { currentLineageId } = useContext(FunctionViewContext); const editState = useRecoi...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/useCurrentLineage.ts
TypeScript
import { stateHistoryByLineageState } from '@/state'; import FunctionViewContext from '@/views/function/context'; import { useContext } from 'react'; import { useRecoilValue } from 'recoil'; export default function useCurrentLineage() { const { currentLineageId } = useContext(FunctionViewContext); const stateHisto...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/useCurrentState.ts
TypeScript
import useCurrentEditState from './useCurrentEditState'; import useCurrentLineage from './useCurrentLineage'; import FunctionViewContext from '@/views/function/context'; import { useContext } from 'react'; export default function useCurrentState() { const editState = useCurrentEditState(); const { currentStateInde...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/useForkState.ts
TypeScript
import { type ILooplitState, forksByMessageIndexState, stateHistoryByLineageState } from '../state'; import useInteraction from './useInteraction'; import FunctionViewContext from '@/views/function/context'; import { useContext } from 'react'; import { useRecoilCallback } from 'recoil'; import { v4 as uuidv4 } fr...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/useInteraction.ts
TypeScript
import { ILooplitState, errorState, sessionState } from '@/state'; import { useCallback } from 'react'; import { useRecoilValue, useSetRecoilState } from 'recoil'; export interface ICallStatefulFunctionPayload { func_name: string; lineage_id: string; state: ILooplitState; } export interface ICallCanvasAgentPayl...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/usePlatform.ts
TypeScript
import { useMemo } from 'react'; const MOBILE_REGEX = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i; type PlatformPayload = { isSSR: boolean; isMobile: boolean; isDesktop: boolean; isMac: boolean; }; export const usePlatform = (): PlatformPayload => { const platforms = useMemo(() => { ...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/hooks/useSetEditState.ts
TypeScript
import { ILooplitState, editStateState } from '@/state'; import FunctionViewContext from '@/views/function/context'; import { useContext } from 'react'; import { useSetRecoilState } from 'recoil'; export default function useSetEditState() { const { currentLineageId } = useContext(FunctionViewContext); const setEdi...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/index.css
CSS
@tailwind base; @tailwind components; @tailwind utilities; @layer base { :root { --background: 0 0% 96%; --foreground: 240 10% 3.9%; --card: 0 0% 98%; --card-foreground: 240 10% 3.9%; --popover: 0 0% 100%; --popover-foreground: 240 10% 3.9%; --muted: 0 0% 93%; --muted-foreground: 240 ...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/lib/utils.ts
TypeScript
import { type ClassValue, clsx } from 'clsx'; import { twMerge } from 'tailwind-merge'; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); }
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/main.tsx
TypeScript (TSX)
import App from './App.tsx'; import './index.css'; import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { RecoilRoot } from 'recoil'; createRoot(document.getElementById('root')!).render( <StrictMode> <RecoilRoot> <App /> </RecoilRoot> </StrictMode> );
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/state.ts
TypeScript
import type { IMessage } from './components/Message'; import { atom } from 'recoil'; import { Socket } from 'socket.io-client'; export interface ISession { socket: Socket; error?: boolean; } export const sessionState = atom<ISession | undefined>({ key: 'Session', dangerouslyAllowMutability: true, default: u...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/connecting/index.tsx
TypeScript (TSX)
import { Loader } from '@/components/Loader'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { functionsState, sessionState } from '@/state'; import { AlertCircle } from 'lucide-react'; import { useRecoilValue } from 'recoil'; export default function ConnectingView() { const sess...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Body/AskAIButton.tsx
TypeScript (TSX)
import CanvasFloatingInput from '@/components/Canvas/CanvasFloatingInput'; import { Button } from '@/components/ui/button'; import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Body/ForkButton.tsx
TypeScript (TSX)
import { Button } from '@/components/ui/button'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import useCurrentEditState from '@/hooks/useCurrentEditState'; import useCurrentLineage from '@/hooks/useCurrentLineage'; import useCurrentState from '@/hooks/useC...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Body/ForkNav.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import { Button } from '@/components/ui/button'; import useCurrentEditState from '@/hooks/useCurrentEditState'; import { forksByMessageIndexState, stateHistoryByLineageState } from '@/state'; import { ChevronLeft, ChevronRight } from 'lucide-react'; import { useContext }...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Body/ToolCall.tsx
TypeScript (TSX)
import JsonEditor from '@/components/JsonEditor'; import { Loader } from '@/components/Loader'; import type { IMessage, IToolCall } from '@/components/Message'; import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; import { runningState, toolCallsToLineageIdsState } from '@/state'; import N...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Body/index.tsx
TypeScript (TSX)
// ChatBody.tsx import FunctionViewContext from '../../context'; import AskAIButton from './AskAIButton'; import ForkButton from './ForkButton'; import ForkNav from './ForkNav'; import ToolCall from './ToolCall'; import CopyButton from '@/components/CopyButton'; import Message, { IMessage } from '@/components/Message';...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Header/EditMode.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import useCurrentEditState from '@/hooks/useCurrentEditState'; impo...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Header/FunctionSelect.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '@/components/ui/alert-dialog'; import { Select, SelectContent, SelectItem, Selec...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Header/InterruptSwitch.tsx
TypeScript (TSX)
import { Label } from '@/components/ui/label'; import { Switch } from '@/components/ui/switch'; import useInteraction from '@/hooks/useInteraction'; export default function InterruptSwitch() { const { setInterrupt } = useInteraction(); return null; return ( <div className="flex items-center space-x-2"> ...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Header/RunStateButton.tsx
TypeScript (TSX)
import { Loader } from '@/components/Loader'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { interruptState } from '@/state'; import { runningState } from '@/state'; import { PlayIcon } from 'lucide-react'; import { useRecoilState, useRecoilValue } from 'recoil'...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/Header/index.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import EditMode from './EditMode'; import FunctionSelect from './FunctionSelect'; import InterruptSwitch from './InterruptSwitch'; import RunStateButton from './RunStateButton'; import { Logo } from '@/components/Logo'; import { SheetClose } from '@/components/ui/sheet';...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/chat/index.tsx
TypeScript (TSX)
import ChatBody from './Body'; import ChatHeader from './Header'; import MessageComposer from '@/components/MessageComposer'; export default function ChatView() { return ( <div className="flex flex-col h-full bg-card relative"> <ChatHeader /> <div className="flex flex-col flex-grow px-4 overflow-y-au...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/context.ts
TypeScript
import { createContext } from 'react'; export interface IFunctionViewContext { isRoot: boolean; id: string; name: string; currentLineageId: string; currentStateIndex: number; setName?: (fn: (_ctx: IFunctionViewContext) => string) => void; setCurrentLineageId?: (fn: (_ctx: IFunctionViewContext) => string)...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/index.tsx
TypeScript (TSX)
import ChatView from './chat'; import FunctionViewContext from './context'; import StateView from './state'; import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@/components/ui/resizable'; import useCurrentLineage from '@/hooks/useCurrentLineage'; import { useContext, useEffect } from 'react'; ...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/state/Body/index.tsx
TypeScript (TSX)
import { useEditorFormat } from '@/components/EditorFormat'; import JsonEditor from '@/components/JsonEditor'; import YamlEditor from '@/components/YamlEditor'; import useCurrentState from '@/hooks/useCurrentState'; import useSetEditState from '@/hooks/useSetEditState'; import { omit } from 'lodash'; export default fu...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/state/Header/LineageNav.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import { Button } from '@/components/ui/button'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import useCurrentEditState from '@/hooks/useCurrentEditState'; import useCurrentLineage from '@/hooks/useCurrentLi...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/state/Header/SaveButton.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import { Button } from '@/components/ui/button'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import useCurrentEditState from '@/hooks/useCurrentEditState'; import { forksByMessageIndexState, runningState...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/state/Header/UploadButton.tsx
TypeScript (TSX)
import { Button } from '@/components/ui/button'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { editStateState, errorState, forksByMessageIndexState, interruptState, runningState, stateHistoryByLineageState, toolCallsToLineageIdsState }...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/state/Header/index.tsx
TypeScript (TSX)
import FunctionViewContext from '../../context'; import LineageNav from './LineageNav'; import SaveButton from './SaveButton'; import UploadButton from './UploadButton'; import { EditorFormatSelect } from '@/components/EditorFormat'; import { useContext } from 'react'; export default function StateHeader() { const {...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/function/state/index.tsx
TypeScript (TSX)
import StateBody from './Body'; import StateHeader from './Header'; export default function StateView() { return ( <div className="flex flex-col h-full"> <StateHeader /> <div className="flex flex-col flex-grow"> <StateBody /> </div> </div> ); }
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/home/Functions.tsx
TypeScript (TSX)
import InlineText from '@/components/InlineText'; import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { Button } from '@/components/ui/button'; import { functionsState } from '@/state'; import { FunctionSquareIcon, InfoIcon } from 'lucide-react'; import { NavLink } from 'react-router-dom...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/home/index.tsx
TypeScript (TSX)
import Functions from './Functions'; import { ThemeToggle } from '@/components/ThemeToggle'; export default function HomeView() { return ( <div className="h-screen w-screen flex items-center justify-center relative"> <div style={{ mask: 'url(/pattern.png) repeat center / contain', ...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/nestedFunction/index.tsx
TypeScript (TSX)
import FunctionView from '../function'; import FunctionViewContext, { IFunctionViewContext } from '../function/context'; import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'; import { stateHistoryByLineageState } from '@/state'; import { useMemo, useState } from 'react'; import { useRecoilValue } f...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/views/rootFunction/index.tsx
TypeScript (TSX)
import FunctionView from '../function'; import FunctionViewContext, { IFunctionViewContext } from '../function/context'; import { functionsState, stateHistoryByLineageState } from '@/state'; import { useEffect, useMemo, useState } from 'react'; import { useParams } from 'react-router-dom'; import { useRecoilValue, useS...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/src/vite-env.d.ts
TypeScript
/// <reference types="vite/client" />
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/tailwind.config.js
JavaScript
/** @type {import('tailwindcss').Config} */ export default { darkMode: ["class"], content: ["./index.html", "./src/**/*.{ts,tsx,js,jsx}"], theme: { extend: { borderRadius: { lg: 'var(--radius)', md: 'calc(var(--radius) - 2px)', sm: 'calc(var(--radius) - 4px)' }, colors: { ba...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
frontend/vite.config.ts
TypeScript
import path from "path" import react from "@vitejs/plugin-react" import { defineConfig } from "vite" export default defineConfig({ plugins: [react()], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, })
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
lint-staged.config.js
JavaScript
// eslint-disable-next-line no-undef module.exports = { '**/*.py': [ 'poetry run -C backend ruff check --fix', 'poetry run -C backend ruff format', () => 'pnpm run lint:python', ], '**/*.{ts,tsx}': [() => 'pnpm run lint:ui', () => 'pnpm run format:ui'], '.github/{workflows,actions}/**': ['actionlint...
willydouhard/looplit
13
TypeScript
willydouhard
Willy Douhard
Chainlit
aocd_example_parser/__init__.py
Python
from .plugins import *
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
aocd_example_parser/extraction.py
Python
import importlib.resources import json from functools import cache from aocd.examples import Example from aocd.examples import Page @cache def _locators() -> dict: # predetermined locations of code-blocks etc for example data resource = importlib.resources.files(__package__) / "examples.json" txt = resou...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
aocd_example_parser/plugins.py
Python
from aocd.examples import Example from aocd.examples import Page from .extraction import extract_examples from .util import real_datas_unused __all__ = ["simple", "reference"] @real_datas_unused def simple(page: Page, datas: list[str]) -> list[Example]: """ Example parser implementation which always uses t...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
aocd_example_parser/util.py
Python
from typing import Callable def real_datas_unused(parser: Callable) -> Callable: """ A decorator which indicates that the "datas" argument is not going to be used by the decorated parser. aocd will just send an empty list in this case, which speeds up invocation of the parser entrypoint somewhat. ...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
tests/integration.py
Python
#!/usr/bin/env python3 import argparse import ast import pathlib import sys from testfixtures import compare from aocd.models import Puzzle here = pathlib.Path(__file__).parent input_dir = here.parent.parent / "advent-of-code-wim" / "tests" def split_trailing_comments(lines): extra = [] while lines and (n...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
tests/test_default_extraction.py
Python
from aocd.examples import Page from aocd_example_parser.extraction import extract_examples fake_prose = """ <title>Day 1 - Advent of Code 1234</title> <article> <pre><code>test input data</code></pre> <code>test answer_a</code> </article> <article> <code>test answer_b</code> </article> """ def test_default_extract...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
tests/test_extra_context.py
Python
from aocd.examples import Page from aocd_example_parser.extraction import extract_examples fake_prose = """ <title>Day 10 - Advent of Code 2016</title> <article> <pre><code>test input data</code></pre> <code>test answer_a</code> </article> <article> <code>test answer_b</code> </article> """ def test_locator_extra_...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
tests/test_plugins.py
Python
from importlib.metadata import entry_points def test_plugin(mocker): [ep] = entry_points().select( group="adventofcode.examples", name="simple", ) plugin = ep.load() mock = mocker.patch("aocd_example_parser.plugins.extract_examples") plugin(page="fake page", datas=[]) mock.asse...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
tests/test_version_str.py
Python
from datetime import datetime from importlib.metadata import version from aocd_example_parser.extraction import _locators def test_version_str(): metadata_version = version("aocd-example-parser") date = datetime.strptime(metadata_version, "%Y.12.%d") assert date.year >= 2023 assert 1 <= date.day <= 2...
wimglenn/aocd-example-parser
7
Default implementation of an example parser plugin for advent-of-code-data
Python
wimglenn
Wim Jeantine-Glenn
conftest.py
Python
from sybil import Sybil from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser, SkipParser sybil = Sybil( parsers=[ DocTestParser(), PythonCodeBlockParser(), SkipParser(), ], patterns=["*.rst"], ) pytest_collect_file = sybil.pytest()
wimglenn/monkey-magic
3
Monkeypatch built-in types
Python
wimglenn
Wim Jeantine-Glenn
monkey_magic.py
Python
import gc import types def _wrap_builtin_function(f): def f_py(*args, **kwargs): return f(*args, **kwargs) f_py.__name__ = f.__name__ return f_py def monkeypatch(type_, obj, name=None): if isinstance(type_, tuple): for t in type_: monkeypatch(t, obj, name) return...
wimglenn/monkey-magic
3
Monkeypatch built-in types
Python
wimglenn
Wim Jeantine-Glenn
setuptools_reproducible.py
Python
import os import stat import tarfile from contextlib import contextmanager from types import SimpleNamespace from setuptools.build_meta import * from setuptools.build_meta import build_sdist as build_sdist_orig from setuptools.build_meta import build_wheel as build_wheel_orig class FixedMode: def __get__(self, i...
wimglenn/setuptools-reproducible
6
Extension of setuptools to support reproducible builds
Python
wimglenn
Wim Jeantine-Glenn
tests/test_reproducibility.py
Python
import hashlib import os import shutil from contextlib import contextmanager from pathlib import Path import pytest import setuptools_reproducible backend = Path(__file__).parent.parent / "setuptools_reproducible.py" example_readme = """\ this is the first line of the README.md file this is the second line of the...
wimglenn/setuptools-reproducible
6
Extension of setuptools to support reproducible builds
Python
wimglenn
Wim Jeantine-Glenn
public/app.js
JavaScript
let currentProject = null; let currentConversation = null; let allProjects = []; let allConversations = []; let showWarmup = false; let showMeta = false; let currentMessages = []; // Initialize document.addEventListener('DOMContentLoaded', () => { loadProjects(); setupSearchHandlers(); setupFilterToggles(); }); ...
wincent/clogue
0
Claude Code log explorer
JavaScript
wincent
Greg Hurrell
DataDog
public/index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Clogue - Claude Conversation Explorer</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-...
wincent/clogue
0
Claude Code log explorer
JavaScript
wincent
Greg Hurrell
DataDog
server.js
JavaScript
#!/usr/bin/env node const express = require('express'); const fs = require('fs').promises; const path = require('path'); const os = require('os'); const app = express(); const PORT = 3000; const PROJECTS_DIR = path.join(os.homedir(), '.claude', 'projects'); app.use(express.static('public')); // Reconstruct the act...
wincent/clogue
0
Claude Code log explorer
JavaScript
wincent
Greg Hurrell
DataDog
quant_trading/__init__.py
Python
# coding: utf-8 # flake8: noqa """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Genera...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/api/__init__.py
Python
from __future__ import absolute_import # flake8: noqa # import apis into api package from quant_trading.api.bitcoin_futures_manager_api import BitcoinFuturesManagerApi from quant_trading.api.bitcoin_futures_market_maker_api import BitcoinFuturesMarketMakerApi from quant_trading.api.bitcoin_futures_swinger_api import ...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/api/bitcoin_futures_manager_api.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/api/bitcoin_futures_market_maker_api.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/api/bitcoin_futures_swinger_api.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/api_client.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://g...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/configuration.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/__init__.py
Python
# coding: utf-8 # flake8: noqa """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generat...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/algo_params_response.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/avg_open_position_hours.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/closed_position_hours.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/current_position_pct.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/current_unrealised_pct.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/error.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/exec_algo_response.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/exec_position_manager_algo_request.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/exec_position_swinger_algo_request.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/last_open_stake_hours.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/open_position_hours.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/position_state.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/stake_state.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/x_rate_limit_limit.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/x_rate_limit_remaining.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/models/x_rate_limit_reset.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
quant_trading/rest.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
setup.py
Python
# coding: utf-8 """ Quant Trading Network API This API will use JSON. JSON looks like this: { \"key\": \"value\", \"anotherKey\": \"anotherValue\" } # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@quant-trading.network Generated by: https://github.com/swagger-api/swagger-codegen.git ""...
wing328/python-api-client
0
Python library for connecting to the Quant-trading.Network API.
wing328
William Cheng
OpenAPITools
.formatter.exs
Elixir
[ import_deps: [:phoenix, :ash, :ash_authentication_phoenix, :ash_postgres], plugins: [Phoenix.LiveView.HTMLFormatter], inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}"] ]
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
assets/css/app.css
CSS
@import "tailwindcss/base"; @import "tailwindcss/components"; @import "tailwindcss/utilities"; /* This file is for your main application CSS */
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
assets/js/app.js
JavaScript
// If you want to use Phoenix channels, run `mix help phx.gen.channel` // to get started and then uncomment the line below. // import "./user_socket.js" // You can include dependencies in two ways. // // The simplest option is to put them in assets/vendor and // import them using relative paths: // // import "../v...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
assets/tailwind.config.js
JavaScript
// See the Tailwind configuration guide for advanced usage // https://tailwindcss.com/docs/configuration const plugin = require("tailwindcss/plugin") module.exports = { content: [ "./js/**/*.js", "../lib/*_web.ex", "../lib/*_web/**/*.*ex", "../deps/ash_authentication_phoenix/**/*.ex" ], theme: {...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
config/config.exs
Elixir
# This file is responsible for configuring your application # and its dependencies with the aid of the Config module. # # This configuration file is loaded before any dependency and # is restricted to this project. # General application configuration import Config config :example, ash_apis: [Example.Accounts] conf...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
config/dev.exs
Elixir
import Config config :example, Example.Repo, username: "postgres", password: "postgres", hostname: "localhost", database: "example_dev", port: 5432, show_sensitive_data_on_connection_error: true, pool_size: 10 # For development, we disable any cache and enable # debugging and code reloading. # # The wat...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
config/prod.exs
Elixir
import Config # For production, don't forget to configure the url host # to something meaningful, Phoenix uses this information # when generating URLs. # Note we also include the path to a cache manifest # containing the digested version of static files. This # manifest is generated by the `mix phx.digest` task, # wh...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
config/runtime.exs
Elixir
import Config # config/runtime.exs is executed for all environments, including # during releases. It is executed after compilation and before the # system starts, so it is typically used to load production configuration # and secrets from environment variables or elsewhere. Do not define # any compile-time configurati...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
config/test.exs
Elixir
import Config config :example, Example.Repo, username: "postgres", password: "postgres", hostname: "localhost", database: "example_test#{System.get_env("MIX_TEST_PARTITION")}", pool: Ecto.Adapters.SQL.Sandbox, pool_size: 10 # We don't run a server during test. If one is required, # you can enable the serv...
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
lib/example.ex
Elixir
defmodule Example do @moduledoc """ Example keeps the contexts that define your domain and business logic. Contexts are also responsible for managing your data, regardless if it comes from the database, an external API or others. """ end
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
lib/example/accounts.ex
Elixir
defmodule Example.Accounts do use Ash.Api resources do registry Example.Accounts.Registry end end
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
lib/example/accounts/registry.ex
Elixir
defmodule Example.Accounts.Registry do use Ash.Registry, extensions: [Ash.Registry.ResourceValidations] entries do entry Example.Accounts.User entry Example.Accounts.Token end end
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting
lib/example/accounts/token.ex
Elixir
defmodule Example.Accounts.Token do use Ash.Resource, data_layer: AshPostgres.DataLayer, extensions: [AshAuthentication.TokenResource] token do api Example.Accounts end postgres do table "tokens" repo Example.Repo end end
wintermeyer/ash-authentication-phoenix-example
0
This repo is the resulting source code of the Getting Started Ash Authentication Phoenix tutorial.
Elixir
wintermeyer
Stefan Wintermeyer
Wintermeyer Consulting