Skip to content

Instantly share code, notes, and snippets.

View airbreather's full-sized avatar
💭
Wondering why there's a "Set status" button.

Joe Amenta airbreather

💭
Wondering why there's a "Set status" button.
  • Urban Science Applications, Inc.
  • Sterling Heights, Michigan, USA
View GitHub Profile
@airbreather
airbreather / update_mcptest
Created December 23, 2013 16:22
Python script to update fields.csv and methods.csv, merging both the versions from 9.01 alpha and MCPTest. NOTE, this is a hack and makes way too many assumptions for anyone to run without reading it through and figuring out what to do from there. NOTE, at time of writing, one of the methods from MCPTest has a name conflict with one of the metho…
import csv
import os.path
import re
from collections import defaultdict
from contextlib import closing
from datetime import timedelta
from operator import itemgetter
from time import time as now
from urllib.request import urlopen
@airbreather
airbreather / gist:8160422
Created December 28, 2013 15:13
MCP 9.02 Failure
== MCP 9.02 (data: 9.02, client: 1.7.2, server: 1.7.2) ==
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle config, scalac, rg, ss
> Creating Retroguard config files
== Reobfuscating client ==
> Cleaning reobf
> Generating md5s
> Packing jar
> Generating class markers
FATAL ERROR
Traceback (most recent call last):
@airbreather
airbreather / adhoc-mappings.txt
Last active January 1, 2016 15:09
An ad-hoc list of MCP Mappings I came up with that MCPBot didn't know about at the time
field_150267_b = "text"
field_150276_d = "key"
field_150277_e = "formatArgs"
field_150274_f = "syncLock"
field_150275_g = "lastTranslationUpdateTimeInMilliseconds"
field_150279_c = "stringVariablePattern"
field_150278_b = "children" // The discrete elements that make up this component.
For example, if the key is "translation.test.complex", args are ["FirstArg", "SecondArg", "ThirdArg"], and the current translator has an entry like:
translation.test.complex=Prefix, %s%2$s again %s and %1$s lastly %s and also %1$s again!
Then the children would look like: ["Prefix, ", "FirstArg", "SecondArg", " again ", "SecondArg", " and ", "FirstArg", " lastly ", "ThirdArg", " and also ", "FirstArg", " again!"].
@airbreather
airbreather / Puzzle.cs
Created January 10, 2014 08:02
Closest I've got...
namespace Puzzle
{
// Using the tokens
// ? null :
// in that order, create a valid C# program such that
// the program is also valid when "null" is removed.
class Puzzle
{
enum E { V }
Input:
LINESTRING (458 661.74, 463 657.74, 469 653.74, 475 650.74, 481 647.74, 488 644.74, 492 642.74, 495 639.74, 498 638.74, 500 637.74, 503 636.74, 508 634.74, 511 633.74, 520 629.74, 530 624.74, 544 618.74, 565 609.74, 597 593.74, 623 582.74, 658 567.74, 690 553.74, 721 541.74, 750 527.74, 777 515.74, 801 501.74, 818 488.74, 829 477.74, 840 465.74, 845 453.74, 848 439.74, 849 424.74, 849 407.74, 845 378.74, 835 352.74, 828 332.74, 817 315.74, 806 301.74, 798 290.74, 791 280.74, 780 270.74, 772 262.74, 757 253.74, 740 246.74, 724 239.74, 696 232.74, 669 224.74, 639 217.74, 609 214.74, 575 209.74, 548 204.74, 516 202.74, 494 202.74, 475 205.74, 464 210.74, 447 216.74, 431 226.74, 410 243.74, 395 259.74, 381 279.74, 367 308.74, 358 329.74, 353 348.74, 345 371.74, 342 382.74, 340 392.74, 337 403.74, 336 411.74, 336 420.74, 336 427.74, 336 433.74, 336 442.74, 339 448.74, 341 452.74, 344 457.74, 348 462.74, 350 465.74, 354 468.74, 358 472.74, 362 476.74, 368 480.74, 374 484.74, 381 489.74, 389 495.74, 395 499.7
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace HelperTypes
{
public sealed class BitList : IReadOnlyList<bool>
{
private readonly List<int> values = new List<int>();
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime;
using System.Threading.Tasks;
using GeoAPI.Geometries;
using NetTopologySuite.Geometries;
This file has been truncated, but you can view the full file.
Only the 48 contiguous US states + DC:
MULTIPOLYGON (((-82.987477 24.619214, -82.987477 24.625379, -82.987477 24.625429999999998, -82.985529 24.640484999999998, -82.977736 24.656482, -82.96409899999999 24.670596, -82.951436 24.678124, -82.940721 24.682828999999998, -82.932892999999993 24.684668, -82.930831 24.686738, -82.924646 24.692950999999997, -82.922585 24.695021999999998, -82.902018 24.715678, -82.899928 24.717778, -82.883181 24.721480999999997, -82.874844 24.723326, -82.865619999999993 24.726225, -82.800176999999991 24.726281999999998, -82.766509 24.701763999999997, -82.766680999999991 24.667939999999998, -82.795228 24.625429999999998, -82.800799 24.616934999999998, -82.805633 24.614501999999998, -82.805095999999992 24.613087, -82.799649 24.606232, -82.798007 24.604165, -82.80440999999999 24.604295999999998, -82.821754 24.590708, -82.821795999999992 24.590774999999997, -82.821908 24.590687, -82.82857 24.585535, -82.836157 24.581141, -82.849053 24.576748, -82.861189 24.575284, -82.874840999999989 24.57
This file has been truncated, but you can view the full file.
contiguous, plus FIPS codes 02, 15, 60, 66, 69, 72, 78
MULTIPOLYGON (((-168.22527300000002 -14.535905999999999, -168.22452900000002 -14.52451, -168.22312 -14.521576999999999, -168.218752 -14.512483, -168.21868899999998 -14.512364999999999, -168.218501 -14.512011, -168.218439 -14.511892999999999, -168.218446 -14.511880999999999, -168.218468 -14.511847999999999, -168.218476 -14.511837, -168.209822 -14.500086, -168.20978 -14.500045, -168.199527 -14.490126, -168.186781 -14.48325, -168.1733 -14.479693, -168.172043 -14.47955, -168.157486 -14.477894, -168.156488 -14.477884, -168.153496 -14.477853999999999, -168.15249899999998 -14.477844999999999, -168.152444 -14.477844999999999, -168.152282 -14.477846999999999, -168.15222799999998 -14.477848, -168.15222799999998 -14.477922999999999, -168.152231 -14.47815, -168.152232 -14.478226, -168.144096 -14.481204, -168.13489299999998 -14.484573999999999, -168.123337 -14.491729, -168.12162899999998 -14.493689999999999, -168.115941 -14.500224999999999, -168.111165 -14.508125, -1
LINESTRING (-9318957.21189894 5178906.52688059, -9319300.5654344 5178563.17334512, -9320055.94321243 5178082.47839547, -9321360.68664721 5177533.11273872, -9322871.44220327 5177121.08849616, -9324176.18563804 5176983.74708197, -9324656.8805877 5176915.07637488, -9324656.8805877 5176846.40566779, -9324588.2098806 5176846.40566779, -9324107.51493095 5176846.40566779, -9323352.13715292 5176846.40566779, -9322528.0886678 5177121.08849616, -9321772.71088977 5177395.77132453, -9321360.68664721 5177601.78344581, -9321154.67452593 5177670.45415291, -9321292.01594011 5177670.45415291, -9321910.05230396 5177670.45415291, -9322802.77149617 5177601.78344581, -9323558.1492742 5177533.11273872, -9324176.18563804 5177327.10061744, -9324382.19775932 5177327.10061744, -9324382.19775932 5177258.42991035, -9323970.17351676 5177258.42991035, -9323283.46644583 5177258.42991035, -9322596.75937489 5177533.11273872, -9322047.39371814 5177739.12486, -9321841.38159686 5177807.7955671, -9322322.07654652 5177807.7955671, -9323146.125031