Skip to content

Instantly share code, notes, and snippets.

View chihebnabil's full-sized avatar
🎯
Focusing

Nabil CHIHEB chihebnabil

🎯
Focusing
View GitHub Profile

[

Text generation models

](/docs/guides/text-generation/text-generation-models)

New capabilities launched at DevDay

Text generation models are now capable of JSON mode and Reproducible outputs. We also launched the Assistants API to enable you to build agent-like experiences on top of our text-generation models. GPT-4 Turbo is available in preview by specifying gpt-4-1106-preview as the model name.

@chihebnabil
chihebnabil / backend.py
Created January 29, 2025 17:17
firebase streamlit
from flask import Flask, request, jsonify
from flask_cors import CORS
import requests
import os
from dotenv import load_dotenv
import re
load_dotenv()
app = Flask(__name__)
CORS(app) # Enable CORS for frontend communication
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',
}
serve(async (req) => {
// Handle CORS preflight requests
@chihebnabil
chihebnabil / token_analysis.py
Created April 6, 2026 22:51 — forked from kieranklaassen/token_analysis.py
Claude Code token usage analyzer - breaks down usage by project, session, and subagent
#!/usr/bin/env python3
"""
Claude Code token usage analyzer.
Analyzes ~/.claude/projects/ JSONL files for token usage patterns.
"""
import json
import os
import sys
from pathlib import Path