This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -u | |
| shopt -s nullglob | |
| echo "Batch convert DOCX to Markdown" | |
| echo "Script downloaded from https://blog.mypapit.net" | |
| if ! command -v pandoc >/dev/null 2>&1; then | |
| printf 'Pandoc is missing. Install it with: sudo apt install pandoc\n' >&2 | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # ============================================================================ | |
| # MP3 Rainbow Spectrum Video Generator | |
| # | |
| # Description: | |
| # Generates a 1920x1080 MP4 audio spectrum visualizer with animated | |
| # multicolor frequency bars while reserving the bottom area for lyrics. | |
| # | |
| # Author: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| /usr/bin/hcitool con | |
| /usr/bin/hcitool scan | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Configuration variables | |
| TARGET_HOST="8.8.8.8" | |
| MAX_FAILURES=5 | |
| FAILURE_COUNT=0 | |
| RETRY_DELAY_SECONDS=10 | |
| # Iterative connectivity verification | |
| for ((i=1; i<=MAX_FAILURES; i++)); do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # semi-automatic script to check nvidia gpu temperature, and then trigger the fan for 15 minutes. | |
| # intended to run within other scripts or in crontab | |
| # Query GPU temperature | |
| export DISPLAY=:0 | |
| TEMP=$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits) | |
| echo "$TEMP" | |
| # Check if TEMP is greater than 60 | |
| if [ "$TEMP" -gt 60 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM nvcr.io/nvidia/tensorflow:25.02-tf2-py3 | |
| # Set non-interactive mode for clean installs | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| python3-pip \ | |
| python3-opencv \ | |
| graphviz \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #This won't work on RTX50-series | |
| conda create --name workshop python=3.9 | |
| conda activate workshop | |
| conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 | |
| pip install --upgrade pip | |
| pip install "tensorflow<2.11" tensorflow_hub seaborn pandas matplotlib opencv-python pillow imutils pydot graphviz librosa visualkeras keract tensorflowjs numpy==1.26.4 scikit-learn=1.3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this is for using conda | |
| conda create -n tensorflow python=3.10 | |
| conda activate tensorflow | |
| conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 | |
| # Anything above 2.10 is not supported on the GPU on Windows Native | |
| #ensure numpy 1.26 is installed (tensorflow 2.10 compat) | |
| python -m pip install tensorflow==2.10 scikit-learn==1.6.1 numpy=1.24.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #https://github.com/bigbeartechworld/big-bear-casaos/tree/master/Apps/pterodactyl-panel | |
| bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/start-pterodactyl-panel/run.sh)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia. | |
| import torch | |
| device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') | |
| # Assuming that we are on a CUDA machine, this should print a CUDA device: | |
| print(device) |
NewerOlder