Skip to content

Instantly share code, notes, and snippets.

View unclecode's full-sized avatar
🎯
Focusing

UncleCode unclecode

🎯
Focusing
View GitHub Profile
@unclecode
unclecode / stupidSoldiers.py
Last active July 14, 2017 07:17
Algorithm to generate stupid soldier patterns
import math
def findAnomalyPosition(n):
bit_length = int(math.ceil(math.log(n, 2)))
#1010 & 0011 = 0010 It means and of any number to 33 << i is returning two consequitive bits at position i and i + 1
#XOR of n eith 2**i is toggling the bit at position i
#so XOR n with 3 >> i is toggling bits at positions i and i + 1 and in our case
#if bits in position i and i + 1 is 2 or 10 we want to make 01 which is this toggling with number 3
return [i for i in range(but_length) if ((x >> i) & 3) == 2 if ((x >> i) & 3) == 2]
def generateNext(x):
@unclecode
unclecode / app.css
Last active May 14, 2019 08:51
A simple gist on p5 js
body {
color:green;
}
@unclecode
unclecode / qwen_2_function_call.py
Created June 30, 2024 07:25
Experimenting with Qwen2 function call for small models of 500 million and 1.5 billion parameters.
import json
from qwen_agent.llm import get_chat_model
# I experimented with the 500 million parameters. It works nicely, but sometimes it doesn't detect all the parameters. For example, in the getCurrentWeather function, it may not detect the value for the second argument, which is the format of the temperature. So it's good practice to set default values for them. However, for very critical parameters, it understands them well.
llm = get_chat_model({
# 'model': 'qwen2:0.5b',
'model': 'qwen2:1.5b',
'model_server': 'http://localhost:11434/v1',
'api_key': 'EMPTY',
@unclecode
unclecode / qa-testflight-guide.md
Last active December 17, 2025 05:10
Crawl4AI Cloud - QA TestFlight Testing Guide

Crawl4AI Cloud - QA TestFlight Program

Hello team! I've set up our internal QA testing program. Please read this carefully and follow the instructions.


Step 1: Get Access

  1. Accept GitHub invitation (check your email)
  2. Visit TestFlight repo: https://github.com/unclecode/crawl4ai-cloud-testflight
@unclecode
unclecode / TESTING_GUIDE.md
Last active December 26, 2025 15:10
Maya WhatsApp Bot - Testing Guide for Testers

Maya Testing Guide

Welcome to the Maya testing team! This guide explains how to test Maya, our WhatsApp AI sales assistant for KidoCode.


Before You Start

Add Maya to Your Contacts

  1. Save this number to your phone contacts: +60 12-319 0721
@unclecode
unclecode / digest_2026-01-03_test5.md
Last active January 4, 2026 04:30
Digest Test 5

Digest Test 5 - 2026-01-03

Source: For You timeline (33 tweets) Method: Full heuristics including major AI companies, scientific papers, DSPy skip


SURFACE (12)

1. @aakashgupta

@unclecode
unclecode / HANDOFF.md
Last active January 4, 2026 07:57
Shitout Session Handoff

Session Handoff

Generated: 2026-01-04 Session Focus: Timeline Curation System with Preference-Based Classification Previous handoff: merged - preserved API context, added curation workflow

MANDATORY FIRST STEPS

  • Read PREFERENCES.md - contains all classification rules and user profile
  • Run git status to verify current state
  • Test cookie auth: uv run python tests/twitter_client/foryou.py 1
  • Verify bookmark folder access: see bookmark_to_folder.py
@unclecode
unclecode / level2_test_results.md
Last active January 4, 2026 11:02
Level 2 Content Fetcher - Test Results (2026-01-04)

Tech Digest - January 4, 2026

Curated tweets with deep-dive analysis of linked content


1. AgentFS: A Filesystem Built for AI Agents

@penberg (Pekka Enberg)

@unclecode
unclecode / digest_newsletter_2026-01-04.md
Last active January 4, 2026 13:20
Tech Digest Newsletter - Level 2 Content Analysis (2026-01-04)

Tech Digest - January 04, 2026

2 curated items with deep-dive analysis


1. WhatsApp REST API: Programmatic Message Sending Without Official API Costs

@tom_doerr (Tom Dörr)