Skip to content

Instantly share code, notes, and snippets.

View pardeike's full-sized avatar
💭
Innovating 🛠

Andreas Pardeike pardeike

💭
Innovating 🛠
View GitHub Profile
using HarmonyLib;
using System.Runtime.CompilerServices;
namespace HarmonyTestbed;
public struct Class6Struct
{
public double d1;
public double d2;
public double d3;
@pardeike
pardeike / Persona.xml
Created April 27, 2023 00:52
The 5 year old
<Personality>
<azureVoice>en-US-AnaNeural</azureVoice>
<azureVoiceStyle>default</azureVoiceStyle>
<azureVoiceStyleDegree>0</azureVoiceStyleDegree>
<speechRate>0</speechRate>
<speechPitch>0</speechPitch>
<phrasesLimit>40</phrasesLimit>
<phraseBatchSize>20</phraseBatchSize>
<phraseDelayMin>1</phraseDelayMin>
<phraseDelayMax>1</phraseDelayMax>
@pardeike
pardeike / Persona.xml
Created April 27, 2023 00:35
In the style of Darkest Dungeon
<Personality>
<azureVoiceLanguage>English</azureVoiceLanguage>
<azureVoice>en-US-JasonNeural</azureVoice>
<azureVoiceStyle>default</azureVoiceStyle>
<azureVoiceStyleDegree>2</azureVoiceStyleDegree>
<speechLanguage></speechLanguage>
<speechRate>-0.12</speechRate>
<speechPitch>-0.269999981</speechPitch>
<phrasesLimit>40</phrasesLimit>
<phraseBatchSize>20</phraseBatchSize>
@pardeike
pardeike / Persona.xml
Created April 27, 2023 00:12
Adversary AI that plays Rimworld against you
<Personality>
<azureVoice>en-US-DavisNeural</azureVoice>
<azureVoiceStyle>unfriendly</azureVoiceStyle>
<azureVoiceStyleDegree>1.19999993</azureVoiceStyleDegree>
<speechRate>-0.049999997</speechRate>
<speechPitch>-0.149999991</speechPitch>
<phrasesLimit>40</phrasesLimit>
<phraseBatchSize>20</phraseBatchSize>
<phraseDelayMin>1</phraseDelayMin>
<phraseDelayMax>1</phraseDelayMax>
@pardeike
pardeike / Personality.xml
Created April 26, 2023 23:25
Here's a fun one, the haunting, shy ghost:
<Personality>
<azureVoice>en-US-AriaNeural</azureVoice>
<azureVoiceStyle>whispering</azureVoiceStyle>
<azureVoiceStyleDegree>1.13</azureVoiceStyleDegree>
<speechRate>0</speechRate>
<speechPitch>0</speechPitch>
<phrasesLimit>40</phrasesLimit>
<phraseBatchSize>20</phraseBatchSize>
<phraseDelayMin>1.75427425</phraseDelayMin>
<phraseDelayMax>1</phraseDelayMax>
var allMax = Mathf.Max(0.04f, suicideBomberChance, toxicSplasherChance, tankyOperatorChance, minerChance, electrifierChance, albinoChance, darkSlimerChance, healerChance);
var max = Mathf.Min(1f, 2f * allMax);
list.Dialog_FloatSlider("SuicideBomberChance", _ => "{0:0.00%}", false, ref suicideBomberChance, 0f, Mathf.Min(max, 1f - toxicSplasherChance - tankyOperatorChance - minerChance - electrifierChance - albinoChance - darkSlimerChance - healerChance));
list.Dialog_FloatSlider("ToxicSplasherChance", _ => "{0:0.00%}", false, ref toxicSplasherChance, 0f, Mathf.Min(max, 1f - suicideBomberChance - tankyOperatorChance - minerChance - electrifierChance - albinoChance - darkSlimerChance - healerChance));
list.Dialog_FloatSlider("TankyOperatorChance", _ => "{0:0.00%}", false, ref tankyOperatorChance, 0f, Mathf.Min(max, 1f - suicideBomberChance - toxicSplasherChance - minerChance - electrifierChance - albinoChance - darkSlimerChance - healerChance));
list.Dialog_FloatSlider("MinerChance", _ => "{0:0.00%}", false, ref
import Foundation
var allValves = [String: Valve]()
var allTunnels = [String: [Tunnel]]()
var maxScore = 0
var maxPaths = [([String], [String])]()
struct Valve: CustomStringConvertible {
let name: String
let rate: Int
@pardeike
pardeike / AdventOfCode-day15-part1.swift
Last active December 16, 2022 21:46
Eh day15->day16 of course
import Foundation
var allValves = [String: Valve]()
var allTunnels = [String: [Tunnel]]()
var maxScore = 0
var maxPaths = [[String]]()
struct Valve: CustomStringConvertible {
let name: String
let rate: Int
let lowerCaseStart = Int("a".first!.asciiValue!)
struct XY: CustomStringConvertible {
var x: Int
var y: Int
var description: String { "\(x),\(y)" }
}
extension XY {
static func + (left: XY, right: XY) -> XY {
@pardeike
pardeike / AdventOfCode-days-part2.swift
Created December 11, 2022 22:43
Fricking large numbers!
import RegexBuilder
let monkey = Reference(Int.self)
let monkeyRegex = Regex {
"Monkey "
Capture(as: monkey) {
OneOrMore(.digit)
} transform: { Int($0)! }
":"
}