Skip to content

Instantly share code, notes, and snippets.

View rajivmehtaflex's full-sized avatar
🚀
smile

Rajiv Mehta rajivmehtaflex

🚀
smile
  • Bacancy Technology
  • Ahmedabad
View GitHub Profile
@rajivmehtaflex
rajivmehtaflex / install_dependencies.sh
Last active September 30, 2024 11:23
Install base library for linux
#!/bin/bash
apt update && apt dist-upgrade -y && apt install curl htop neofetch git watch wget nano gpustat -y
curl https://gist.githubusercontent.com/rajivmehtaflex/a1e6de2355e7a16bcd9f38f43a58794b/raw/0636ecab2e4f83c441dbc1b55b562850c3e66859/conda_install.sh | sh
curl https://gist.githubusercontent.com/rajivmehtaflex/d8f83f7b286fd224d66177f40c162076/raw/203b57e93c61c04290442ba5ee44cdec7edff43d/install_brew.sh | sh
curl https://gist.githubusercontent.com/rajivmehtaflex/41c2aa0ffcb3357eeed64872032f1fec/raw/d5e5fed8290ad796ba34c74354ed73f8b61039f5/install_node.sh | sh
curl https://gist.githubusercontent.com/rajivmehtaflex/ad4b89a1a0692cef1824b2053ab6516a/raw/c84777259a5d3905234ed19f8cef75065f29d175/install_terraform.sh | sh
curl https://gist.githubusercontent.com/rajivmehtaflex/d58350fdc2349734734e4e307468f6ab/raw/8695060d4c8c48d1aa904224d015a8a1304ed649/colab_setup_script.sh | sh
curl https://gist.githubusercontent.com/rajivmehtaflex/aa9975e92049d2bfa62264eee4397fe9/raw/6c5c9031c00ebef1231a3ad7a1c72828825f3
@rajivmehtaflex
rajivmehtaflex / install_node.sh
Created January 21, 2024 13:19
Install latest node.
#!/bin/bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
#!/bin/bash
apt-get install build-essential procps curl file git
curl -fsSL -o install-homebrew.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
chmod +x install-homebrew.sh
./install-homebrew.sh
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
source ~/.bashrc
brew --version
@rajivmehtaflex
rajivmehtaflex / quick_chat_test.py
Last active March 1, 2024 15:01
LangChain Quick Snippet
from langchain.chat_models import ChatOpenAI
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful assistant."),
("user", "{input}")
]
)
model=ChatOpenAI(model='<MODEL_NAME>',api_key='<API_KEY>',base_url='<BASE_URL>')
model(prompt.format_messages(input="what is color of flamgingo?"))
#!/bin/bash
pip install -U autotrain-advanced
export HF_TOKEN=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
export AUTOTRAIN_LOCAL=1
autotrain app
#!/bin/bash
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
import autogen
config_list = [
{
'model': 'gpt-4',
'api_key': 'API_KEY'
}
]
llm_config={
@rajivmehtaflex
rajivmehtaflex / Llava-Execution-path.txt
Created October 8, 2023 07:24
Llava-Execution-path
--------As a stand alone utility ------------------
python -m llava.serve.cli \
--model-path liuhaotian/llava-v1.5-7b \
--image-file "https://llava-vl.github.io/static/images/view.jpg" \
--load-4bit
--------------As a service.-----------------------
python3 -m llava.serve.controller --host 0.0.0.0 --port 10000
@rajivmehtaflex
rajivmehtaflex / Mount_google_Drive
Created September 30, 2023 04:59
Mount Google drive on remote system
#---------installation steps---------------
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse
#-------Permission steps---------
google-drive-ocamlfuse
#-----------MountingSteps--------------
mkdir ~/mygoogledrive
google-drive-ocamlfuse ~/mygoogledrive
#---------UnMountingSteps-------------
apt update && apt dist-upgrade -y
apt install curl htop neofetch git watch nano -y
curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz
tar -xf vscode_cli.tar.gz
chmod +x code
./code tunnel