Skip to content

Instantly share code, notes, and snippets.

View roeeyn's full-sized avatar
🦫
Enjoying Development

Rodrigo Medina roeeyn

🦫
Enjoying Development
View GitHub Profile
@roeeyn
roeeyn / llama_three.ex
Created May 21, 2024 14:58 — forked from toranb/llama_three.ex
bumblebee hack to run llama 3
def llama() do
llama = {:hf, "meta-llama/Meta-Llama-3-8B-Instruct", auth_token: "abc123"}
{:ok, model_info} = Bumblebee.load_model(llama, type: :bf16, backend: {EXLA.Backend, client: :cuda})
{:ok, tokenizer} = Bumblebee.load_tokenizer(llama)
{:ok, generation_config} = Bumblebee.load_generation_config(llama)
tokenizer =
tokenizer
|> Map.put(:special_tokens, %{
pad: "<|eot_id|>",
@roeeyn
roeeyn / unwatch-repos.js
Created March 18, 2021 19:13 — forked from rafmagana/unwatch-repos.js
Unwatch multiple repositories at once in GiHub
/* USAGE
Go to https://github.com/watching
Paste this function in the console
e.g. unwatchRepos("rails|node|go")
That unwatches repos containing rails, node or go in the repo link.
*/
var unwatchRepos = (pattern) => {
var list = document.getElementsByClassName('repo-list')[0]
var rows = list.getElementsByClassName('js-subscription-row')
@roeeyn
roeeyn / parse_tabs.py
Created March 10, 2021 22:25
Get All Open Chrome Tabs With Python
#!/usr/bin/env python3
import os
from datetime import datetime
def read_articles_tabs():
articles = os.popen(
"""osascript -e{'set o to""','tell app"google chrome"','repeat with t in tabs of windows','set o to o&url of t&" "&title of t&linefeed',end,end}|sed \$d"""
).read()
return [