Skip to content

Instantly share code, notes, and snippets.

@ahoho
ahoho / prompt_alpaca_lora.py
Last active May 6, 2024 09:23
Create a huggingface pipeline with a lora-trained alpaca
from typing import Optional, Any
import torch
from transformers.utils import is_accelerate_available, is_bitsandbytes_available
from transformers import (
AutoTokenizer,
AutoModelForCausalLM,
GenerationConfig,
pipeline,
@jikkujose
jikkujose / .tmux.conf
Created November 17, 2013 04:37
Change prefix key in tmux to back-tick and still type back-ticks
unbind C-b
set-option -g prefix `
bind ` send-prefix
@kilhage
kilhage / nginx-gzip.conf
Created December 4, 2015 11:07
Enables gzip compression for common mime types in nginx
# most people include something like this. don't.
# check your default nginx.conf, it's already covered in a much better way.
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# compress proxied requests too.
# it doesn't actually matter if the request is proxied, we still want it compressed.
gzip_proxied any;
# a pretty comprehensive list of content mime types that we want to compress
# there's a lot of repetition here because different applications might use different
@skgmn
skgmn / README.md
Last active May 6, 2024 09:21
Step by step to use Android library which has been published to GitHub Packages.
  1. Go to [Your Profile] => [Developer settings] => [Personal access token] => [Generate new token] on github.com
  2. Check read:packages
  3. Click Generate token
  4. Copy the generated token
  5. Add below lines to your ~/.gradle/gradle.properties (the path may be different on Windows)
GITHUB_ID={your github id}
GITHUB_PACKAGES_TOKEN={the generated token}
  1. Merge below lines to your <project root>/settings.gradle (If you are using the recent version of Android Gradle Plugin)
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@Starraider
Starraider / vim_tips.md
Last active May 6, 2024 09:21
Tips & Tricks for Vim/NeoVim

Tips & Tricks for Vim/NeoVim

Keyboard Shortcuts

Be aware the following shortcuts are only working, if you have the plugins installed mentioned below.

In Command Mode:

:w              Save file

:w filename Save file under new filename

@krisek
krisek / alert.rules.yml
Last active May 6, 2024 09:20
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@DomPizzie
DomPizzie / README-Template.md
Last active May 6, 2024 09:19
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@akshaykhadse
akshaykhadse / README.md
Last active May 6, 2024 09:19
C++ Google Colab Plugin

C++ Google Colab Plugin

Example notebook can be found here.

@cschin
cschin / hosts-yt-ads
Created December 16, 2020 07:33 — forked from ewpratten/hosts-yt-ads
youtube ads hosts file
0.0.0.0 ads.doubleclick.net
0.0.0.0 s.ytimg.com
0.0.0.0 ad.youtube.com
0.0.0.0 ads.youtube.com
0.0.0.0 clients1.google.com
0.0.0.0 dts.innovid.com
0.0.0.0 googleads4.g.doubleclick.net
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 pixel.moatads.com
0.0.0.0 rtd.tubemogul.com