Skip to content

Instantly share code, notes, and snippets.

View RussPalms's full-sized avatar
🌌
Traversing Workspaces

Russell Brian Fulache Dugaduga Jale Palma RussPalms

🌌
Traversing Workspaces
View GitHub Profile
import SwiftUI
struct TimeCycleScreen: View {
@State private var selectedHour: Int = 7
@State private var selectedMinute: Int = 30
@State private var isAM: Bool = true
@State private var timeOfDay: TimeOfDay = .morning
@State private var celestialProgress: CGFloat = 0.3
@State private var sliderValue: Double = 7.5
@RussPalms
RussPalms / .py
Created March 17, 2025 07:21 — forked from Madhav-MKNC/coding-agent.py
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""
//
// GACarousel.swift
// rpg
//
// Created by Chris Hodge on 3/4/25.
//
import SwiftUI
import MetalKit
@RussPalms
RussPalms / tinder-api-documentation.md
Created March 10, 2025 07:24 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@RussPalms
RussPalms / doc.md
Created March 10, 2025 07:16 — forked from jparishy/doc.md
Snapchat Example API Doc
@RussPalms
RussPalms / get_memory_size.py
Created January 18, 2025 12:53 — forked from philschmid/get_memory_size.py
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] = {
@RussPalms
RussPalms / qemu-vulkan-virtio.md
Created December 13, 2024 00:06 — forked from peppergrayxyz/qemu-vulkan-virtio.md
QEMU with VirtIO GPU Vulkan Support

QEMU with VirtIO GPU Vulkan Support

With its latest reales qemu added the Venus patches so that virtio-gpu now support venus encapsulation for vulkan. This is one more piece to the puzzle towards full Vulkan support.

An outdated blog post on clollabora described in 2021 how to enable 3D acceleration of Vulkan applications in QEMU through the Venus experimental Vulkan driver for VirtIO-GPU with a local development environment. Following up on the outdated write up, this is how its done today.

Definitions

Let's start with the brief description of the projects mentioned in the post & extend them:

import asyncio
import base64
import json
import os
import pyaudio
from websockets.asyncio.client import connect
class SimpleGeminiVoice:
def __init__(self):
@RussPalms
RussPalms / umap_sparse.py
Created November 15, 2024 23:31 — forked from johnhw/umap_sparse.py
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@RussPalms
RussPalms / submarine_cable_map.R
Created November 9, 2024 21:36 — forked from tylermorganwall/submarine_cable_map.R
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {