Full reference here: https://docs.docker.com/engine/install/ubuntu/
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
# Step 1: Install the Termux app | |
# Download and install the Termux app from Google Play Store or F-Droid | |
# Step 2: Open Termux and run the following commands | |
# Update and upgrade existing packages | |
apt update && apt upgrade -y | |
# Install necessary packages | |
apt install clang python fftw libzmq freetype libpng pkg-config libcrypt -y |
Full reference here: https://docs.docker.com/engine/install/ubuntu/
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
Shrink code | |
Requirements: | |
Combined import statements into a single line where possible. | |
Removed unnecessary whitespace and comments. | |
Inlined some logic to reduce the number of lines. | |
Used list comprehensions and generator expressions to simplify the code. | |
Shortened variable names where readability was not compromised. |
NAME=$(basename "$(ls -td ~/Desktop/webllama/*/ | head -1)") && conda create -n "$NAME" python=3.10 -y && conda activate "$NAME" && read -p "Install packages from requirements.txt? (yes/no): " choice && [[ "$choice" == "yes" ]] && pip install -r requirements.txt |
import os | |
import json | |
import argparse | |
from huggingface_hub import snapshot_download, HfApi | |
# Parse command-line arguments | |
parser = argparse.ArgumentParser(description="Convert and upload a model to Hugging Face Hub.") | |
parser.add_argument("--hf_token", type=str, required=True, help="Hugging Face token") | |
parser.add_argument("--model_id", type=str, required=True, help="Model ID on Hugging Face Hub") | |
parser.add_argument("--outtype", type=str, required=True, help="Output type for the conversion (e.g., q8_0, f16, f32)") |
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
# Function to print messages |
# Version 1 | |
#env_name='mlx-chat-app'; | |
#conda deactivate && conda remove --name "$env_name" --all -y && \ | |
#conda create -n "$env_name" python=3.10 -y && conda activate "$env_name" && | |
# pip install tensorflow-macos tensorflow-metal && | |
# pip install -r requirements.txt | |
read -p "Enter the name of the conda environment: " env_name && conda deactivate && conda remove --name "$env_name" --all -y && conda create -n "$env_name" python=3.10 -y && conda activate "$env_name" && pip install -r requirements.txt |
#!/bin/bash | |
sudo apt update && sudo apt full-upgrade -y | |
# Install cockpit and its components, netdata, git-lfs, and npm | |
sudo apt install "cockpit" "cockpit-machines" "cockpit-storaged" "cockpit-packagekit" "cockpit-networkmanager" "cockpit-system" -y | |
sudo apt install netdata -y && sudo apt install git-lfs -y && sudo apt install npm -y |
#!/bin/bash | |
set -eo pipefail | |
# Function to install Xcode Command Line Tools | |
install_xcode_cli() { | |
echo "Installing Xcode Command Line Tools..." | |
xcode-select --install | |
} |
# List all Conda environments | |
conda env list | |
# Capture the list of environment names and loop through them | |
while IFS= read -r line; do | |
# Extract the environment name from each line | |
name=$(echo "$line" | cut -d ' ' -f 1) | |
# Skip the first line (header) and the base environment | |
if [ "$name" != "#" ] && [ "$name" != "base" ]; then |