This file contains 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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use List::Util qw/shuffle/; | |
if($#ARGV != 2 || grep {$ARGV[0] eq $_} qw/help h/) { | |
"Usage: perl $0 <inputfile> <outputfile> <groupsize>\n", | |
" <inputfile> is the name of the file containing the stories to be\n", |
This file contains 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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use Data::Dump; | |
use feature qw/say/; | |
use List::Util qw/shuffle/; | |
my %setups = ( | |
Scumcity => [ |
This file contains 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
#!/usr/bin/perl -w | |
use warnings; | |
use strict; | |
use List::Util qw/shuffle min sum/; | |
use feature qw/say/; | |
use utf8; | |
# Usage: | |
# $wc *.txt | $0 <outfile> |
This file contains 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use 5.01; | |
use Text::Markdown; | |
use Encode; | |
use HTML::Entities; | |
use Getopt::Long; |
This file contains 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
use Mojolicious::Lite; | |
open my $fh, "<", "nouns.txt"; | |
my @nouns = map { chomp && lc $_ } $fh->getlines; | |
close $fh; | |
sub nurble { | |
my $text = uc shift; | |
$text =~ s{ |
This file contains 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
#!/usr/bin/env perl | |
use Mojo::Base -strict; | |
use Mojo::UserAgent; | |
use DateTime; | |
use DateTime::Format::Strptime; | |
my $id = shift or print <<"USAGE" and exit(1); | |
usage: $0 thread | |
USAGE |
This file contains 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
#!/usr/bin/env perl | |
# Scrape writeoff.me events for stories and write them to files | |
use Mojo::Base -strict; | |
use Mojo::UserAgent; | |
use File::Spec; | |
# IDs of events to scrape | |
my @events = (1..23); |
This file contains 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
use 5.01; | |
use warnings; | |
use strict; | |
use Data::Dump; | |
for my $bm (glob "beatmaps/*") { | |
say "\n### " . substr($bm, 9) . " ###"; | |
my $deltas = beatmap_deltas($bm); | |
say "Length: " . sum($deltas) / 1000 . "s"; | |
say "Intervals: " . ($#$deltas + 1); |