Skip to content

Instantly share code, notes, and snippets.

View yusiwen's full-sized avatar

Siwen Yu yusiwen

View GitHub Profile
# Bring in deps
import streamlit as st
from langchain.llms import LlamaCpp
from langchain.embeddings import LlamaCppEmbeddings
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from langchain.document_loaders import TextLoader
from langchain.text_splitter import CharacterTextSplitter
from langchain.vectorstores import Chroma
@00sapo
00sapo / config.lua
Last active February 6, 2023 04:14
-- GistID: 8a79cef93c34ab39ba7264d582a0af15
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
-- +-----------------------------------------+
-- | General |
-- +-----------------------------------------+
-- default shell to avoid slow downs with fish
@wheelcomplex
wheelcomplex / reset-proxmox-cluster.sh
Created September 16, 2021 06:52 — forked from nderjung/reset-proxmox-cluster.sh
Reset proxmox cluster
#/bin/bash -xe
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';"
@seltzered
seltzered / kbct.yaml
Last active January 29, 2023 04:07
Custom Linux KBCT Keymap for Nuphy Nutype F1 Keyboard
# Custom Linux Keymap for Nuphy Nutype F1 Keyboard
# - Swap capslock for escape
# - Swap escape combo for grave accent & tilde
# - Enable capslock via shift modifiers
# (helpful in rare scenarios where kbct screws up)
#
# Notes:
# - This remap file is intended for use with kbct.
# See https://github.com/samvel1024/kbct/
# - This config assumes (but doesn't require)
@Sherex
Sherex / wikijs-keycloak-config-guide.md
Last active March 20, 2024 09:25
A guide for configuring Keycloak as a authentication provider in WikiJS | https://wiki.js.org | Feature request for adding this to the docs: https://requarks.canny.io/wiki/p/keycloak-auth-docs-proposal-for-a-guide-written
@windwp
windwp / i3-swallow.py
Last active January 4, 2023 11:27
i3-swallow used to swallow a terminal window in i3
#!/usr/bin/env python3
#-----------------------------------------------
# used to swallow a terminal window in i3
#
# INSTALL
# Install python 3 and install i3ipc libary
# pip3 install i3ipc
# download this scrript and put it to your i3 config folder and run
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@Yi-Z0
Yi-Z0 / README.md
Last active November 18, 2022 12:42
《docker + clash 旁路由 透明代理 兲朝上网》

食用方法

  1. 开启混杂模式

    ip link set eth0 promisc on

  2. docker创建网络,注意将网段改为你自己的

    docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth0 macnet

  3. 提前准备好正确的clash config , 必须打开redir在7892, 以及dns在53端口

@fworks
fworks / install-zsh-windows-git-bash.md
Last active November 8, 2024 05:43
Zsh / Oh-my-zsh on Windows Git Bash
@kacole2
kacole2 / harbor.sh
Last active November 2, 2024 11:16
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)