This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# scans a single document and mails it | |
# | |
# Requirements: sane, ImageMagick, tesseract, gocr, sendemail | |
# It would be trivially email to remove gocr, tesseract is better it seems | |
# You could replace ImageMagick with anything that convert PBM > something. | |
SCANFILE=`mktemp /tmp/scantmp.XXXXXXXX` | |
PBMFILE="${SCANFILE}.pbm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$TEST_PERIOD = 60 * 61 | |
$SAMPLE_PERIOD = 60 * 10 | |
$CAPACITY = 1320 | |
$RS = 20 | |
class Array | |
def mean | |
self.inject(0) { |sum, x| sum + x } / size.to_f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RS=20 | |
get_capacity() | |
{ | |
c=`i2cget -y 2 0x55 0x0c w` | |
return $(($c * 3570 / $RS / 1000)) | |
} |
NewerOlder