Skip to content

Instantly share code, notes, and snippets.

@mrsipan
mrsipan / vicuna.sh
Created April 18, 2023 04:32
llama.cpp for vicuna commands and prompt
View vicuna.sh
./main --color --threads 7 --batch_size 256 --n_predict -1 --top_k 12 --top_p 1 \
--temp 0.36 --repeat_penalty 1.05 --ctx_size 2048 --instruct \
--reverse-prompt "### Human:" \
--model ./models/13B/ggml-vicuna-13b-4bit.bin \
-f prompts/vicuna.txt
printf 'A chat between a curious human and an artificial intelligence assistant.
The assistant gives helpful, detailed, and polite answers to the human's questions.' > prompts/vicuna.txt
View build-python-linux-c7-amz2.sh
build_python() {
if [ -z $1 ]; then
printf "use: $FUNCNAME <destination-dir> <python-version>\n
For example: $FUNCNAME ~/opt/py 3.10.8\n\n"
return 1
fi
directory=$1
python_version=$2
cwd=`pwd`
View spacemacs.el
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
View shadow_cljs_and_fireplace_vim_integration.md
  1. Create an app following the official Shadow-CLJS Quick Start instructions.
  2. Modify shadow-cljs.edn
;; shadow-cljs configuration
{:source-paths
 ["src/dev"
  "src/main"
  "src/test"]

 ;; ADD - CIDER middleware for nREPL (required by fireplace.vim)
View build-python-mac.sh
build_python() {
if [ -z $1 ]; then
printf "use: $FUNCNAME <destination-dir> <python-version>\n
For example: $FUNCNAME ~/opt/py 3.4.2\n\n"
return 1
fi
directory=$1
python_version=$2
cwd="`pwd`"
View build-vim-with-custom-python.sh
#!/bin/sh -vex
printf "%s\n" "Make sure python is compiled with --enable-shared!!!"
rm -rf vim
git clone https://github.com/vim/vim.git
cd vim
export PATH=$HOME/opt/pylocal/bin:$PATH
CPPFLAGS="-I$HOME/opt/pylocal/include"
View files_from_ssl_bag.py
# Use: python files_from_ssl_bag.py <path-to-data-bag-ssl-in-chef>
import os
import json
import argparse
import tempfile
def main(args=None):
parser = argparse.ArgumentParser()
parser.add_argument('data_bag_path', help='data bag path')
View make_ssl_bag.py
import sys
import json
import argparse
def main(args_list=None):
parser = argparse.ArgumentParser()
parser.add_argument('--cert-path', help='cert path')
parser.add_argument('--intermediate-path', help='inter path')
parser.add_argument('--key-path', help='key path')
View build-docker.sh
sudo yum -y install lxc curl zc-utils go git mercurial
export GOPATH=/opt/go
export PATH=$GOPATH/bin:$PATH
mkdir -p $GOPATH/src/github.com/dotcloud
cd $GOPATH/src/github.com/dotcloud
git clone https://github.com/dotcloud/docker.git
cd docker
View linux-with-aufs.sh
#!/bin/sh -vex
# needed rpms
yum -y install ncurses-devel git gcc rpmbuild
TEMPDIR="$(mktemp -d)"
HERE="$(pwd)"
printf "building at: %s\n" $TERMDIR
cd $TEMPDIR