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 | |
| :: Batch section checks for Admin and launches PowerShell | |
| setlocal | |
| cd /d %~dp0 | |
| net session >nul 2>&1 | |
| if %errorLevel% neq 0 ( | |
| echo Requesting Admin privileges... | |
| powershell -Command "Start-Process -FilePath '%~f0' -Verb RunAs" | |
| exit /b |
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
| """ | |
| Python wrapper for Ultralytics SAM | |
| Available models: | |
| https://docs.ultralytics.com/models/sam/ | |
| SAM base: 'sam_b.pt' | |
| SAM large: 'mobile_sam.pt' | |
| https://docs.ultralytics.com/models/sam-2/ |
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 | |
| # REPLACE WITH YOUR CREDENTIALS | |
| BW_EMAIL="" | |
| BW_PASSWORD="" | |
| GDRIVE_FOLDER_ID="" | |
| EXPORT_FILE="bitwarden_export.json" | |
| TIMESTAMP=$(date +"%Y%m%d%H%M%S") | |
| ZIP_FILE="bitwarden_export_$TIMESTAMP.zip" |
In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
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 | |
| # Check if the Python version argument is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <python-version>" | |
| exit 1 | |
| fi | |
| PYTHON_VERSION=$1 | |
| ENV_NAME="test_env_$PYTHON_VERSION" |
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
| import os | |
| import sys | |
| import time | |
| import subprocess | |
| from watchdog.observers.polling import PollingObserver | |
| from watchdog.events import FileSystemEventHandler | |
| class RestartHandler(FileSystemEventHandler): | |
| def __init__(self, script): | |
| self.script = script |
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
| # PowerShell script to find and compact WSL2's ext4.vhdx file | |
| # Stop all WSL2 instances | |
| wsl --shutdown | |
| # Get the user's profile path | |
| $userProfile = [System.Environment]::GetFolderPath("UserProfile") | |
| # Path to WSL2 distributions | |
| $wslPath = "$userProfile\AppData\Local\Packages" |
NewerOlder