A simple Docker Compose setup for running an Enshrouded dedicated server with persistent data storage.
cat > docker-compose.yml <
""" | |
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/ |
#!/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" |
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
#!/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" |
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 |
# 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" |
# https://github.com/CEA-MetroCarac/pyvsnr/tree/data-loading-enhancement | |
# cProfile.Profile() | |
import cupy as cp | |
import cupyx | |
from pyvsnr import vsnr2d | |
filters=[{'name':'Dirac', 'noise_level':0.35}] | |
img = cp.random.rand(2048, 2048).astype(cp.float32) | |
nit=20 |