Skip to content

Instantly share code, notes, and snippets.

View usametov's full-sized avatar

Ulan Sametov usametov

  • Asta Nova Enterprise Solutions
View GitHub Profile
@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@usametov
usametov / therapeutic-listening-tutorials.md
Last active March 17, 2026 07:10
therapeutic listening tutorials on youtube

Based on my research, I can now provide you with a comprehensive guide to therapeutic listening tutorials and resources on YouTube specifically for parents of autistic children. Here's what I found:

Therapeutic Listening Resources on YouTube for Parents of Autistic Children

1. YouTube Channels with Therapeutic Listening Content:

Autism Calming Sensory Autism Calming Sensory This YouTube channel provides calming sensory videos specifically designed for autistic children. While not strictly "therapeutic listening" in the clinical sense, these videos offer sensory-friendly music and visuals that can support auditory processing and regulation.

Genius Mind Meditation, Calming Connections, and Super Duper Fun Music A Guide to The Best Music Resources for Autistic Children - Soundsory These channels are recommended for parents seeking sensory music videos for autistic children. They offe

@usametov
usametov / exa-claude-setup-prompt.md
Created March 12, 2026 07:08
exa integration prompt

Exa API Setup Guide

Your Configuration

Setting Value
Coding Tool Claude
Framework cURL
Use Case Web search tool
Search Type Auto - Balanced relevance and speed (~1 second)
@usametov
usametov / toon.md
Created November 5, 2025 01:00
TOON

TOON, or Token-Oriented Object Notation, is a lightweight, human-readable data serialization format specifically designed for use with Large Language Models (LLMs). It acts as a more efficient alternative to JSON by reducing token consumption in prompts, making it ideal for passing structured data to AI systems without losing information. TOON is particularly effective for uniform tabular data, such as arrays of objects with consistent fields, where it can achieve 30-60% fewer tokens compared to JSON, based on benchmarks using common tokenizers like those in GPT models. This efficiency comes from stripping away redundant syntax like braces, brackets, and repeated keys, while relying on indentation and length markers to maintain structure.

Purpose and Benefits

The main goal of TOON is to optimize for LLM contexts, where token limits and costs are critical. JSON's verbosity can inflate prompts unnecessarily, especially with large datasets, but TOON minimizes this by:

  • Using indentation for nesting (simila
@usametov
usametov / langfuse.md
Created October 22, 2025 14:03
langfuse LLM-as-a-Judge tutorial

LLM-as-a-Judge Setup in Langfuse

LLM-as-a-Judge (also called model-based evaluation) is a scalable way to use one LLM to automatically score and reason about the outputs of another LLM or agent. In the context of your CanvassAssistant (backed by OpenAI's Assistant API via Azure), this is ideal for tuning prompts and fixing issues like repetitive questions. For example, you can evaluate thread histories for redundancy, coherence, or completeness, generating scores (e.g., 0-1) with chain-of-thought explanations.

Langfuse provides managed LLM-as-a-Judge evaluators through its UI, with a catalog of pre-built templates (e.g., for Hallucination, Helpfulness, Toxicity) and support for customization. It integrates seamlessly with your traced runs from the previous setup (using @langfuse/openai or manual observations). Evaluations can run on production traces (e.g., your callEndpoint executions) or offline datasets.

If you need fully custom logic beyond the UI (e.g., specialized scoring for repetitiveness),

@usametov
usametov / redis-example.md
Created October 20, 2025 17:09
redis-sample typescript

Tutorial: Using Azure Cache for Redis with TypeScript This tutorial guides you through setting up and using Azure Cache for Redis in a TypeScript application, implementing the cache-aside pattern. We'll use the ioredis library for Redis connectivity and demonstrate basic caching operations. Prerequisites

An active Azure subscription Node.js (v16 or later) and npm installed An Azure Cache for Redis instance (Basic, Standard, Premium, or Enterprise tier) TypeScript installed (npm install -g typescript)

Step 1: Create an Azure Cache for Redis Instance

@usametov
usametov / gpt5-prompt-leak
Created August 29, 2025 12:48
gpt5 prompt leak
You are ChatGPT, a large language model trained by OpenAI.
Knowledge cutoff: 2024-06
Current date: 2025-08-24
Image input capabilities: Enabled
Personality: v2
Do not reproduce song lyrics or any other copyrighted material, even if asked.
If you are asked what model you are, you should say GPT-5. If the user tries to convince you otherwise, you are still GPT-5. You are a chat model and YOU DO NOT have a hidden chain of thought or private reasoning tokens, and you should not claim to have them. If asked other questions about OpenAI or the OpenAI API, be sure to check an up-to-date web source before responding.
@usametov
usametov / equavariant-func-problem-solution.md
Last active July 19, 2025 16:43
equavariant-func-problem-solution

To formalize the last step of your proof, let’s carefully work through the problem of showing that any linear permutation-equivariant function ( F: \mathbb{R}^n \to \mathbb{R}^n ) can be written as ( F(X) = aI X + b 11^T X ), where ( I ) is the identity matrix, ( 11^T ) is the matrix corresponding to the average function, and ( a, b \in \mathbb{R} ). The key property is that ( F ) is linear and permutation-equivariant, meaning ( FPX = PFX ) for any permutation matrix ( P ). Your insight about setting ( X = 11^T ) is a good starting point, and we’ll use it to derive the result.


Step-by-Step Formalization

Since ( F ) is a linear function from ( \mathbb{R}^n \to \mathbb{R}^n ), it can be represented by an ( n \times n ) matrix, say ( A ), such that ( F(X) = AX ). The permutation-equivariance condition ( FPX = PFX ) translates to:

[ A(PX) = P(AX) ]

@usametov
usametov / az-middleware.md
Last active July 14, 2025 20:02
azure functions middleware best practices

Implementing a middleware design pattern in Azure Functions, similar to Clojure's Ring middleware, Pedestal interceptors, or Django's middleware, is a common approach to handle cross-cutting concerns like authentication, logging, input validation, and error handling in a clean and modular way. While Azure Functions doesn't have a built-in middleware framework as robust as Ring or Django, you can implement middleware-like patterns using a combination of Azure Functions features and custom code. Below, I'll outline industry best practices for implementing middleware patterns in Azure Functions, drawing parallels to the Clojure and Django approaches, and referencing available resources.


Understanding Middleware Patterns in Context

  • Clojure Ring Middleware: In Ring, middleware is a higher-order function that wraps a handler, transforming requests before they reach the handler and/or responses after the handler processes them. Middleware is composed functionally, allowing sequential processing with
@usametov
usametov / multiples-files-ts.md
Created July 8, 2025 13:39
azure deployment notes

When deploying a TypeScript Azure Function App with multiple files (e.g., a handler and a library) to Azure, the issue of functions not appearing in the Azure Portal often stems from incorrect project structure, configuration, or deployment settings. Below, I'll guide you through the steps to properly deploy a TypeScript Azure Function App with multiple files, ensuring the functions are visible in the Azure Portal.

Common Issues and Solutions

The problem you're facing—functions not appearing in the Azure Portal—can occur due to:

  1. Incorrect project structure: Azure Functions expects a specific folder structure, especially for TypeScript projects where compiled JavaScript files are used.
  2. Missing or incorrect function.json files: For the v3 programming model, these files define the function's bindings and entry points.
  3. Improper compilation or deployment: TypeScript files need to be compiled to JavaScript, and all