Skip to content

Instantly share code, notes, and snippets.

View pokutuna's full-sized avatar
👁️
👄 👁 👂

pokutuna pokutuna

👁️
👄 👁 👂
View GitHub Profile
#!/bin/bash
#
# Check that current Google models on Vertex AI work with the global endpoint.
#
# Usage:
# ./check_global_endpoint.sh PROJECT_ID
#
# Prerequisites:
# - gcloud CLI installed and authenticated
# - curl, jq
@pokutuna
pokutuna / sample.py
Created October 24, 2025 20:03
sample.py
import marimo
__generated_with = "0.17.1"
app = marimo.App()
@app.cell
def _():
import numpy as np
import matplotlib.pyplot as plt
@pokutuna
pokutuna / config-schema.json
Last active October 9, 2025 07:44
promptfoo config-schema.json with assertionTemplates support
{
"$ref": "#/definitions/PromptfooConfigSchema",
"definitions": {
"PromptfooConfigSchema": {
"type": "object",
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
description: "Simple repro"
prompts: "{{ prompt }}"
providers:
- file://script.py
tests:
- vars:
prompt: hello!
import asyncio
import logging
from pprint import pprint
from langchain_google_vertexai import ChatVertexAI
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_mcp_adapters.tools import load_mcp_tools
from langgraph.prebuilt import create_react_agent
# Mute gemini unsupported schema warnings
@pokutuna
pokutuna / Dockerfile
Last active September 29, 2024 09:55
Label Studio & Litestream on Cloud Run | replace ******* to your setting
# syntax=docker/dockerfile:1
FROM heartexlabs/label-studio:latest
# https://github.com/HumanSignal/label-studio/blob/develop/Dockerfile
# Litestream
USER root
ENV LITESTREAM_VERSION=v0.3.13
RUN ARCH=$(case $(uname -m) in x86_64) echo 'amd64';; aarch64) echo 'arm64';; *) echo 'unsupported' && exit 1;; esac) \
&& curl -sL "https://github.com/benbjohnson/litestream/releases/download/${LITESTREAM_VERSION}/litestream-${LITESTREAM_VERSION}-linux-${ARCH}.deb" \
@pokutuna
pokutuna / main.go
Last active January 28, 2023 04:40
package main
import (
"flag"
"image"
"log"
"os"
_ "image/gif"
_ "image/jpeg"
FROM alpine:3.12.0
RUN mkdir /app
COPY print.sh /app
ENV PATH /app:$PATH
ENTRYPOINT ["print.sh"]
@pokutuna
pokutuna / main.go
Created July 8, 2019 12:46
context
package main
import (
"fmt"
"net/http"
"strconv"
"time"
)
type handler struct{}
@pokutuna
pokutuna / txtimeout.go
Created March 11, 2019 06:18
context with transaction
package main
import (
"context"
"fmt"
"time"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"