Skip to content

Instantly share code, notes, and snippets.

View jonahgeorge's full-sized avatar

Jonah George jonahgeorge

View GitHub Profile
@jonahgeorge
jonahgeorge / llama-7b-m1.md
Created April 4, 2023 05:20 — forked from cedrickchee/llama-7b-m1.md
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.

@jonahgeorge
jonahgeorge / semantic-commit-messages.md
Created September 27, 2021 16:13 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@jonahgeorge
jonahgeorge / playground.rs
Created May 13, 2018 17:09 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::collections::HashMap;
use std::fmt::Debug;
pub trait StaticBuilder {
fn build(&self) -> Box<HasName>;
}
struct UserBuilder;
impl StaticBuilder for UserBuilder {
Ubuntu 14.04 Setup
```sh
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install neovim
```
https://github.com/Shougo/dein.vim
FROM openjdk:8-jdk-slim
RUN curl -fSL https://github.com/eclipse/eclipse.jdt.ls/archive/v0.15.0.tar.gz
@jonahgeorge
jonahgeorge / 01-azure-cli.sh
Last active April 5, 2018 11:27
Azure Kubernetes
# Install Azure CLI
brew update
brew install azure-cli
# Authenticate cli client
az login
# Register providers
az provider register -n Microsoft.ContainerService
az provider register -n Microsoft.Compute
@jonahgeorge
jonahgeorge / events.sql
Created October 3, 2017 13:30
Weatherglass Bucket Query
create or replace function bucket(timestamp, interval)
returns timestamptz
as $$
select
to_timestamp(
floor(
extract(epoch from $1) /
extract(epoch from $2)
) * extract(epoch from $2)
);
<?php
class Repo
{
function __construct($conn = null)
{
$this->conn = $conn ?? new PDO(Zend_Registry::get("DATABASE_URL"));
}
}
package main
import (
"fmt"
"net/http"
"log"
"io/ioutil"
"github.com/russross/blackfriday"
)
import sys
import re
import csv
from math import log
def parse_row(row):
[sentence, score] = row.split('\t')
sentence = sentence.lower()
sentence = re.sub('/', ' ', sentence)
sentence = re.sub('[^a-z\s]+', '', sentence)