I hereby claim:
- I am royge on github.
- I am roye (https://keybase.io/roye) on keybase.
- I have a public key ASBQIpj-UhA8sTeDn6lcSBwtrC7KveGtk0xcVBwxCCZcfwo
To claim this, I am signing this object:
git clone https://github.com/haotian-liu/LLaVA.git | |
cd LLaVA | |
pip install --upgrade pip | |
pip install torch | |
pip install -e . | |
# for runpod: edit pod to have port 3000 and 100GB of temporary storage | |
python3 -m llava.serve.controller --host 0.0.0.0 --port 10000 | |
# open new terminal, keep previous one open | |
python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-v1.5-13b | |
# open new terminal, keep previous one open |
package checkenv | |
import ( | |
"os" | |
"testing" | |
) | |
func CheckEnvs(t *testing.T, envs ...string) { | |
t.Helper() |
I hereby claim:
To claim this, I am signing this object:
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install
will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# Vault config | |
export VAULT_ADDR=http://127.0.0.1:8200 | |
export VAULT_TOKEN=<your-vault-token> | |
TMP_FILE=$(mktemp) | |
# Get new credentials | |
vault read aws/creds/admin > $TMP_FILE | |
# Extract from the output. |
name old time/op new time/op delta | |
BinaryTree17 5.44s ± 2% 3.27s ± 2% -39.90% (p=0.000 n=20+19) | |
Fannkuch11 4.95s ± 2% 2.68s ± 2% -45.87% (p=0.000 n=20+20) | |
FmtFprintfEmpty 142ns ± 2% 49ns ± 3% -65.39% (p=0.000 n=20+18) | |
FmtFprintfFloat 765ns ± 2% 260ns ± 2% -66.02% (p=0.000 n=20+20) | |
FmtFprintfInt 341ns ± 2% 95ns ± 2% -72.08% (p=0.000 n=19+20) | |
FmtFprintfIntInt 554ns ± 2% 150ns ± 1% -72.95% (p=0.000 n=20+19) | |
FmtFprintfPrefixedInt 497ns ± 3% 178ns ± 3% -64.12% (p=0.000 n=20+20) | |
FmtFprintfString 466ns ± 2% 86ns ± 3% -81.54% (p=0.000 n=20+20) | |
FmtManyArgs 2.23µs ± 2% 0.59µs ± 1% -73.46% (p=0.000 n=20+17) |
package main | |
/* | |
URL: https://github.com/mccoyst/myip/blob/master/myip.go | |
URL: http://changsijay.com/2013/07/28/golang-get-ip-address/ | |
*/ | |
import ( | |
"net" | |
"os" |
// getMacAddr gets the MAC hardware | |
// address of the host machine | |
func getMacAddr() (addr string) { | |
interfaces, err := net.Interfaces() | |
if err == nil { | |
for _, i := range interfaces { | |
if i.Flags&net.FlagUp != 0 && bytes.Compare(i.HardwareAddr, nil) != 0 { | |
// Don't use random as we have a real address | |
addr = i.HardwareAddr.String() | |
break |
# download PCRE and nginx source | |
sudo mkdir -p /usr/local/src | |
cd /usr/local/src | |
# copy PCRE to directory | |
# eg. cp /tmp/pcre-8.20.tar.gz /usr/local/src/ | |
tar xzvf pcre-8.20.tar.gz | |
cd pcre-8.20 | |
./configure --prefix=/usr/local | |
make && sudo make install && make clean |
#!/bin/bash | |
# from http://habrahabr.ru/post/108240/ | |
ncpus=`grep -ciw ^processor /proc/cpuinfo` | |
test "$ncpus" -gt 1 || exit 1 | |
n=0 | |
for irq in `cat /proc/interrupts | grep eth | awk '{print $1}' | sed s/\://g` | |
do | |
f="/proc/irq/$irq/smp_affinity" |