A Wiki in the Desert
Log in

Difference between revisions of "User:Beren/Scripts"

From A Wiki in the Desert
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
== Chemistry Lab Glassware Matcher ==
 
== Chemistry Lab Glassware Matcher ==
 +
 +
This script takes a storage container full of glassware and attempts to find combinations that can successfully calibrate a [[Chemistry Laboratory]]. It is written in Perl which should be available by default on Linux or Mac, and installable on Windows.
  
 
# Copy the script from [[User:Beren/Scripts/Glassware]]. Save it to a file named, e.g. chemistry_matcher.pl
 
# Copy the script from [[User:Beren/Scripts/Glassware]]. Save it to a file named, e.g. chemistry_matcher.pl

Latest revision as of 20:10, 12 May 2021

Chemistry Lab Glassware Matcher

This script takes a storage container full of glassware and attempts to find combinations that can successfully calibrate a Chemistry Laboratory. It is written in Perl which should be available by default on Linux or Mac, and installable on Windows.

  1. Copy the script from User:Beren/Scripts/Glassware. Save it to a file named, e.g. chemistry_matcher.pl
  2. Put all your Beakers, Distillation Coils, Florence Flasks, Test Tubes and Thistle Tubes into a storage container
  3. Use Utility->Copy Contents to Clipboard to copy the contents into a text file, e.g. glassware.txt
  4. Execute the script:
    perl chemistry_matcher.pl glassware.txt

Sample output (it can be a lot):

Calibration Level 1:
Sum: 35300 Beaker: 7213 Distillation Coil: 7505 Florence Flask: 1219 Test Tube: 9692 Thistle Tube: 9671
Sum: 35300 Beaker: 6795 Distillation Coil: 7770 Florence Flask: 1372 Test Tube: 9692 Thistle Tube: 9671
...
Sum: 44300 Beaker: 7558 Distillation Coil: 7770 Florence Flask: 9609 Test Tube: 9692 Thistle Tube: 9671

Calibration Level 2:
Sum: 35002 Beaker: 7558 Distillation Coil: 5921 Florence Flask: 2160 Test Tube: 9692 Thistle Tube: 9671
...
Sum: 35004 Beaker: 1909 Distillation Coil: 5915 Florence Flask: 9609 Test Tube: 9692 Thistle Tube: 7879
Sum: 35004 Beaker: 2067 Distillation Coil: 5757 Florence Flask: 9609 Test Tube: 9692 Thistle Tube: 7879

Calibration Level 3:
Sum: 40004 Beaker: 6795 Distillation Coil: 9712 Florence Flask: 7084 Test Tube: 6742 Thistle Tube: 9671
Sum: 40003 Beaker: 7213 Distillation Coil: 6191 Florence Flask: 7236 Test Tube: 9692 Thistle Tube: 9671
Sum: 40004 Beaker: 7558 Distillation Coil: 8219 Florence Flask: 9609 Test Tube: 6742 Thistle Tube: 7876
Sum: 40001 Beaker: 7558 Distillation Coil: 5757 Florence Flask: 9609 Test Tube: 7406 Thistle Tube: 9671
Sum: 40001 Beaker: 6795 Distillation Coil: 6490 Florence Flask: 9609 Test Tube: 7436 Thistle Tube: 9671