This file contains hidden or 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
#!/Users/brian/bin/perls/perl-latest | |
use v5.28; | |
use Mojo::DOM; | |
use Mojo::UserAgent; | |
my $data = do { local $/; <DATA> }; | |
my $url = 'http://m.mlb.com/teams/'; | |
my $tx = Mojo::UserAgent->new->get( $url ); |
This file contains hidden or 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
#!/Users/brian/bin/perls/perl-latest | |
use v5.28; | |
use utf8; | |
use strict; | |
use warnings; | |
use feature qw(signatures); | |
no warnings qw(experimental::signatures); | |
# non-blocking stream reading of a slow standard input | |
# perl -pe '$|++; sleep 1' /etc/hosts | perl-latest read_slowly.pl |
This file contains hidden or 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
#!/Users/brian/bin/perls/perl-latest | |
use v5.26; | |
use utf8; | |
use strict; | |
use warnings; | |
use Mojo::File qw(path); | |
use Mojo::UserAgent; | |
use Mojo::Util qw(dumper); |
This file contains hidden or 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
#!/Users/brian/bin/perls/perl-latest | |
use v5.26; | |
use utf8; | |
use strict; | |
use warnings; | |
use Mojo::File; | |
package Mojo::File::Role::parent { |
This file contains hidden or 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
http://www.evanmiller.org/how-not-to-sort-by-average-rating.html | |
sub ci_lower_bound ( $postive_ratings, $total_ratings, $confidence = 0.95 ) { | |
return 0 if $total_ratings == 0; | |
This file contains hidden or 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
Nominee | President | To Replace | Nominated to Chief | Nomination Date | Voice | Roll Call No. | Yay | Nay | Difference | Action | Action Date | Delay | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Brett Kavanaugh | Trump | Kennedy | Jul 10, 2018 | 223 | 50 | 48 | 2 | Confirmed | Oct 6, 2018 | 88 | |||
Neil M. Gorsuch | Trump | Scalia | Feb 1, 2017 | 111 | 54 | 45 | 9 | Confirmed | Apr 7, 2017 | 65 | |||
Merrick B. Garland | Obama | Scalia | Mar 16, 2016 | No action | |||||||||
Elena Kagan | Obama | Stevens | May 10, 2010 | 229 | 63 | 37 | 26 | Confirmed | Aug 5, 2010 | 87 | |||
Sonia Sotomayor | Obama | Souter | Jun 1, 2009 | 262 | 68 | 31 | 37 | Confirmed | Aug 6, 2009 | 66 | |||
Samuel A. Alito, Jr. | Bush | O'Connor | Nov 10, 2005 | 2 | 58 | 42 | 16 | Confirmed | Jan 31, 2006 | 82 | |||
Harriet Miers | Bush | O'Connor | Oct 7, 2005 | Withdrawn | Oct 28, 2005 | 21 | |||||||
John G. Roberts, Jr. | Bush | Rehnquist | x | Sep 6, 2005 | 245 | 78 | 22 | 56 | Confirmed | Sep 29, 2005 | 23 | ||
John G. Roberts, Jr. | Bush | O'Connor | Jul 29, 2005 | Withdrawn | Sep 6, 2005 | 39 |
This file contains hidden or 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
#!/Users/brian/bin/perls/perl-latest | |
use v5.26; | |
use utf8; | |
use strict; | |
use warnings; | |
use lib qw(/Users/brian/Dev/business-us-usps-webtools/lib); | |
use Business::US::USPS::WebTools::TrackConfirm; | |
use Term::ANSIColor; |
This file contains hidden or 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
#!/Users/brian/bin/perls/perl-latest | |
use v5.28; | |
use utf8; | |
use open qw(:std :utf8); | |
use strict; | |
use warnings; | |
use feature qw(signatures); | |
no warnings qw(experimental::signatures); | |
use IO::Interactive qw(interactive); |
This file contains hidden or 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 v5.24; | |
my $n = $ARGV[0] // 35; | |
my $count = 0; | |
while($count <= $n) { | |
state $a = [ \$count, \'Fizz', \'Bin', \'FizzBin' ]; | |
say $a->[ (810092048>>((2*(++$count-1))%30)) & 0b11 ]->$*; | |
} |
This file contains hidden or 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/local/bin/python3 | |
import heapq | |
import os | |
import sys | |
class MergeFiles: | |
""" | |
Given a list of files, output their numbers in sorted order. |