Skip to content

Instantly share code, notes, and snippets.

View sundy-li's full-sized avatar
🏠
Working from home

sundyli sundy-li

🏠
Working from home
View GitHub Profile
@sundy-li
sundy-li / ollama_fast_speech_text_speech.py
Created February 17, 2024 02:58 — forked from lucataco/ollama_fast_speech_text_speech.py
speech to text to speech using Ollama
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory
brew install portaudio
brew install git-lfs
git lfs install
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
@sundy-li
sundy-li / latency.txt
Created March 29, 2019 09:28 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@sundy-li
sundy-li / sendmail_setup.md
Created February 24, 2017 15:42 — forked from kany/sendmail_setup.md
Setup SENDMAIL on Mac OSX Yosemite
@sundy-li
sundy-li / gist:fecf6a3c93fcf9ae7530f77d7f92602c
Created November 9, 2016 03:53 — forked from eduardocardoso/gist:82a629882ddb02ab3677
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi
@sundy-li
sundy-li / install_jenkins_plugin.sh
Created September 19, 2016 06:34 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins