Skip to content

Instantly share code, notes, and snippets.

View iamsingularity's full-sized avatar
🏠
Working from home

Shashi Kumar Nagulakonda iamsingularity

🏠
Working from home
View GitHub Profile
@mberman84
mberman84 / main.py
Created November 10, 2023 16:17
OpenChat Code
import requests
import json
import gradio as gr
url = "http://localhost:11434/api/generate"
headers = {
'Content-Type': 'application/json',
}
@ChrisHayduk
ChrisHayduk / merge_qlora_with_quantized_model.py
Last active January 14, 2025 19:03
Merging QLoRA weights with quantized model
"""
The code below combines approaches published by both @eugene-yh and @jinyongyoo on Github.
Thanks for the contributions guys!
"""
import torch
import peft
@kconner
kconner / macOS Internals.md
Last active March 11, 2025 07:16
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

import openai
import streamlit as st
from streamlit_chat import message
from dotenv import load_dotenv
import os
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
import openai
from langchain.document_loaders import UnstructuredMarkdownLoader
from langchain.chains.question_answering import load_qa_chain
@pudquick
pudquick / brew.md
Last active February 24, 2025 18:19
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
# Source: https://gist.github.com/6955a3fa05665c6b8bb7a3a48ebbdd23
##########################################
# DevSpace #
# Development Environments in Kubernetes #
# https://youtu.be/nQly_CEjJc4 #
##########################################
# Referenced videos:
# - How To Create Virtual Kubernetes Clusters With vcluster By loft: https://youtu.be/JqBjpvp268Y
@Demiu
Demiu / move_appdata_win10.md
Last active September 4, 2024 23:48
How to properly move AppData in Windows 10

Moving AppData folder on Windows 10

  1. Create a new user with administrator permissions
  2. Sign out of the current user and sign in as the newly created user
  3. Navigate to C:\Users in File Explorer
  4. Click into the account you want move AppData from
    • There could be a popup telling you that you need to allow yourself to access that user's data, do so
  5. Cut the AppData folder
    • If invisible, go to View and check Hidden Items
  6. Paste in the desired location
@dims
dims / README.md
Last active March 14, 2025 17:35
Kubernetes Resources
@davidteren
davidteren / nerd_fonts.md
Last active March 13, 2025 00:31
Install Nerd Fonts via Homebrew [updated & fixed]