Skip to content

Instantly share code, notes, and snippets.

View wasertech's full-sized avatar
🚀
Studying Information

Danny Waser wasertech

🚀
Studying Information
View GitHub Profile
@LeninGangwal
LeninGangwal / shell-gpt.py
Created June 9, 2023 14:28
Shell GPT using Langchain
from langchain.llms import OpenAI
import os
from langchain import LLMChain, PromptTemplate
import sys
import platform
import distro
from langchain.memory import ConversationBufferMemory
def get_llm():
os.environ["OPENAI_API_KEY"] = "sk-abc"
@wasertech
wasertech / zfunctions.exctract.zsh
Created July 20, 2022 15:01
Zsh function to extract common file formats
### Function extract for common file formats ###
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
else