Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
= rplot
rplot is a C extension for Ruby of GNU libplot.
{GNU libplot}[http://www.gnu.org/software/plotutils/manual/html_mono/plotutils.html#SEC45] is a free function library for drawing two-dimensional vector graphics. It can produce smooth, double-buffered animations for the X Window System, and can export files in many graphics file formats. It is `device-independent' in the sense that its API (application programming interface) is to a large extent independent of the display type or output format. Rplot is a C extension for Ruby of GNU libplot.
== Requirements
For Debian/Ubuntu users: apt-get install libplot-dev.
For Max OS X users use {port}[http://www.macports.org/]: port install plotutils.
== Installation
gem install rplot
== Usage
Here two little examples.
The first invokes rplot operations to draw vector graphics. It draws an intricate and beautiful path (Bill Gosper's "C" curve, discussed as Item #135 in HAKMEM, MIT Artificial Intelligence Laboratory Memo #239, 1972). As the numeric constant MAXORDER (here equal to 12) is increased, the path will take on the shape of a curly letter "C", which is the envelope of a myriad of epicyclic octagons.
require 'rubygems'
require 'rplot'
module MyCurve
MAXORDER = 12
def draw_curve(dx, dy, order)
if order >= MAXORDER
self.cont(dx, dy, :rel => true)
else
self.draw_curve(0.5*(dx-dy), 0.5*(dx+dy), order+1)
self.draw_curve(0.5*(dx+dy), 0.5*(dy-dx), order+1)
end
end
end
Plotter.send(:include, MyCurve)
Plotter.params(:pagesize => 'letter')
Plotter.draw('png', 'RUBYtest3.png')do |p|
p.space(0,0, 1000,1000)
p.linewidth(0.25)
p.pencolor('red')
p.move(600, 300)
p.draw_curve(0, 400, 0)
end
The second example creates a simple animated pseudo-GIF, 150 pixels wide and 100 pixels high.
require 'rubygems'
require 'rplot'
Plotter.params(:bitmapsize => '150x100',
:bg_color => 'orange',
:transparent_color => 'orange',
:gif_iterations => 100,
:gif_delay => 5)
p = Plotter.new('gif', 'image.gif')
p.open
p.space(0,0,149,99)
p.pencolor('red')
p.linewidth(5)
p.filltype(1)
p.fillcolor('black')
i = 0
while i < 180
p.erase
p.erase
p.ellipse(75,50,40,20,i)
i += 15
end
p.delete
{Here the complete documentation with API}[http://pioz.github.com/rplot/Plotter.html].
== Questions or problems?
If you have any issues with rplot please add an {issue on GitHub}[https://github.com/pioz/rplot/issues] or fork the project and send a pull request.
== Copyright
Copyright (c) 2010 Enrico Pilotto. See {LICENSE}[http://github.com/pioz/rplot/blob/master/LICENSE] for details.
FAQs
Unknown package
We found that rplot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.