@@ -0,0 +1,1560 @@
+#!/bin/env python3%0A## Evan Widloski - Tuning Script for Imgur%0A## Check scores for images of various ratios, resolutions, views%0Afrom imgurt import *%0A%0Alinks = %5B'http://i.imgur.com/D331RXf.jpg', # an image with bad aspect ratio, resolution%0A         'http://i.imgur.com/P7I7bML.jpg'%5D # good aspect ratio, resolution%0A%0A%0Af = open(cache_file, 'r')%0Aj = json.loads(f.read())%0Aimages = j%5B'images'%5D%0A%0Amax_views = max(%5Bimage%5B'views'%5D for image in images%5D)%0A%0Aprint(%22ID        ratio       views       pixel         ratio_l     views_l     pixel_l   final     %22)%0Aprint(%22==============================================================================================%22)%0Afor link in links:%0A    image = %5Bimage for image in images if image%5B'link'%5D == link%5D%5B0%5D%0A%0A    %5Bratio_score, views_score, pixel_score%5D = score_image(image, max_views)%0A    ratio_logistic_score = 1/(1 + pow(math.e, -ratio_k * (ratio_score - ratio_cutoff)))%0A    views_logistic_score = 1/(1 + pow(math.e, -views_k * (views_score - views_cutoff)))%0A    pixel_logistic_score = 1/(1 + pow(math.e, -pixel_k * (pixel_score - pixel_cutoff)))%0A%0A    print(image%5B'id'%5D, end=%22%22)%0A    print(%22%2510.5f  %2510.5f  %2510.5f%22 %25 (ratio_score, views_score, pixel_score), end=%22   %7C%22)%0A    print(%22%2510.5f  %2510.5f  %2510.5f%22 %25 (ratio_logistic_score,%0A                                      views_logistic_score,%0A                                      pixel_logistic_score), end=%22%22)%0A    print(%22%2515.10f%22 %25 (ratio_score * views_score * pixel_score))%0A    print(%22----------------------------------------------------------------------------------------------%22)%0A

add score calibration helper