Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
FAST Single-Model Email Auto Reply Script
This ultra-optimized script:
1. Uses a single model for ALL tasks (eliminates model switching overhead)
2. Combines multiple steps into single prompts where possible
3. Streamlines processing for minimal latency
4. Maintains quality while maximizing speed
require 'open3'
require 'tempfile'
require 'json'
require 'net/http'
require 'benchmark'
# Set up audio recording parameters
format = 'wav' # Changed to wav format for better compatibility
temp_file = Tempfile.new(['recording', ".#{format}"])
@recording = false
@ttunguz
ttunguz / gist:686bb1e28f2df4e66373cdf57bf61627
Created December 15, 2023 05:50
Dictation with Whisper.cpp
from pynput.keyboard import Key, Listener, Controller
import sounddevice as sd
import numpy as np
from scipy.io.wavfile import write
import subprocess
import os
import re
import datetime
# Set the sample rate to 16 kHz
Verifying my Blockstack ID is secured with the address 12r69VE7tvtzHXqQ85yLnEJzDn19QDXAZ7 https://explorer.blockstack.org/address/12r69VE7tvtzHXqQ85yLnEJzDn19QDXAZ7
library(ggplot2)
library(reshape)
library(scales)
### INSTRUCTIONS
# 1. Save file to same local directory
# 2. Change time zone specification in third IMPORT DATA statement
# 3. In each top_n_for_hour or top_n_for_day, test to statistical significance by comparing the result of the top_n function and the result of the matrix t test