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 python | |
import os | |
import csv | |
import glob | |
import sys | |
import argparse | |
from datetime import datetime | |
from csv import reader |
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 python | |
import os | |
import csv | |
import sys | |
import csv | |
from datetime import datetime | |
import argparse | |
import glob |
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/python | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import cv2 | |
import numpy as np | |
import csv | |
colours = [(230, 63, 7), (48, 18, 59), (68, 81, 191), (69, 138, 252), (37, 192, 231), (31, 233, 175), (101, 253, 105), (175, 250, 55), (227, 219, 56), (253, 172, 52), (246, 108, 25), (216, 55, 6), (164, 19, 1), (90, 66, 98), (105, 116, 203), (106, 161, 253), (81, 205, 236), (76, 237, 191), (132, 253, 135), (191, 251, 95), (233, 226, 96), (254, 189, 93), (248, 137, 71), (224, 95, 56), (182, 66, 52), (230, 63, 7), (48, 18, 59), (68, 81, 191), (69, 138, 252), (37, 192, 231), (31, 233, 175), (101, 253, 105), (175, 250, 55), (227, 219, 56), (253, 172, 52), (246, 108, 25), (216, 55, 6), (164, 19, 1), (90, 66, 98), (105, 116, 203), (106, 161, 253), (81, 205, 236), (76, 237, 191), (132, 253, 135), (191, 251, 95), (233, 226, 96), (254, 189, 93), (248, 137, 71), (224, 95, 56), (182, 66, 52)] |
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 python | |
from skimage.metrics import structural_similarity as ssim | |
import numpy as np | |
import cv2 | |
import argparse | |
def options(): | |
parser = argparse.ArgumentParser(description="Read image metadata") | |
parser.add_argument("-o", "--first", help="Input image file.", required=True) |
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 python | |
from math import log10, sqrt | |
import cv2 | |
import numpy as np | |
import argparse | |
# Based on https://www.geeksforgeeks.org/python-peak-signal-to-noise-ratio-psnr/ | |
def options(): |
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 python | |
import imageio | |
import exifread | |
from PIL import Image, ExifTags | |
from PIL.ExifTags import TAGS | |
from PIL.PngImagePlugin import PngImageFile, PngInfo | |
import re | |
import os | |
from rawphoto.cr2 import Cr2 |
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 python | |
import psycopg2 | |
try: | |
login = "dbname='YourDatabaseName' user='Adam' host='127.0.0.1' " + \ | |
"password='MyPa$$word'" | |
# Establish a connection | |
conn = psycopg2.connect(login) | |
# Create a psycopg2 cursor that can execute queries |
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 python | |
import os | |
import fnmatch | |
import argparse | |
import sys | |
import cv2 | |
# Intro Text | |
print("\033[1;34;40m\n\nRotate images \033[0m") |
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
// Blank ImageJ Macro Script that loops through files in a directory | |
// Written by Adam Dimech | |
// https://code.adonline.id.au/imagej-batch-process-headless/ | |
// Specify global variables | |
#@String input | |
#@String suffix | |
// Add trailing slashes |
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
/* | |
1. Log in to psql as a superuser | |
2. CHMOD target directory to 777 | |
3. Execute via SELECT db_to_csv('/path/to/output'); | |
4. Use complete file path. | |
*/ | |
CREATE OR REPLACE FUNCTION db_to_csv(path TEXT) RETURNS void AS $$ | |
declare | |
tables RECORD; |
NewerOlder