This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LET results = ( | |
| // Get embedding results | |
| LET embedding_results = ( | |
| FOR doc IN glossary_view | |
| LET similarity = COSINE_SIMILARITY(doc.embedding, @embedding_search) | |
| FILTER similarity >= @embedding_similarity_threshold | |
| SORT similarity DESC | |
| LIMIT @top_n | |
| RETURN { | |
| doc: doc, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Description: | |
| # A Raycast script for quickly finding environment variables in .env files. | |
| # Matches keys in three ways: | |
| # 1. Abbreviations: "aak" → "AWS_ACCESS_KEY", "gpt" → "GITHUB_PAT_TOKEN" | |
| # 2. Partial matches: "shap" → "SHAPE", "aws" → "AWS_KEY" | |
| # 3. Fuzzy finding: "ath" → "AUTH_TOKEN" | |
| # Matched values are copied to clipboard and printed to terminal using pbcopy (brew install pbcopy or similar) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/osascript | |
| # Required parameters: | |
| # @raycast.schemaVersion 1 | |
| # @raycast.title GlobiTab | |
| # @raycast.mode silent | |
| # @raycast.icon 🔍 | |
| # @raycast.packageName GlobiTab | |
| # @raycast.argument1 { "type": "text", "placeholder": "Tab Name/URL/Keyword", "optional": false } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Action, Detail, LaunchProps } from "@raycast/api"; | |
| import { getConfig } from "./utils/preferences"; | |
| interface Preferences { | |
| obsidianVaultPath: string; | |
| } | |
| export default function ResultView(props: LaunchProps<{ context: { answer: string } }>) { | |
| const { obsidianVaultPath } = getConfig(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "type": "Heading", | |
| "children": [ | |
| { | |
| "type": "RawText", | |
| "children": [], | |
| "content": "Paris: The Enchanting Capital of France" | |
| } | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from complexity.file_utils import get_project_root, load_env_file | |
| import torch | |
| from transformers import ( | |
| DistilBertTokenizerFast, | |
| DistilBertForSequenceClassification | |
| ) | |
| from loguru import logger | |
| import os | |
| import time # Add this at the top with other imports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import os | |
| import time | |
| from typing import List, Dict, Any | |
| from functools import partial | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| import torch | |
| import torch.nn.functional as F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from arango import ArangoClient | |
| from loguru import logger | |
| def validate_embeddings(db, collection_name, dimension): | |
| """Validate embeddings with boolean AQL result.""" | |
| try: | |
| # Collection name interpolation (must be sanitized) | |
| query = f""" | |
| RETURN COUNT( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from arango import ArangoClient | |
| from loguru import logger | |
| def validate_embeddings(db, collection_name, dimension): | |
| """Validate embeddings with boolean AQL result.""" | |
| try: | |
| # Collection name interpolation (must be sanitized) | |
| query = f""" | |
| RETURN COUNT( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| # --------------------------- | |
| # SGLang Service | |
| # --------------------------- | |
| sglang-service: | |
| # image: lmsysorg/sglang:latest | |
| build: | |
| context: . | |
| dockerfile: Dockerfile_v2.sglang | |
| container_name: sglang-service |