Skip to content

Instantly share code, notes, and snippets.

View cip8's full-sized avatar
๐Ÿ‘‹

Ciprian Cimpan cip8

๐Ÿ‘‹
View GitHub Profile
@chandika
chandika / FACTORY_PROXY_CC.md
Last active October 20, 2025 09:58 — forked from ben-vargas/FACTORY_CLIProxyAPI_Claude_ChatGPT.md
Factory CLI with Claude Subscription / ChatGPT Codex via CLIProxyAPI

Executive Summary

This guide documents how to use Factory's Droid CLI with your Claude Code Max subscription (OAuth authentication) instead of pay-per-token API keys. The solution leverages CLIProxyAPI as a transparent authentication proxy that converts API key requests from Factory CLI into OAuth-authenticated requests for Anthropic's API.

Architecture Overview

Factory CLI โ†’ [Anthropic Format + API Key] โ†’ CLIProxyAPI โ†’ [Anthropic Format + OAuth] โ†’ Anthropic API
                                                  โ†“
 (Auth Header Swap)
@jmanhype
jmanhype / Tutorial: GEPA for Quantitative Trading Strategies.md
Last active October 7, 2025 22:28
Tutorial demonstrating GEPA optimization for quantitative trading strategies with DSPy

Tutorial: GEPA for Quantitative Trading Strategies

In this tutorial, we optimize GPT-4.1 Mini's Chain of Thought (dspy.ChainOfThought) for generating profitable trading strategies using the dspy.GEPA optimizer! We demonstrate how to evolve prompts for different strategy themes (momentum, mean reversion, breakout, arbitrage, volume) with proper risk management.

The Vision: Autonomous Trading Research with Theme Specialization

This implementation realizes Kagen Atkinson's vision of an autonomous LLM-powered trading system with:

  • Theme-based Specialization: --theme flag for different strategy types (as Kagen intended)
  • Offline Research Loop (test_gepa_enhanced.py): GEPA evolves theme-specific prompts through reflective optimization
  • Deterministic Execution (run_gepa_trading.py): Uses evolved prompts for strategy generation and backtesting

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@philschmid
philschmid / get_memory_size.py
Created January 16, 2025 13:53
Get needed GPU per precision for a Hugging Face Model Id
from typing import Dict, Union
from huggingface_hub import get_safetensors_metadata
import argparse
import sys
# Example:
# python get_gpu_memory.py Qwen/Qwen2.5-7B-Instruct
# Dictionary mapping dtype strings to their byte sizes
bytes_per_dtype: Dict[str, float] = {
@dhh
dhh / linux-setup.sh
Last active September 23, 2025 13:15
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
// The builder pattern makes it really hard to return errors during a build
// step. Consider using functional options instead, which work much better with
// incremental errors.
// Let's say you have the builder pattern.
type T struct { ... }
func (t *T) A(arg string) *T {
// do stuff here with t and arg
return t
@homerjam
homerjam / nuxt-auth-firebase-scheme.ts
Created June 4, 2020 12:39
Nuxt Auth Firebase Scheme
import type { SchemeOptions } from '@nuxtjs/auth-next/dist';
import BaseScheme from '@nuxtjs/auth-next/dist/schemes/_scheme';
import * as firebase from 'firebase/app';
import 'firebase/auth';
import jwt from 'jsonwebtoken';
import memoizer from 'lru-memoizer';
import fetch from 'node-fetch';
const DEFAULTS: SchemeOptions = {
name: 'firebase',
@ahmetozer
ahmetozer / IPv4-IPv6-domain-regex.go
Last active October 28, 2024 07:25
Ipv4 - IPv6 - domain Regex Golang
ipv6_regex := `^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$`
ipv4_regex := `^(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4})`
domain_regex := `^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$`
match, _ := regexp.MatchString(ipv4_regex+`|`+ipv6_regex+`|`+domain_regex, host)
if match {
fmt.Println("Input is valid")
} else {
fmt.Println("Given input does not match")
re
@PashCracken
PashCracken / WSL-with-zsh-and-powerlevel9k.png
Last active September 4, 2023 07:28
WSL, zsh and Powerlevel10k
WSL-with-zsh-and-powerlevel9k.png
{
"categories": [{
"name": "action",
"key": "action",
"icons": [{
"id": "ic_3d_rotation",
"name": "3d rotation",
"group_id": "action",
"keywords": ["action, 3d, rotation"],
"ligature": "3d_rotation",