Skip to content

Instantly share code, notes, and snippets.

View karthik4579's full-sized avatar

karthik nair karthik4579

View GitHub Profile
#!/bin/bash
apt update && apt upgrade -y && apt install sudo zip unzip -y
sudo apt update && sudo apt upgrade -y
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget git build-essential -y
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
sudo apt update
@karthik4579
karthik4579 / tp-link-ac600-ac1300-drivers-linux.md
Created August 13, 2025 15:26 — forked from julianlam/tp-link-ac600-ac1300-drivers-linux.md
Installing drivers for the TP-Link T2U/T3U Plus (AC600 or AC1300) Wireless Adapter #blog
#!/bin/bash
apt update && apt install sudo -y
sudo apt update
sudo apt install gpg-agent wget cmake gcc g++ build-essential -y
sudo apt install linux-headers-$(uname -r) -y
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
# add signed entry to apt sources and configure the APT client to use Intel repository:
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
#!/bin/bash
ollama serve >> /dev/null &
ollama pull qwen2.5:72b
ollama run qwen2.5:72b
#!/bin/bash
sudo apt update && sudo apt upgrade -y
pip uninstall torch torch-xla torchaudio torchvision -y
export DATE="20240828"
export TORCH_VERSION="2.5.0"
git clone https://github.com/vllm-project/vllm.git
cd vllm
pip install setuptools_scm
pip install https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch-${TORCH_VERSION}.dev${DATE}-cp310-cp310-linux_x86_64.whl
import streamlit as st
from groq import Groq
# Initialize Groq client
client = Groq(api_key="YOUR_GROQ_API_KEY")
# Streamlit UI
st.title("Grammar Correction App")
st.write("Enter text below to get grammar corrections:")
from fastapi import FastAPI
import feedparser
from pydantic import BaseModel
from typing import List
app = FastAPI()
class RSSItem(BaseModel):
title: str
link: str
import torch
from diffusers import StableDiffusionPipeline
# Load the model from the safetensors file
model_path = "path/to/sd3_medium_incl_clips_t5xxlfp8.safetensors"
pipe = StableDiffusionPipeline.from_pretrained(model_path, torch_dtype=torch.float16, low_cpu_mem_usage=True)
# Move the model to GPU for faster inference
pipe.to("cuda")
import asyncio
import nodriver as uc
from bs4 import BeautifulSoup
from langchain_text_splitters import RecursiveCharacterTextSplitter
import time
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100, length_function=len)
async def run_type_message():
browser = await uc.start()
# Use the latest Ubuntu LTS as the base image
FROM ubuntu:latest
# Switch back to root user
USER root
# Set the default shell to bash
SHELL ["/bin/bash", "-c"]
ENV test $PASSWORD