This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run Llamafile with LLaVA locally | |
# Source: https://news.ycombinator.com/item?id=38465645 | |
# 1. Download the 4.26GB llamafile-server-0.1-llava-v1.5-7b-q4 file from https://huggingface.co/jartine/llava-v1.5-7B-GGUF/blob/main/...: | |
wget https://huggingface.co/jartine/llava-v1.5-7B-GGUF/resolve/main/llamafile-server-0.1-llava-v1.5-7b-q4 | |
# 2. Make that binary executable, by running this in a terminal: | |
chmod 755 llamafile-server-0.1-llava-v1.5-7b-q4 | |
# 3. Run your new executable, which will start a web server on port 8080: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"secrets": [ | |
{ | |
"name": "DATABASE_PASSWORD", | |
"valueFrom": "arn:aws:ssm:${region}:${account}:parameter/${environment}/${appName}/DATABASE_PASSWORD" | |
} | |
] | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ dc run dev sh | |
Creating network "app_default" with the default driver | |
Creating app_db_1 ... done | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show live stats | |
alias ds='while true; do TEXT=$(docker stats --no-stream $(docker ps --format "{{.Names}}")); sleep 0.1; clear; echo "$TEXT"; done' | |
# Kill all containers | |
alias dk='docker kill $(docker ps -q)' | |
# Docker compose | |
alias dc='docker-compose' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
image: postgres | |
environment: | |
POSTGRES_PASSWORD: password | |
ports: | |
- "5432:5432" | |
dev: | |
build: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
dev: | |
build: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal: | |
def name(self): | |
return "Simba" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source : http://stackoverflow.com/a/5551499/283572 | |
#!/usr/bin/env python | |
# kmeans.py using any of the 20-odd metrics in scipy.spatial.distance | |
# kmeanssample 2 pass, first sample sqrt(N) | |
from __future__ import division | |
import random | |
import numpy as np | |
from scipy.spatial.distance import cdist # $scipy/spatial/distance.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export EDITOR=~/bin/edit | |
export VISUAL=~/bin/edit | |
export ALTERNATE_EDITOR=emacs | |
alias t='terminator 2> /dev/null &' | |
alias g='gedit > /dev/null &' | |
alias em='emacsclient -c > /dev/null&' | |
alias ec='/home/sagar/eclipse/eclipse > /dev/null&' | |
alias ci='google-chrome --incognito > /dev/null&' | |
alias p='ps -e| grep ' | |
alias wifi='/home/sagar/Dropbox/scripts/wifi_rtl_cisco.sh' |
NewerOlder