Skip to content

Instantly share code, notes, and snippets.

View jmcph4's full-sized avatar

Jack McPherson jmcph4

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Minimal DnD Designer</title>
<style>
:root { color-scheme: light dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
Error: HttpError: Invalid status code 400 Bad Request with message: {
"error": {
"message": "Requested 1325364 tokens, max 300000 tokens per request",
"type": "max_tokens_per_request",
"param": null,
"code": "max_tokens_per_request"
}
}
use rayon::prelude::*;
pub fn search(haystack: &[(Url, String)], needle: &str) -> Vec<Finding> {
if needle.is_empty() {
return Vec::new();
}
haystack
.par_iter()
.flat_map_iter(|(url, text)| {