Skip to content

Instantly share code, notes, and snippets.

View samueljackson92's full-sized avatar

Samuel Jackson samueljackson92

  • UKAEA
  • Wallingford, Oxfordshire, UK
View GitHub Profile
#!/usr/bin/env python
from json import load
from urllib2 import urlopen, URLError
from argparse import ArgumentParser
def printError(e):
print "Error connecting to API: "
print "\t", e
def getLinks():
@samueljackson92
samueljackson92 / concatdir.pl
Created November 12, 2012 17:43
Perl script to concat directories full of text files.
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use File::Find::Rule;
#Perl script for combining sub directories of text files
GetOptions('recursive' => \my $isRecursive,
@samueljackson92
samueljackson92 / sierpinskicarpet.pl
Created November 12, 2012 17:39
Generating a sierpinski carpet with a perl script
#!/usr/bin/perl
use strict;
use warnings;
my @carpet;
my $total;
carpet(2);
foreach my $row(@carpet){