Gibas, Cynthia, and Per Jambeck. Developing Bioinformatics Computer Skills
--Explanation for dummies: she never wastes effort writing a program if someone else has already made it.
#!/usr/bin/perl -w
use strict;
use integer;
use POSIX qw(strftime);
use Time::Local;
$ENV{'PATH'} = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin";
my $timestring = "";
my $keystring = "";
my $averagestring ="";
my $average=0;
my $count=0;
sub dumpactivetime($)
{
my ($misc) = @_;
die "No misc at line $.\n" if !defined($misc);
no integer;
my $t = "@$misc{activetime}";
$count = $count + 1;
$average = $average + ($t-$average)/$count;
$timestring = $timestring.sprintf("%.2f",$t/540.0).",";
$averagestring = $averagestring.sprintf("%.2f",$average/540.0).",";
}
sub dumpkeystrokes($)
{
my ($misc) = @_;
die "No misc at line $.\n" if !defined($misc);
#my $miscstr = join(" ", @$misc{@$miscstats});
no integer;
my $t = sprintf("%.2f",@$misc{keystrokes}/1000.0);
$keystring = $keystring.$t.","
}
#
# Initialize RRD
#
my @miscstats = qw(activetime keystrokes); #mousemovement clickmovement movementtime clicks
#keystrokes);
my $step = 24 * 3600; # 24-hr steps
my $heartbeat = 4 * $step;
my (@DS);
foreach my $miscstat (@miscstats) {
push @DS, "DS:$miscstat:GAUGE:$heartbeat:0:U";
}
umask(022);
#
# Populate data
#
my $source = "$ENV{HOME}/.workrave/historystats";
my $first = 1;
my ($tmdate, $break, $misc) = (undef, undef, undef);
open(SOURCE, $source) or die "open $source: $!\n";
print "http://chart.apis.google.com/chart?cht=lc&chg=7,33.33,2,4";
print "&chxt=x,y,r,x,y,r&chxr=0,8772,8877|1,0,15|2,0,100000";
print "&chxl=3:|Day|4:|Hours|5:|Number&chxp=3,50|4,50|5,50";
print "&chco=4d89f9,008000,fd0f0f";
print "&chtt=Computer+Usage+Statistics";
print "&chts=ff9900,15";
while (
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
RepRap is short for Replicating Rapid-prototyper. It is the practical self-copying 3D printer ...- a self-replicating machine. This 3D printer builds the parts up in layers of plastic. This technology already exists, but the cheapest commercial machine would cost you about €30,000. And it isn't even designed so that it can make itself. So what the RepRap team are doing is to develop and to give away the designs for a much cheaper machine with the novel capability of being able to self-copy (material costs are about €500). That way it's accessible to small communities in the developing world as well as individuals in the developed world. Following the principles of the Free Software Movement we are distributing the RepRap machine at no cost to everyone under the GNU General Public Licence. So, if you have a RepRap machine, you can make another and give it to a friend..