Skip to content

Instantly share code, notes, and snippets.

@cedrickchee
cedrickchee / llama-7b-m1.md
Last active May 2, 2024 12:47
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

@tyliec
tyliec / bot.js
Created July 19, 2020 01:11
Discord Speech to Text Bot
// Starter Code: https://gist.github.com/eslachance/3349734a98d30011bb202f47342601d3#file-index_v12-js
const Discord = require("discord.js");
const speech = require('@google-cloud/speech');
const fs = require('fs');
/*
DISCORD.JS VERSION 12 CODE
*/
const client = new Discord.Client();
@cassiozen
cassiozen / pixelbook-dev-setup.md
Last active October 22, 2023 12:06 — forked from denolfe/pixelbook-linux-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@karpathy
karpathy / min-char-rnn.py
Last active May 8, 2024 20:15
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mattes
mattes / call
Last active December 29, 2020 09:49
Place a call from terminal using your iPhone (Mac OS X Yosemite & iOS 8)
#!/usr/bin/env sh
open "tel://$*"
@kachayev
kachayev / css-parser.md
Last active November 12, 2022 04:20
Parsing CSS file with monadic parser in Clojure
(defun psamim-push-gtasks-todos ()
"Asynchronously syncs to Google tasks"
(interactive)
(org-tags-sparse-tree t "+TODO=\"NEXT\"")
(org-export-visible ?\s nil)
(delete-matching-lines "^\* .*")
(replace-string "** NEXT" "*")
(write-file psamim-mobile-todo-org-file nil)
(my-window-killer)
(message "Pushing todos started")
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@schlamar
schlamar / ssdp.py
Created April 20, 2012 12:45
Simple Python SSDP discovery
import socket
import struct
import sys
from httplib import HTTPResponse
from BaseHTTPServer import BaseHTTPRequestHandler
from StringIO import StringIO
import gtk
import gobject