This guide provides a comprehensive PowerShell script that allows you to backup, restore, analyze, and optimize your Windows Registry. Additionally, it integrates the OpenAI GPT-4 API to provide AI-powered analysis of your registry settings.
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
| // --- Workbook Module --- | |
| // Module containing named range definitions for the GMH Data Model Workbook. | |
| /** | |
| * Get Sheet Names of Current Workbook | |
| */ | |
| Workbook.GetSheetNames = TRANSPOSE(SUBSTITUTE(GET.WORKBOOK(1), "[" & GET.WORKBOOK(16) & "]", "")); | |
| /** | |
| * Define SheetNames |
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
| // --- SQL Module --- | |
| // Module containing Lambdas for generating SQL DDL Statements. | |
| /** | |
| * Generates SQL ENUM statements from header and values | |
| */ | |
| SQLEnum = LAMBDA(header_cell, values_range, | |
| "CREATE TYPE ""survey""." & CHAR(34) & header_cell & CHAR(34) & " AS ENUM (" & CHAR(10) & | |
| TEXTJOIN("," & CHAR(10), TRUE, " '" & FILTER(values_range, values_range <> "") & "'") & CHAR(10) & | |
| ");" |
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
| // --- AddressTools Module --- | |
| // Module containing Lambdas for working with Addresses. | |
| /* | |
| * Extract the Street from an Address | |
| */ | |
| AddressStreet = LAMBDA(address, LEFT(address,FIND(",",address)-1)); | |
| /* | |
| * Extract the City from an Adderss |
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
| /* | |
| * Extract the Street from an Address | |
| */ | |
| AddressStreet = LAMBDA(address, LEFT(address,FIND(",",address)-1)); | |
| /* | |
| * Extract the City from an Adderss | |
| */ | |
| AddressCity = LAMBDA(address, TRIM(MID(address,FIND(",",address)+1,FIND(",",address,FIND(",",address)+1)-FIND(",",address)-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
| /** | |
| * Generates SQL ENUM statements from header and values | |
| */ | |
| SQLEnum = LAMBDA(header_cell, values_range, | |
| "CREATE TYPE ""survey""." & CHAR(34) & header_cell & CHAR(34) & " AS ENUM (" & CHAR(10) & | |
| TEXTJOIN("," & CHAR(10), TRUE, " '" & FILTER(values_range, values_range <> "") & "'") & CHAR(10) & | |
| ");" | |
| ); | |
| /** |
In the Generative AI Age your ability to generate prompts is your ability to generate results.
Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.
Replace {{user-input}} with your own input to generate prompts.
Use mp_*.txt as example user-inputs to see how to generate high quality prompts.
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
| options(shiny.maxRequestSize = 5 * 1024^2) # Limit uploads to 5 MB | |
| library(shiny) | |
| library(magick) | |
| library(base64enc) | |
| library(bslib) | |
| # Helper function to sanitize file names | |
| safeFileName <- function(filename) { | |
| gsub("[^a-zA-Z0-9_.-]", "_", filename) |
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 a sample R Shiny app chatbot that runs local models with an Ollama server. | |
| # You also need Ollama installed and a ollama server running, plus at least one local model pulled. | |
| # I hard-coded a few local models, | |
| # If you use this, you'll want to hard code yours (including descriptions, or take those out) | |
| # Coded with lots of LLM help + Posit's Shiny Assistant. | |
| library(shiny) | |
| library(shinychat) | |
| library(bslib) |
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
| library(elmer) | |
| library(tidyverse) | |
| library(DiagrammeR) | |
| library(glue) | |
| code <- "starwars %>% | |
| group_by(species) %>% | |
| summarise( | |
| n = n(), | |
| mass = mean(mass, na.rm = TRUE) |