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
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|>", |
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
/* 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') |
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
#!/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 [ |