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 argparse, json, sys, time | |
| from urllib import request | |
| PROMPTS = [ | |
| {"name": "code_python", "prompt": "Write a Python function that returns the n-th Fibonacci number using memoization. Include a docstring."}, | |
| {"name": "code_cpp", "prompt": "Write a C++ template function `clamp(x, lo, hi)` that returns x clamped to [lo, hi]. No std::clamp."}, | |
| {"name": "explain_concept", "prompt": "Explain how speculative decoding works in large language model inference, in three short paragraphs."}, | |
| {"name": "summarize", "prompt": "Summarize in two sentences: The Industrial Revolution began in Britain in the late 18th century, transforming manufacturing through mechanization, steam power, and the factory system. It spread to continental Europe and North America during the 19th century."}, | |
| {"name": "qa_factual", "prompt": "Q: What are the four fundamental forces of physics?\nA:"}, |
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
| // ~/.pi/agent/extensions/llama-server.ts | |
| // Pi extension for llama-server router integration | |
| // | |
| // Configure per-project via .pi/llama-server.json: | |
| // { "url": "http://10.0.0.5:9090" } | |
| // | |
| // Or globally via env: LLAMA_SERVER_URL=http://host:port | |
| // Defaults to http://127.0.0.1:8080 | |
| import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; |
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
| Model stats: | |
| - Total parameters: 21B | |
| - Active parameters per token: 3.6B | |
| - Experts: 32 total, 4 active per layer | |
| - Layers: 24 | |
| - Expert precision: 4-bit (0.5 bytes per parameter) | |
| - Dense precision: BF16 (2 bytes per parameter) | |
| 1. Expert size: |
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
| #include "ggml.h" | |
| #include "ggml-cpu.h" | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| #include <string.h> | |
| #include <algorithm> | |
| #include <vector> | |
| // Function to print a tensor in readable format |
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 os,json | |
| import subprocess | |
| from email.mime.text import MIMEText | |
| from email.mime.multipart import MIMEMultipart | |
| import smtplib | |
| import sys | |
| from datetime import datetime,timedelta | |
| import time | |
| #change this your email/password or any random email password. You have to enable less secure apps for this to work (i.e. send emails from your email) |
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
| #kindly stolen from getjab.in | |
| 582 Adilabad | |
| 320 Agar | |
| 622 Agra | |
| 154 Ahmedabad | |
| 770 Ahmedabad Corporation | |
| 391 Ahmednagar | |
| 425 Aizawl East | |
| 426 Aizawl West | |
| 507 Ajmer |
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
| PVector[] stars; | |
| float[] phase; | |
| void setup() { | |
| size(600, 600, P3D); | |
| stars = new PVector[1000]; | |
| phase = new float[1000]; | |
| for(int i = 0 ; i < 1000; ++i) { | |
| stars[i] = new PVector(random(width), random(height)); |
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
| void setup() { | |
| size(600, 600, P3D); | |
| smooth(8); | |
| hint(ENABLE_STROKE_PURE); | |
| } | |
| ArrayList<Ripple> ripples = new ArrayList<Ripple>(); | |
| // R is total radius of the thing |
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
| do { | |
| standInLine(); | |
| } while(!She.hasTime()); | |
| SpendEvening(); | |
| function SpendEvening(){ | |
| if(goingToDance) { | |
| var chance = Math.random(); | |
| if(chance < LEAVE_WITHOUT_ME) { |
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 peasy.*; | |
| PeasyCam cam; | |
| void setup() { | |
| size(600, 600, P3D); | |
| smooth(8); | |
| cam = new PeasyCam(this, 400); | |
| } |