This is mostly for my own benefit when I invariably format a computer using these adapters and forget how to get wifi working again:
Plug device in and ensure it is detected via lsusb:
For the T3U Plus, the ID is 2357:0138.
| #!/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 |
This is mostly for my own benefit when I invariably format a computer using these adapters and forget how to get wifi working again:
Plug device in and ensure it is detected via lsusb:
For the T3U Plus, the ID is 2357:0138.
| #!/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 |