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
LLM Travel Assistant Instructions | |
Objective | |
The LLM should provide personalized travel assistance, including itinerary creation, map guidance, and budget planning, tailored to the user's preferences and constraints. | |
Core Functions |
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
# Check if FFmpeg is installed | |
$ffmpegInstalled = Get-Command ffmpeg -ErrorAction SilentlyContinue | |
if (-not $ffmpegInstalled) { | |
Write-Host "FFmpeg is not installed or not found in PATH. Please install it before running this script." | |
exit | |
} | |
# Get all video files in the current directory | |
$videoFiles = Get-ChildItem -Filter *.mp4 |
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
# Prompt user for the prompt to Llama3.2 | |
$llamaPrompt = Read-Host "Enter your prompt for Llama3.2" | |
# Take the first 10 characters of the prompt and remove all spaces | |
$filename = ($llamaPrompt.Substring(0, [Math]::Min(10, $llamaPrompt.Length))).Replace(" ", "") | |
# Set the desktop path | |
$desktopPath = [System.IO.Path]::Combine($env:USERPROFILE, "Desktop") | |
$filePath = "$desktopPath\$filename.txt" |
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
# Get all .docx files in the current directory | |
$files = Get-ChildItem -Filter "*.docx" | |
# Check if any files were found | |
if ($files.Count -eq 0) { | |
Write-Host "No .docx files found in the current directory." | |
exit | |
} | |
# Display current files |
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
# PDF Merger Script using QPDF | |
# This script allows user to select order of PDFs and combines them into a single PDF file | |
# Requirements: QPDF must be installed on the system | |
function Get-PdfPageCount { | |
param ( | |
[string]$pdfPath | |
) | |
try { | |
$pageCount = & qpdf --show-npages $pdfPath 2>&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
# Check if qpdf is installed | |
$qpdfCheck = Get-Command qpdf -ErrorAction SilentlyContinue | |
if (-not $qpdfCheck) { | |
Write-Host "QPDF is not installed. Please install it using: choco install qpdf" | |
Write-Host "If you don't have chocolatey installed, visit https://chocolatey.org/install" | |
exit | |
} | |
# Get all PDF files in current directory | |
$pdfFiles = Get-ChildItem -Path $PWD -Filter "*.pdf" |
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
# Get the current directory | |
$currentDir = Get-Location | |
# Get all PDF files in the current directory | |
$pdfFiles = Get-ChildItem -Path $currentDir -Filter "*.pdf" | |
# If no PDF files found, inform user and exit | |
if ($pdfFiles.Count -eq 0) { | |
Write-Host "No PDF files found in the current directory." | |
exit |
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
# Ollama Model Manager Script | |
function Show-Models { | |
$models = ollama list | |
$index = 0 | |
$models | ForEach-Object { | |
Write-Host "$($index): $_" | |
$index++ | |
} | |
} |
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
Get-ChildItem -Path . -File | Where-Object { $_.Name -notmatch '\s' } | ForEach-Object { | |
$output = Join-Path $_.DirectoryName ($_.BaseName + "_cropped" + $_.Extension) | |
magick $_.FullName -gravity center -resize 130% -crop 2:3 +repage $output | |
} |
NewerOlder