Skip to content

Instantly share code, notes, and snippets.

View sammcj's full-sized avatar
🦃

Sam sammcj

🦃
View GitHub Profile
@sammcj
sammcj / gist:ec38182b10f6be3f7e96f7259a9b37e1
Created December 13, 2024 03:55
download-azure-ai-models.py
import asyncio
import aiohttp
import os
from pathlib import Path
import logging
from bs4 import BeautifulSoup
from typing import List, Dict
from dataclasses import dataclass
from datetime import datetime
import time
@rmtbb
rmtbb / iMessageAttachmentsLinksExtractor.sh
Created November 3, 2024 23:16
iMessage Attachments and Links Extractor for macOS
#!/bin/bash
# Define the main export folder
export_folder=~/Desktop/iMessages_Export
mkdir -p "$export_folder"
# Part 1: Generate the CSV file
echo "Generating CSV file..."
sqlite3 ~/Library/Messages/chat.db <<EOF
@jrruethe
jrruethe / vram.rb
Created August 1, 2024 18:47
Calculate VRAM requirements for LLM models
#!/usr/bin/env ruby
# https://asmirnov.xyz/vram
# https://vram.asmirnov.xyz
require "fileutils"
require "json"
require "open-uri"
# https://huggingface.co/spaces/NyxKrage/LLM-Model-VRAM-Calculator/blob/main/index.html
from txtai import Embeddings, LLM
# Data to index
data = [
"US tops 5 million confirmed virus cases",
"Canada's last fully intact ice shelf has suddenly collapsed, forming a Manhattan-sized iceberg",
"Beijing mobilises invasion craft along coast as Taiwan tensions escalate",
"The National Park Service warns against sacrificing slower friends in a bear attack",
"Maine man wins $1M from $25 lottery ticket",
"Make huge profits without work, earn up to $100,000 a day"
@Artefact2
Artefact2 / README.md
Last active January 12, 2025 13:26
GGUF quantizations overview
@sammcj
sammcj / .textgen.env
Last active May 20, 2024 13:15
Willow Speech + Local LLM + HomeAssistant
# https://github.com/oobabooga/text-generation-webui/blob/main/README.md
# https://github.com/oobabooga/text-generation-webui/blob/main/docs/Spell-book.md
# by default the Dockerfile specifies these versions: 3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX
# https://developer.nvidia.com/cuda-gpus you can find the version for your card here
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
# TORCH_CUDA_ARCH_LIST=6.0,6.1,6.2,7.0,7.5,8.0,8.6+PTX
# RTX3090 = sm_86 and compute_86 (PTX)
#8.6+PTX
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
@ChristophCaina
ChristophCaina / s3-box3.yaml
Last active October 12, 2024 20:34
Code for the ESP32-S3-Box3
#------------------------------------------------------------------------------------#
# PIN Schematics #
# #
# GPIO-00 MCU-BOOT #
# GPIO-01 Speaker Mute-Status #
# GPIO-02 I2S MCLK #
# GPIO-03 Touch-Screen TT21100 Interrupt Pin #
# GPIO-04 ILI92xxx Display DC-Pin (SPI: CLK-Pin) #
# GPIO-05 ILI92xxx Display CS-Pin (SPI: MOSI-Pin) #
# GPIO-06 ILI92xxx Display SDA #
@thimslugga
thimslugga / setup-docker-al2023.md
Last active January 9, 2025 06:42
Setup Docker on Amazon Linux 2023

Setup Docker on Amazon Linux 2023

The following guide is for setting up Docker with docker-compose v2 on Amazon Linux 2023. The steps are intendend for AL2023 on EC2 but should mostly work for the AL2023 VMs running on other hypervisors.

Overview of Updating Amazon Linux 2023

Check for new updates

Get the hosts current Amazon Linux 2023 release:

@veekaybee
veekaybee / normcore-llm.md
Last active January 13, 2025 06:51
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@allenporter
allenporter / notify_agent_agenda.yaml
Last active January 8, 2025 20:52
Home Assistant Blueprint: Conversation agent Agenda Notification
---
blueprint:
name: Conversation agent Agenda Notification
description:
Conversation agent generates a notification based on the upcoming calendar
agenda, location, and weather information.
domain: automation
input:
notify_time:
name: Notification time