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
@iamsingularity
iamsingularity / Makefile
Created August 19, 2024 13:27 — forked from pommedeterresautee/Makefile
Divide Hugging Face Transformers training times by 2 or more with dynamic padding and uniform length batching
# required by (\ SHELL COMMANDS \)
SHELL:=/bin/bash
VIRT_ENV_FOLDER = ~/.local/share/virtualenvs/xnli
SOURCE_VIRT_ENV = source $(VIRT_ENV_FOLDER)/bin/activate
.PHONY: train
train:
( \
@iamsingularity
iamsingularity / ConvertFrom-SafeLinksURL.ps1
Created August 6, 2024 22:30 — forked from jhochwald/ConvertFrom-SafeLinksURL.ps1
Decode a Office 365 Advanced Threat Protection SafeLinks URL
function ConvertFrom-SafeLinksURL
{
<#
.SYNOPSIS
Decode a ATP SafeLinks URL
.DESCRIPTION
Decode a Office 365 Advanced Threat Protection SafeLinks URL
.PARAMETER SafeLinksURL
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
@iamsingularity
iamsingularity / merge_qlora_with_quantized_model.py
Created March 22, 2024 15:46 — forked from ChrisHayduk/merge_qlora_with_quantized_model.py
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
@iamsingularity
iamsingularity / windows-keys.md
Created February 24, 2024 21:49
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@iamsingularity
iamsingularity / AdvancedDistributedSystemDesignCourseNotes.md
Created December 27, 2023 21:35 — forked from craigtp/AdvancedDistributedSystemDesignCourseNotes.md
Notes on Udi Dahan's Advanced Distributed System Design Course

Advanced Distributed System Design Course - Udi Dahan

Notes by Craig Phillips

Fallacies of Distributed Computing

  • There are 11 fallacies of Distributed Computing:
    1. The network is reliable
    2. Latency isn’t a problem
    3. Bandwidth isn’t a problem
    4. The network is secure
  1. The topology won’t change
@iamsingularity
iamsingularity / README.md
Created December 25, 2023 19:06
1Password Automatic Login for Windows and Linux

Windows - Hacky AHK Script

#SingleInstance Force
#NoEnv
#Warn
SendMode Input
EnvGet, A_LocalAppData, LocalAppData
Run, %A_LocalAppData%\1Password\app\8\1Password.exe
WinWait, 1Password
Send PASSWORD{Enter}
@iamsingularity
iamsingularity / main.py
Created November 10, 2023 23:40 — forked from mberman84/main.py
OpenChat Code
import requests
import json
import gradio as gr
url = "http://localhost:11434/api/generate"
headers = {
'Content-Type': 'application/json',
}
from bs4 import BeautifulSoup
soup = BeautifulSoup(open("C:\\path\\to\\your\\html\\file.html", encoding="utf8"), "html.parser")
print(soup.find_all("div", class_="someclass"))
@iamsingularity
iamsingularity / nerd_fonts.md
Created June 22, 2023 16:11 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]