Skip to content

Instantly share code, notes, and snippets.

View alexfazio's full-sized avatar

Alex Fazio alexfazio

View GitHub Profile
#!/bin/bash
# Enhanced Vulture Dead Code Analysis Script with Dynamic Analysis Insights
# Combines Vulture with ast-grep and optional Python analysis for comprehensive dead code detection
# Configuration
VULTURE_CONFIDENCE=${VULTURE_CONFIDENCE:-100}
SRC_DIR=${SRC_DIR:-./src}
TEST_PATTERNS="test_|_test\.py|tests/|test/|conftest\.py"
VERBOSE=${VERBOSE:-0}
---
name: dead-code-finder
description: Python dead code analyzer using Vulture and ast-grep for comprehensive analysis. Performs thorough verification of potentially unused code and produces detailed markdown reports with reasoning traces for informed decision-making.
tools: Bash, Read, Grep, Glob, Write
model: inherit
color: green
---
You are a senior Python engineer specializing in code maintainability and technical debt analysis, with deep expertise in identifying and verifying potentially unused code in production systems.
#!/usr/bin/env bash
#
# count_tokens.sh - Count tokens in developer files using Claude API
#
# Usage: ./count_tokens.sh [file1.py] [file2.js] [folder/] ...
#
# Arguments:
# - Individual files (any text-based developer file)
# - Directories (recursively finds code, config, markup, and docs)
# - Mix of files and directories
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# It's not necessary to copy all keys to your config.
# If the key is missing in your config, "default-config.toml" will serve as a fallback
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
name description tools model color
memory-profiler
Memory profiling specialist for identifying leaks, inefficiencies, and optimization opportunities. Use proactively to analyze memory usage patterns during actual code execution.
Bash, Read, Grep, Glob
sonnet
green

You are a memory optimization expert specializing in identifying and resolving memory issues through comprehensive profiling.

@alexfazio
alexfazio / contemplative-llms.txt
Created January 7, 2025 09:36 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@alexfazio
alexfazio / gist:3c80db32c21ca335cbf4ca57cf07123b
Created January 4, 2025 08:48
Follow Redirect Without Headless Mode
import time
import undetected_chromedriver as uc
def analyze_redirect_with_undetected_chromedriver_stealth(url):
"""
Uses 'undetected_chromedriver' in non-headless mode for a stealthier approach,
helping bypass basic detection and possible Cloudflare checks.
"""
print("=== Using undetected-chromedriver (non-headless) ===")
print(f"Navigating to: {url}\n")
@alexfazio
alexfazio / convert_archive.py
Created November 17, 2024 19:44 — forked from deepfates/convert_archive.py
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple
@alexfazio
alexfazio / firecrawl_funding_db_demo.ipynb
Last active September 15, 2025 08:18
firecrawl_funding_db_demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# TODO: Add Youtube download module
# TODO: Remember to download the .srt file and transcript from YouTube when you download the video.
# TODO: Verify if it's possible to download the transcript without timings from YouTube.
# TODO: refactor the names of modules
# TODO: Please confirm why an unnecessary .srt file, containing all the subtitles, is being generated in the crew_output.
# TODO: Add a script module to clean the contents of api_response.json after each run. This will help prevent conflicts or errors during the next execution.
# TODO: Add a caption maker in the style of @tsarnick. You may need to input the speaker's name.
# TODO: change subtitle style & format
# TODO: if subtitler.py find existing output, it should overwrite it
# TODO: Improve the speed of Whisper