BibTeX database from PDFs via DOI

This somewhat-ridiculous BASH one-liner will create a BibTeX database file (.bib) from a bunch of PDFs via the Crossref API for DOIs, providing the PDF has a DOI on the first page.  As DOI was introduced in 2000, this will probably not work on vintage PDFs.

for pdfs in *.pdf; do pdftotext -f 1 -l 1 "$pdfs" - | grep -oE "doi:\s?[A-Za-z0-9./-]+" | sed -r 's;doi:\s?;http://api.crossref.org/works/;g' | sed -r 's;$;/transform/application/x-bibtex;g' | xargs curl -fsS 2>/dev/null | sed -e '$a\'; done > allpdf.bib

Vented versus non-vented Petri dishes

Vented Petri dishes have a small lip on the top edge of the dish that allows the lid to sit a little up from the bottom, allowing for some air flow.  Non-vented Petri dishes allow the lid to sit more or less flat on the bottom.  I was wondering what the best applications are for triple, single and non-vented Petri dishes, and found this guide from Thomas Scientific:

  • Triple vented: aids gaseous exchange. Ideally suited for short term work
  • Single vented: limits gaseous exchange, minimizes evaporation and dehydration. Ideally suited for long term work
  • Non-vented: most suitable for anaerobic and long term work
150-x-20mm-petri-dish
Non-vented Petri dish
10pcs-55mm-x-15-mm-polystyrene-bacteria-culture-font-b-dish-b-font-disposable-sterilized-font
Vented Petri dish

JMP report file .jrp file to csv

Here’s a quick and dirty Perl script to get a data table out of a .jrp file from JMP.  Not guaranteed to work for all files, as I’ve only tested it on one (so modification may be necessary).

#! /usr/bin/perl -w

use strict;
use Getopt::Long;
my $jmp_file;
my $colhead;
my $values;
my $row;
my @records;
my $ndata; 
GetOptions ('jmp=s' => \$jmp_file) or die("Error in arguments\n");

open (JMP,"<$jmp_file") || die "cannot open JMP input file $jmp_file";
while(<JMP>){
chomp;
if($_=~/New Column\(\s\"(.+?)\",.+$/){ # Get column names
 $colhead=$1;
}
if($_=~/Set Values\(\s[\[\{](.+?)[\]\}] \) \),/){ # Get row values
$values=$1;
my @row = split ", ", $values;
unshift @row, $colhead;
$ndata= scalar @row;
push @records, \@row;
}
}

# Rotate table 90 degrees (rows-to-columns)
my $nrecords=scalar @records;
for(my $i=0;$i<$ndata; $i++){
for(my $j=0;$j<$nrecords;$j++){
print "$records[$j][$i]";
print "," if $j<($nrecords-1) 
}
print "\n";
}