Skip to content

Instantly share code, notes, and snippets.

View Laurian's full-sized avatar

Laurian Gridinoc Laurian

  • Creative Technologist ※ Knight-Mozilla OpenNews Fellow ※ Visual analytics × Computational Linguistics × Semantic Web
  • Cyberspace
  • X @gridinoc
View GitHub Profile
@olafgeibig
olafgeibig / cc-proxy.sh
Last active August 12, 2025 16:27
A LiteLLM proxy solution to use Claude Code with models from the Weights and Biases inference service. You need to have LiteLLM installed or use the docker container. Easiest is to install it with `uv tool install "litellm[proxy]"` Don't worry about the fallback warnings. Either LiteLLM, W&B or the combo of both are not handling streaming respon…
#!/bin/bash
export WANDB_API_KEY=<your key>
export WANDB_PROJECT=<org/project>
litellm --port 4000 --debug --config cc-proxy.yaml
@skylarbpayne
skylarbpayne / ai_evals_synthetic_data_hw.py
Created May 21, 2025 22:21
AI Evals Synthetic Data Homework 1
"""Script for generating queries for a recipe search engine.
This script can be used to generate synthetic queries for a recipe search engine.
Following best practices from Hamel and Shreya's AI Evals course, we:
- Generate a set of dimensions that can be used to generate queries; these are attributes that significantly change what the query is about or how it is written.
- For each set of attributes ("Dimensions") we generate a query that matches those attributes.
To ensure that the synthetic generation is better aligned, we first try handwriting the queries using the --manual flag.
This gives us labeled examples to use few shot in our synthetic generation.
@jlia0
jlia0 / agent loop
Last active August 11, 2025 10:34
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p
@jetfir3
jetfir3 / download_fusion.sh
Last active August 8, 2025 21:29
Download VMware Fusion Pro Without a Broadcom Account
#!/usr/bin/env bash
# Download VMware Fusion for macOS without a Broadcom account.
#
# This script allows you to download various versions of VMware Fusion
# from Broadcom's Cloudflare CDN (versions 8.0.0 to 13.6.3)
# or from the archive.org VMware Workstation archive (versions 8.x.x+).
#
# Options:
# -k: Keep the downloaded file compressed (Cloudflare only; ignored for archive.org).
@mtisz
mtisz / llama-3-70B-qlora.yaml
Created May 15, 2024 16:47
Axolotl Config for Llama-3-70B QLoRA
base_model: meta-llama/Meta-Llama-3-70B
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: true
strict: false
datasets:
- path: /home/migel/ai_datasets/tess-v1.5b-chatml.jsonl
import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@matt-e-king
matt-e-king / gist:3ac2127025cf5dbc03001d9b21c1984a
Created April 17, 2024 19:06
Hypothesis Embed and sock in Vue app
// HypothesisEmbed.vue
// This is the component that mounts on the page that has the annotations
// It's important to destroy the client when componenent is unmounted
// because if the component remounts, it creates duplicate annotations in the DOM
<template>
<div
id="HypothesisEmbed"
class="HypothesisEmbed"
/>
@veekaybee
veekaybee / normcore-llm.md
Last active August 12, 2025 11:14
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@gimenete
gimenete / safeParse.ts
Last active March 15, 2024 16:05
A wrapper around the fetch function that validates the response body against a Zod schema
import z from "zod";
export async function safeFetch<T>(
schema: z.Schema<T>,
input: RequestInfo,
init?: RequestInit
): Promise<T> {
const response = await fetch(input, init);
if (!response.ok) {