Skip to content

Instantly share code, notes, and snippets.

View prasanthj's full-sized avatar

Prasanth Jayachandran prasanthj

View GitHub Profile
@cedrickchee
cedrickchee / llama-7b-m1.md
Last active November 5, 2024 19:40
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.

@rajkrrsingh
rajkrrsingh / Hive Replication V2 startup guide.md
Last active November 4, 2021 08:24
Jump start guide for Hive Replication V2 - to know more about hive replication please refer https://cwiki.apache.org/confluence/display/Hive/HiveReplicationv2Development

Prerequisite hive settings:

set hive.server2.logging.operation.level=execution;
set hive.metastore.transactional.event.listeners=org.apache.hive.hcatalog.listener.DbNotificationListener;
set hive.metastore.dml.events=true;

Setup database and tables

@vvalorous
vvalorous / publicSubnets.go
Created September 25, 2018 19:49 — forked from stavxyz/publicSubnets.go
finding public subnets in go
package main
import (
"fmt"
"sort"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
@brbarnett
brbarnett / AKSClusterConfigurationReader.json
Created August 3, 2018 18:09
Create Azure custom role for az aks get-credentials
{
"Name":"AKS Cluster Configuration Reader",
"Id":"{{ create a unique guid }}",
"IsCustom":true,
"Description":"Can get AKS configuration.",
"Actions":[
"Microsoft.ContainerService/managedClusters/accessProfiles/listCredential/action",
"Microsoft.ContainerService/managedClusters/listClusterUserCredential/action"
],
"NotActions":[
@stavxyz
stavxyz / publicSubnets.go
Last active August 21, 2020 15:13
finding public subnets in go
package main
import (
"fmt"
"sort"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ec2/ec2iface"
@prasanthj
prasanthj / lirc-pi3.txt
Last active June 20, 2024 10:09
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
@t3rmin4t0r
t3rmin4t0r / report-3x-jmeter.py
Created May 19, 2017 19:55
Process tests into jmeter
import sys, re, math, os
from xml.dom.minidom import parse
from collections import namedtuple
Sample = namedtuple("Sample", ['query', 'duration', 'success', 'end', 'start', 'user'])
RUN_NUM = re.compile(r'(?P<query>.*\.sql)(_(?P<run>[0-9]*))?')
def runid(q):
m = RUN_NUM.match(q)
return (m.group('query'), int(m.group('run')))
@timvlaer
timvlaer / gist:721ba30f8fc6a7aac1b0190e132a4261
Created March 21, 2017 12:35
Install Thrift 0.9.3 with brew on macOS
brew unlink thrift
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9d524e4850651cfedd64bc0740f1379b533f607d/Formula/thrift.rb
@t3rmin4t0r
t3rmin4t0r / tez2graph.py
Last active April 22, 2022 02:28
Convert Hive Tez explains into images for debugging
import re, sys
NX = True
try:
import networkx as nx
except:
NX = False
sys.stderr.write("Could not import nx\npip install networkx, please\n")
plan39 = """
Map 1 <- Map 5 (BROADCAST_EDGE), Map 6 (BROADCAST_EDGE), Map 8 (BROADCAST_EDGE), Reducer 7 (BROADCAST_EDGE), Reducer 9 (BROADCAST_EDGE)
from __future__ import print_function
import ctypes
import random
import itertools
class Bits:
@staticmethod
def float2bin(f):