knox / Qdrant-readme-2.py
0 likes
0 forks
1 files
Last active
1 | from qdrant_client import QdrantClient |
2 | qdrant = QdrantClient(":memory:") # Create in-memory Qdrant instance, for testing, CI/CD |
3 | # OR |
4 | client = QdrantClient(path="path/to/db") # Persists changes to disk, fast prototyping |
knox / Qdrant-readme-1.sh
0 likes
0 forks
1 files
Last active
1 | pip install qdrant-client |
knox / Dioxus-div.md
0 likes
0 forks
1 files
Last active
Platform | Support Level | Features |
---|---|---|
Web | Tier 1 Support | - Render directly to the DOM using WebAssembly- Pre-render with SSR and rehydrate on the client- Simple "hello world" at about 50kb, comparable to React- Built-in dev server and hot reloading for quick iteration |
Fullstack | Tier 1 Support | - Suspense, hydration, and server-side rendering- Quickly drop in backend functionality with server functions- Extractors, middleware, and routing integrations- Compatible with desktop and mobile! |
Desktop | Tier 1 Support | - Render using Webview or - experimentally - with WGPU or Freya (skia)- Zero-config setup. Simply cargo run or dx serve to build your app- Full support for native system access without IPC- Supports macOS, Linux, and Windows. Portable <3mb binaries |
Liveview | Tier 1 Support | - Render apps - or just a single component - entirely on the server- Integrations with popular Rust frameworks like Axum and Warp- Extremely low-latency and ability to support 10,000+ simultaneous apps |
Mobile | Tier 2 Support | - Render using Webview or - experimentally - with WGPU or Skia- Support for iOS and Android- Currently quite experimental, with lots of improvements coming throughout 2024 |
Terminal | Tier 2 Support | - Render apps directly into your terminal, similar to ink.js- Powered by the familiar flexbox and CSS model of the browser- Built-in widgets like text input, buttons, and focus system |
knox / Dioxus-7.rs
0 likes
0 forks
1 files
Last active
1 | // dioxus |
2 | rsx! { |
3 | div { class: "my-class", enabled: true, "Hello, {name}" } |
4 | } |
5 | |
6 | // leptos |
7 | view! { |
8 | <div class="my-class" enabled={true}> |
9 | "Hello " |
10 | {name} |
knox / Dioxus-6.rs
0 likes
0 forks
1 files
Last active
1 | fn Counters() -> impl IntoView { |
2 | let counters = RwSignal::new(vec![0; 10]); |
3 | |
4 | view! { |
5 | <button on:click=move |_| counters.update(|n| n.push(n.len()))>"Add Counter"</button> |
6 | <For |
7 | each=move || 0..counters.with(Vec::len) |
8 | key=|idx| *idx |
9 | let:idx |
10 | > |
knox / Dioxus-5.rs
0 likes
0 forks
1 files
Last active
1 | fn Counters() -> Element { |
2 | let mut counters = use_signal(|| vec![0; 10]); |
3 | |
4 | rsx! { |
5 | button { onclick: move |_| counters.push(counters.len()), "Add Counter" } |
6 | ul { |
7 | for idx in 0..counters.len() { |
8 | li { |
9 | button { onclick: move |_| counters.write()[idx] += 1, "{counters.index(idx)}" } |
10 | button { onclick: move |_| { counters.remove(idx); }, "Remove" } |
knox / Dioxus-4.sh
0 likes
0 forks
1 files
Last active
1 | dx serve --example <example> --platform web -- --no-default-features |
knox / Dioxus-3.sh
0 likes
0 forks
1 files
Last active
1 | cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli --locked |
knox / Dioxus-2.sh
0 likes
0 forks
1 files
Last active
1 | cargo run --example <example> |