Skip to content

Instantly share code, notes, and snippets.

View bbattista's full-sized avatar

Bradley M. Battista bbattista

View GitHub Profile
@bbattista
bbattista / reconstruct.py
Last active December 12, 2023 08:20
Bayer Reconstruction of 12-bit PGM in RGGB configuration with color/contrast balancing
#!/usr/bin/python
#
# python reconstruct.py filename.pgm
# takes in a raw image having a Bayer Color Formatted Array (RGGB)
# and outputs two JPEG files. The first file is simply the
# Bayer Reconstruction as RGB. The second file has been
# processed to enhance color and contrast using combinations of:
# 1) independent color channel scaling
# 2) simplest color balancing
# 3) white balancing
@bbattista
bbattista / example_jobcodes.pl
Created September 18, 2014 22:58
TSHEETS API calls from Perl
#!/usr/bin/perl
# This example shows how to connect to the Tsheets API using Perl
#
use HTTP::Request::Common;
use LWP::UserAgent;
use JSON;
use Data::Dumper;
# Here's an example query to the API that reports the JSON jobcodes result into a hash array