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
| async Task Main() | |
| { | |
| var regex = new Regex(@"\[\[([^\]\]]+)\]\]\s?(†|†)", RegexOptions.Compiled); | |
| var backup = new FileInfo(@"C:\Users\patri\Downloads\starwars_pages_current.xml"); | |
| var pagesWithDaggers = new List<Result>(); | |
| var outputs = new List<Output>(); | |
| var settings = new XmlReaderSettings() | |
| { |
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
| async Task Main() | |
| { | |
| /* | |
| private readonly FilterDefinition<BsonDocument> _containsYearValueFilter = Builders<BsonDocument>.Filter.Regex("Data.Links.Content", new BsonRegularExpression(new Regex(".*\\s+(ABY|BBY)"))); | |
| private readonly FilterDefinition<BsonDocument> _containsYearLinkFilter = Builders<BsonDocument>.Filter.Regex("Data.Links.Href", new BsonRegularExpression(new Regex("_(ABY|BBY)"))); | |
| */ | |
| var mongoClient = new MongoClient("mongodb://admin:password@localhost:27017"); | |
| var starWarsDb = mongoClient.GetDatabase("starwars"); | |
| var resultsDb = mongoClient.GetDatabase("results"); |
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
| const string WikiFragment = "/wiki/"; | |
| const string RelationshipsSection = "_Relationships_"; | |
| async Task Main() | |
| { | |
| Util.AutoScrollResults = true; | |
| List<Loaded> allFiles = new DirectoryInfo(@"C:\Projects\github\pjmagee\starwars-data") | |
| .EnumerateFiles("*.json", new EnumerationOptions { RecurseSubdirectories = true }) | |
| .AsParallel() |
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
| static char[] InvalidChars = Path.GetInvalidFileNameChars(); | |
| static JsonSerializerOptions Options = new JsonSerializerOptions { WriteIndented = true, Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; | |
| static SemaphoreSlim slim = new SemaphoreSlim(1); | |
| async Task Main() | |
| { | |
| await StarWarsFandomExtractor.ExtractPagesWithInfoboxes(); | |
| } |
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
| // 2 Pots (Hand pot and Sabacc pot) | |
| // Players could designate a dealer or take turns as the dealer - No need, the Computer/Server will be the Dealer | |
| // The object of sabacc was to have a final hand with a total as close to 23 or -23 as possible without going over. | |
| // A hand with a total of 24 or higher was said to "bomb out" and lost the round - Visa versa -24?? | |
| // A perfect hand of 23 or −23 was called a Pure Sabacc, and it could only be beaten by a rare and unbeatable hand called an Idiot's Array, consisting of The Idiot, a 2 card of any suit, and a 3 card of any suit. | |
| // DEALING: | |
| // The dealer started by shuffling the deck before dealing one card to each player | |
| // Repeat another rotation until each player had two cards facedown. |
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
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "blocks": [ | |
| { | |
| "type": "prompt", | |
| "alignment": "left", | |
| "segments": [ | |
| { | |
| "type": "session", | |
| "style": "diamond", |
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
| void Main() | |
| { | |
| using(var data = Heroes.Icons.DataDocument.HeroDataDocument.Parse(@"C:\Users\patri\Downloads\heroes-data-2.53.2.84249_all.tar\heroes-data-2.53.2.84249_all\2.53.2.84249\data\herodata_84249_localized.json")) | |
| { | |
| Random random = new Random(); | |
| var result = data.GetAttributeIds | |
| .Select(attributeId => data.GetHeroByAttributeId(attributeId, false, false, false, true)) | |
| .SelectMany(hero => hero.HeroUnits.Select(hu => hu.Id).Concat(new[] { hero.Id })) |
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
| Display.ShowMessageDialog.ShowMessageWithTimeout Message: $'''AFK Macro Starting in 10 seconds.''' Icon: Display.Icon.Information Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False Timeout: 3 ButtonPressed=> ButtonPressed | |
| WAIT 10 | |
| LABEL START | |
| MouseAndKeyboard.SendKeys.FocusAndSendKeysByTitleClass Title: $'''LOST ARK (64-bit, DX11)*''' Class: $'''EFLaunchUnrealUWindowsClient''' TextToSend: 8 DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: True | |
| WAIT 300 | |
| MouseAndKeyboard.SendKeys.FocusAndSendKeysByTitleClass Title: $'''LOST ARK (64-bit, DX11)*''' Class: $'''EFLaunchUnrealUWindowsClient''' TextToSend: 9 DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: True | |
| WAIT 300 | |
| GOTO START |
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
| void Main() | |
| { | |
| SettingsManager.EnumerateSettings(SettingsManager.EnumerateCharacters()).Dump(); | |
| } | |
| public class SettingsManager | |
| { | |
| private static readonly string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, System.Environment.SpecialFolderOption.None), "SWTOR", "swtor", "settings"); | |
| public static IEnumerable<Character> EnumerateCharacters() |
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
| /* Data generated for https://observablehq.com/@pjmagee/heroes-of-the-storm-hero-relationships */ | |
| public class Node | |
| { | |
| [JsonPropertyName("name")] | |
| public string Name { get; set; } | |
| [JsonPropertyName("imports")] | |
| public List<string> Imports { get; set; } = new (); | |
| } |