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 | |
| set -e | |
| PYTHONEXE=python | |
| PSSCRIPT=/root/TheFatRat/tools/power.py | |
| POWERSTAGER="$PYTHONEXE $PSSCRIPT" | |
| function usage() { | |
| echo Usage: $(basename $0) port | |
| 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
| #!/bin/bash | |
| # Returns the lowercase of a string | |
| function lowercase() { | |
| if [ -z "$1" ]; then | |
| return | |
| fi | |
| echo "$1" | tr '[:upper:]' '[:lower:]' | |
| } |
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 | |
| set -e | |
| # This is the IP address or URL of the server to reverse SSH tunnel to | |
| FWHOST="my.server.com" | |
| # This is the username to log into the server with | |
| SSHUSER="my_username" | |
| # This is your private key file, first encrypted with gpg, then encoded in base64 | |
| PRIVKEYGPG64="my_base64_gpg_ssh_private_key" |
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 python3 | |
| # Parse arguments before importing any other modules | |
| import argparse | |
| parser = argparse.ArgumentParser(description='Groups images together based on similarity (image clustering)') | |
| parser.add_argument("-i", "--image_dir", type=str, required=True, | |
| help='path to folder with images to be clustered') | |
| parser.add_argument("-s", "--similarity", type=float, required=False, default=0.5, | |
| help="the percent similarity needed to cluster together (0.0 - 1.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
| #!/bin/bash | |
| export DISPLAY=:0 | |
| gsettings set org.gnome.Vino enabled true | |
| gsettings set org.gnome.Vino prompt-enabled false | |
| gsettings set org.gnome.Vino require-encryption false | |
| /usr/lib/vino/vino-server & |
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
| @echo off | |
| set ORIGDIR="%CD%" | |
| set MINICONDAPATH=%USERPROFILE%\Miniconda3 | |
| set CONDAEXE=%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%-condainstall.exe | |
| set "OS=" | |
| set "MCLINK=" | |
| where conda >nul 2>nul |
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 | |
| set -e | |
| COMMAND_DIR=$PWD | |
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
| cd $COMMAND_DIR | |
| # Parse arguments | |
| IN_FILE= |
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 | |
| pkill -f vlc | |
| vlc \ | |
| --aspect-ratio 3:2 \ | |
| --no-qt-bgcone \ | |
| --no-osd \ | |
| --start-paused \ | |
| --play-and-pause \ |
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 python3 | |
| import argparse, os, pathlib, sys | |
| def file_path(string): | |
| if os.path.isfile(string): | |
| return string | |
| else: | |
| raise FileNotFoundError(string) | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("-i", "--input", type=file_path, required=True, |
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 | |
| function gpu_usage_load() { | |
| echo $(nvidia-smi --query-gpu=utilization.gpu --format=csv | tail -1 | tr -d '\040\011\012\015') | |
| } | |
| function gpu_usage_mem() { | |
| echo $(nvidia-smi --query-gpu=utilization.memory --format=csv | tail -1 | tr -d '\040\011\012\015') | |
| } |