Skip to content

Instantly share code, notes, and snippets.

View hagope's full-sized avatar

Omar Al-Jadda hagope

  • Sunnyvale, CA
View GitHub Profile

A collection of notes and scripts I use to set up my development environment in a new machine, specfically WSL2 terminal.

lazygit:

curl https://gist.githubusercontent.com/hagope/c56734a5ecd6ce1426eeb7f4f1b532ab/raw/48e16788a09affef8322cbd13031b99c0aa07546/git_tools.sh | bash

neovim:

curl https://gist.githubusercontent.com/hagope/0ee68f19028a9e96e2b88e65884e02cc/raw/25803927781ba3b74e5090d476c2f36f24538952/install_nvim.sh | bash
alias lg='lazygit'
alias vi='~/nvim-linux64/bin/nvim'
export EDITOR=~/nvim-linux64/bin/nvim
import torch
cpu = torch.device('cpu')
alloc_size = 16e9
print('Allocating')
x = torch.zeros(int(alloc_size / 8),
dtype=torch.float32,
device=cpu)
print('Pinning')
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Newsroom-cli default sources</title>
</head>
<body>
<outline type="rss" title="al-arabiya" xmlUrl="https://english.alarabiya.net/feed/rss2/en.xml" />
<outline type="rss" title="al-jazeera" xmlUrl="http://america.aljazeera.com/content/ajam/articles.rss" />
<outline type="rss" title="bbc" xmlUrl="http://feeds.bbci.co.uk/news/rss.xml" />

Today on Hacker News, the top article was LLaMA2 Chat 70B outperformed ChatGPT linking to a leaderboard of LLMs. As of today, July 27, 2023, the top 10 is as follows:

Model Name Win Rate Length
GPT-4 95.28% 1365
LLaMA2 Chat 70B 92.66% 1790
Claude 2 91.36% 1069
ChatGPT 89.37% 827
WizardLM 13B V1.2 89.17% 1635
Vicuna 33B v1.3 88.99% 1479
@hagope
hagope / helper.py
Last active May 14, 2024 23:59
Query multiple online LLMs with a single prompt
from PIL import Image
import mimetypes
import base64
def determine_image_type(image_path):
try:
with Image.open(image_path) as img:
# Get the format of the image
format = img.format