Skip to content

Instantly share code, notes, and snippets.

View zeke's full-sized avatar
🍊
Busy! @-message me directly if I'm slow to respond.

Zeke Sikelianos zeke

🍊
Busy! @-message me directly if I'm slow to respond.
View GitHub Profile
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
wget "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/resolve/main/${MODEL}"
title authors intro published_at
Hello, world!
evilstreak, zeke
We are saying hello to the world with this blog post.
2022-05-16

Markdown goes here. Post title will be an H1.

Something else

@zeke
zeke / cog-predictor-with-multiple-outputs.py
Created May 12, 2022 20:44
A contrived example of a Cog predictor that produces multiple outputs
# https://github.com/replicate/cog/blob/main/docs/python.md#output
from cog import BasePredictor, BaseModel, File
class Output(BaseModel):
image: File
coords: str
class Predictor(BasePredictor):
def predict(self, source_image: Path = Input(description="Image in which to detect objects")) -> Path:
~/git/arxiv/arxiv-browse develop*
arxiv-browse $ pyenv install 3.6.15
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Installing Python-3.6.15...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.5.2 using python-build 20180424)
baakha
baakhe
baakhi
baakho
baakhu
baekha
baekhe
baekhi
baekho
baekhu
# The predictions table is called models_prediction
# The users table is called users_user
# Select all predictions where the user id is equal to the user with username 'zeke'
SELECT * FROM models_prediction WHERE user_id = (SELECT id FROM users_user WHERE username = 'zeke');
# Count all predictions where the user id is equal to the user with username 'zeke'
SELECT COUNT(*) FROM models_prediction WHERE user_id = (SELECT id FROM users_user WHERE username = 'zeke');
/vendor/gems/2.7.1/ruby/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:34:in `require'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/activesupport-7.0.0.alpha.9d34ed7/lib/active_support/dependencies.rb:332:in `block in require'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/activesupport-7.0.0.alpha.9d34ed7/lib/active_support/dependencies.rb:299:in `load_dependency'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/activesupport-7.0.0.alpha.9d34ed7/lib/active_support/dependencies.rb:332:in `require'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/gettext_i18n_rails-1.8.1/lib/gettext_i18n_rails/tasks.rb:1:in `<top (required)>'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
app/vendor/gems/2.7.1/ruby/2.7.0/gems/bootsnap-1.5.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
app/vendor/gems/2.7.1/ruby
@zeke
zeke / accept-language-headers.js
Created February 5, 2021 16:43
A collection of distinct Accept-Language headers (from wordnerd.fun logs)
[
"*",
"bg-CZ,bg;q=0.9,en-CZ;q=0.8,en;q=0.7,cs-BG;q=0.6,cs;q=0.5,en-US;q=0.4,de;q=0.3",
"ca,en;q=0.9,es;q=0.8,fr;q=0.7",
"ca-es",
"cs",
"cs-CZ,cs;q=0.9,en;q=0.8,sk;q=0.7",
"de,en-US;q=0.7,en;q=0.3",
"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7",
"de-DE,en-US;q=0.7,en;q=0.3",
@zeke
zeke / erb.js
Created January 26, 2021 04:21
Ruby ERB localization snippets for VS Code
{
// Place your snippets for erb here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
"render-pet": {
"prefix": "pet",
"body": [
"<%= t(\"$1\") %>"
ink
inkberries
inkberry
inkblot
inkblots
inked
inker
inkers
inkholder
inkholders