Skip to content

Instantly share code, notes, and snippets.

import time
import sys
# --- Cross-Platform code to read single key presses without pressing Enter ---
try:
import msvcrt # Works on Windows
def get_key():
return msvcrt.getch().decode('utf-8', 'ignore').lower()
except ImportError:
import tty, termios # Works on Mac/Linux
import random
import argparse
import sys
import os
def get_keyboard_neighbors():
"""
Defines the physical layout of a US QWERTY keyboard.
Keys map to their immediate physical neighbors.
"""
#!/usr/bin/env python3
import os
import sys
import shutil
import subprocess
import argparse
import glob
from datetime import datetime
# --- CONFIGURATION ---
import requests
import re
from bs4 import BeautifulSoup
from urllib.parse import urljoin
# --- Configuration ---
BASE_URL = "http://www.radcap.ru/"
START_PAGE = urljoin(BASE_URL, "index-d.html")
OUTPUT_FILENAME = "radcap-all-streams-0022-aug22-2025.txt"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Song Launchpad</title>
<style>
:root {
--bg-gradient: linear-gradient(135deg, #2c004f, #6b006d, #b51778, #f05454);
--card-bg: rgba(20, 18, 30, 0.8);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RadioSurf</title>
<link rel="icon" href="data:,">
<style>
#!/usr/bin/env python3
import os
import subprocess
import csv
from pathlib import Path
import shutil
from dataclasses import dataclass, field
from typing import List, Dict, Tuple
#!/usr/bin/env python3
import sys
import os
# --- apply_aipatch.py v3 (The "Seeker") ---
# A truly robust tool to apply AI-generated patches.
# Searches for a normalized content block, making it resilient to
# whitespace, indentation, and differing numbers of blank lines.
def normalize_text(text_block):
#!/bin/python3
import os
import subprocess
import requests
import json
import time
import sys
from itertools import cycle
# Replace with your Gemini API key
//Radio Switcher - Discovery mode with Fading, Mute, Refactored For Maintainability + Small Mode
//
// sudo dnf install gcc-c++ mpv-devel ncurses-devel pkg-config make
// Download 'json.hpp' from https://github.com/nlohmann/json.
// g++ radio.cpp -o radio $(pkg-config --cflags --libs mpv ncurses) -pthread
//
// - with Audio Fading
// - Mute functionality
// - Restructured
// - JSON Station Name Logging