Skip to content

Instantly share code, notes, and snippets.

View iddar's full-sized avatar
🤹‍♂️
code juggling

Iddar Olivares iddar

🤹‍♂️
code juggling
View GitHub Profile
@thomwolf
thomwolf / fast_speech_text_speech.py
Last active July 21, 2024 18:37
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
@crasm
crasm / gguf-merge.sh
Last active April 20, 2024 02:32
Shell script for merging TheBloke's .gguf-split model files
#!/bin/sh
log() {
format="$1"; shift
# shellcheck disable=SC2059
>&2 printf "$format\n" "$@"
}
usage() {
>&2 cat <<EOF
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active July 1, 2024 05:32
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@kamidev
kamidev / zig_macos_m1_install.md
Last active April 25, 2023 10:07
Building zig master on M1 Mac
import SwiftUI
let width : CGFloat = 82.0
let height : CGFloat = 82.0
struct ContentView: View {
@State private var toggle = false
var body: some View {
VStack {
Spacer()
ZStack {
Image(systemName: "heart.fill")
//
// ContentView.swift
// HelloStartupAnimation
//
// Created by Apple Design Dev on 1/26/22.
//
import SwiftUI
import PureSwiftUI
//
// ContentView.swift
// ActivityRingAnimation WatchKit Extension
//
// Created by AppleDesignDev on 1/25/22.
//
import SwiftUI
struct ContentView: View {
var body: some View {
TimelineView(.periodic(from: .now, by: 1.0)) { timeline in
//
// ContentView.swift
// MadeForYouCard
//
// Created by AppleDesignDev on 1/24/22.
//
import SwiftUI
struct ContentView: View {
@kuroski
kuroski / camelCase-snake_case-types.ts
Last active June 13, 2024 04:39
Typescript type camelCase / snake_case conversion
type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}`
? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}`
: Lowercase<S>
type KeysToCamelCase<T> = {
[K in keyof T as CamelCase<string & K>]: T[K]
}
type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ?