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
package PDL::SampleData; | |
use strict; | |
use warnings; | |
use Carp; | |
use PDL; | |
use File::ShareDir 'module_dir'; | |
use File::chdir; |
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
package Latest; | |
use strict; | |
use warnings; | |
use Devel::Declare (); | |
my $keyword = 'latest'; | |
sub import { | |
my $class = shift; |
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 strict; | |
use warnings; | |
package TiePDL; | |
our @ISA = 'PDL'; | |
{ | |
no strict 'refs'; | |
*{'PDL::tie'} = sub { |
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/bin/env perl | |
use strict; | |
use warnings; | |
my $bot = GrandePiddleBot->new(); | |
$bot->run; | |
package GrandePiddleBot; |
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 SelectSaver; | |
use Tie::Select; | |
open my $fh1, '>', \my $var1; | |
open my $fh2, '>', \my $var2; | |
#Select Saver | |
{ | |
my $sh1 = SelectSaver->new( $fh1 ); |
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 strict; | |
use warnings; | |
use v5.10; | |
=pod | |
To run, say something like this: | |
perl fit-data.pl data.dat |
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/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use Text::Balanced qw/extract_bracketed extract_delimited extract_multiple/; | |
my $html = do { local $/; <DATA> }; |
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/bin/env perl | |
use strict; | |
use warnings; | |
use PDL; | |
my $cond = shift || 0; # can pass a true value as an arg to the script | |
my $pdl = null(); |
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/bin/env perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use Data::Dumper; | |
use File::chdir; | |
use File::Spec; |
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/bin/env perl | |
use strict; | |
use warnings; | |
use PerlGSL qw/int_1d findroot_1d/; | |
# _ 2 | |
# / 1 x | |
# | exp( - -- ) dx = c |