Skip to content

Instantly share code, notes, and snippets.

View jkraszewski's full-sized avatar

Jack Kraszewski jkraszewski

  • NYC Area
View GitHub Profile
test_data = [
['Source IP', 'Source Netmask', 'Destination IP', 'Destination Netmask', 'Port', 'Protocol', 'Action'],
['123.456.789.000', '/30', '111.111.111.111', '/30', '8080', 'TCP', 'Accept'],
['123.23.45.233', '/31', '127.0.0.1', '/8', '22', 'UDP', 'Deny'],
['1.1.1.1', '/31', '1.2.3.4', '/30', '1', 'TCP', 'Deny'],
['10.0.156.35', '/24', '123.32.234.7', '/12', '1337', 'BGP', 'Accept'],
];
// List<List<String>> -> String
// Assumes a non-empty list of non-empty lists of Strings
test_data = [
['IP Source', 'Source Mask', 'IP Destination', 'Destination Mask'],
['123.456.789.000', '/30', '111.111.111.111', '/30'],
['123.23.45.233', '/31', '127.0.0.1', '/8'],
['1.1.1.1', '/31', '1.2.3.4', '/30'],
['n/a', '/31', '123.432.234.567', '/12'],
];
// List<List<String>> -> String
// Assumes a non-empty list of non-empty lists of Strings