Skip to content

Instantly share code, notes, and snippets.

@tslater2006
tslater2006 / TestPivetParser.cs
Created May 9, 2022 14:25
Testing Pivet Parser on new Tools Rel
/* Note this requires DMSLib and Parser.cs from Pivet */
/* Also requires a DMS export of PSPCMPROG and PSPCMNAME */
using PeopleCodeLib.Decoder;
using System.Diagnostics;
var dmsFile = DMSLib.DMSReader.Read(@"C:\Users\tslat\Downloads\TIM_PT859.DAT");
Console.WriteLine("Read file. Tables: " + dmsFile.Tables.Count);
var progTable = dmsFile.Tables.Where(t => t.Name == "PSPCMPROG").First();
@tslater2006
tslater2006 / long_oct_loops.txt
Created December 12, 2021 03:03
Synchronicity of Octopi
Loop start: 68 Loop size: 6
7253680879
1579429636
1181201960
8986037708
8814892217
9135316937
2272353340
9965415349
4742529622
Original step: 66 Current step: 72
6999137695
5338246616
4839615236
3589788191
3433455521
4886722699
1914119177
2134853355
8116194536
We start by identifying the 4 numbers (1,4,7,8)
1 => ab
4 => abef
7 => abd
8 => abcdefg
Know that the top segment MUST be the letter that is in 7 but not 1
Observe that the 2 right side segments WILL be the 2 letters that are in 1 and 7
Observe that top left segment WILL be one of 2 letters that are in 4 but not the same as the right segments
Identify 1,4,7 and 8
6 must be 6 letters long and not contain all letters of 1
9 must be 6 letters long and contain all letters of 4
3 must be 5 letters long and contain all letters of 1
0 must be 6 letters long and contain all letters of 1 and not be == 9
5 must be 5 letters long and overlap with 6 by 5 letters
2 must be 5 letters long and overlap with 6 by 4 letters and not be == 3
@tslater2006
tslater2006 / Voxelizer.cs
Created October 25, 2021 19:26
Voxelizer for UVTools
using Emgu.CV;
using Emgu.CV.CvEnum;
using KdTree;
using KdTree.Math;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Numerics;
using System.Threading.Tasks;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using Emgu.CV.Util;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
@tslater2006
tslater2006 / gist:8962321e628e176d0705a2dec1fae662
Created December 15, 2020 05:41
Day 15 2020 First 10k turns
7 -> 6 -> 1
8 -> 1 -> 7
10 -> 7 -> 3
12 -> 10 -> 2
13 -> 2 -> 11
15 -> 12 -> 3
16 -> 11 -> 5
18 -> 15 -> 3
19 -> 16 -> 3
20 -> 19 -> 1
//Locate and fixup functions
//@author Tim Slater
//@category ESP32
//@keybinding
//@menupath
//@toolbar
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http.Headers;
using System.Security.Cryptography;
using System.Security.Policy;
using System.Text;