Cheers!
]]>I can do this with mathplotlib with about a dozen measly lines of code
Because of this I have been looking at using mathplotlib even though I rather do it in perl.
]]>pandas (http://pandas.pydata.org/): offers efficient R-like DataFrames with tons of built-in capability
IPython Notebook (http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html): provides a web-based notebook that enables scientists to log their research in HTML-like cells; embed images, figures, videos, and external web pages; run Python/R/octave code in code cells; and do all kinds of shell commands, data management, data exploration, plotting, etc. -- all in the same tool.
A couple people in my lab were fairly religious about Perl until I showed them IPython Notebook and all the other tools Python has to offer. They switched over without even thinking about it and haven't looked back.
Just a thought from an end-user.
]]>
my $chart = Chart::Gnuplot->new(
output => "test.png",
xlabel => "x-axis", # annotation text
xrange => [0, 10], # axis range
);
# About data point array 1
my $dataSet1 = Chart::Gnuplot::DataSet->new(
points => \@data1,
color => "blue", # line color chosen
);
# About data point array 2
my $dataSet2 = Chart::Gnuplot::DataSet->new(
points => \@data2,
color => "dark-red", # line color chosen
);
$chart->plot2d($dataSet1, $dataSet2);
]]>
(god, it was painful to make this comment with the damned "timed out" errors)
]]>sub rubin { $arg1, $arg2 = @_; print "$arg1 $arg2\n"; } rubin (1, 2);
just prints out ” 2” because he left out the () around $arg1, $arg2.
So he clearly doesn’t even know the language enough to write even a very simple program, or he does not know enough to turn on warnings and strict.
]]>$ cat foo #!/usr/bin/env perl use Modern::Perl; my $x = "ARGV"; while () { say $_; } # execute as: foo 'ipconfig|']]>
while (<$x>) { say $_; }
(after preview, I found that the diamond has to be entered as <$x> into the text box :-)
Single argument open is fine; the real question is whether piped open via ARGV magic is appropriate at all - which is the only valid point of Netanel Rubin’s talk. Is that a bug or a feature?
]]>Since the null filehandle uses the two argument form of “open” in perlfunc it interprets special characters, so if you have a script like this:
while (<>) { print; }
and call it with “perl dangerous.pl ‘rm -rfv *|’”, it actually opens a pipe, executes the “rm” command and reads “rm“‘s output from that pipe. If you want all items in @ARGV to be interpreted as file names, you can use the module “ARGV::readonly” from CPAN.
So, yes. He does not only not learn the language, but also doesn’t read the docs of the stuff he’s talking about. Nuff said.
]]>“… Going forward, developers should take this as an example of why it’s not safe to unserialize untrusted data. Unfortunately in the Java world, so much is built on the concept that this is okay, it’s going to take a long time to move away from that. …”
https://jenkins-ci.org/content/mitigating-unauthenticated-remote-code-execution-0-day-jenkins-cli
]]>