Skip to content

Instantly share code, notes, and snippets.

View Proteusiq's full-sized avatar
💭
:s/^./# &/wq

Prayson Wilfred Daniel Proteusiq

💭
:s/^./# &/wq
View GitHub Profile
@Proteusiq
Proteusiq / birds.py
Created December 13, 2025 16:01
birds of feathers
import ibis
conn = ibis.connect("duckdb://") # bigguery://, snowfalke://, etc
# load penguin data
penguins = conn.read_csv(
"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/penguins.csv"
)
# query: find female penguins heavier than their species average
@Proteusiq
Proteusiq / umbrella.py
Last active December 12, 2025 18:51
completed
from typing import NamedTuple
import httpx
from smolagents import CodeAgent, LiteLLMModel, Tool
class Coordinates(NamedTuple):
latitude: float
longitude: float
@Proteusiq
Proteusiq / umbrellaI.py
Created December 11, 2025 17:30
encomplete example
from typing import NamedTuple
from smolagents import CodeAgent, LiteLLMModel, Tool
class Coordinates(NamedTuple):
latitude: float
longitude: float
model = LiteLLMModel(
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "aioclock",
# "diskcache",
# "httpx",
# ]
# ///
from contextlib import asynccontextmanager
@Proteusiq
Proteusiq / scheduleI.py
Last active December 8, 2025 21:03
incomplete
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "aioclock",
# "diskcache",
# "httpx",
# ]
# ///
from typing import Any
@Proteusiq
Proteusiq / bolig_james.py
Created December 6, 2025 17:04
navigate json
#!/usr/bin/env -S uv run --quiet --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "httpx",
# "jmespath",
# "rich",
# ]
# ///
@Proteusiq
Proteusiq / vision.py
Created December 5, 2025 14:36
give bytes eyes
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "httpx",
# "rich",
# ]
# ///
# script require llama.cpp: > llama-server -hf ggml-org/SmolVLM-500M-Instruct-GGUF --n-predict -1
@Proteusiq
Proteusiq / fast_speech_text_speech.py
Last active March 29, 2024 14:08 — forked from thomwolf/fast_speech_text_speech.py
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
#!/bin/bash
sudo apt update -y
sudo apt install git gcc make openssl libssl-dev \
libbz2-dev libreadline-dev libsqlite3-dev zlib1g-dev \
libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev \
tk-dev libssl-dev openssl libffi-dev \
-y
# install
@Proteusiq
Proteusiq / datacache.py
Created July 10, 2021 06:42
Share objects
import json
import zlib
from typing import Any, Optional, Dict
import diskcache as dc
class DataCache:
def __init__(
self,
cache_path: str,