REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2018/06/19 18:47
AppleScript is a rather peculiar scripting language to learn.
import time | |
class PageCategoryFilter(object): | |
def __init__(self, config): | |
self.mode = config["mode"] | |
self.categories = config["categories"] | |
def filter(self, bid_request): | |
if self.mode == "whitelist": |
#!/usr/bin/env python | |
# Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool | |
# | |
# To start an instance, create a yaml file with the following format: | |
# | |
# frankfurt: | |
# - subnet-azb: | |
# - type: t2.micro | |
# image: image-tagname |
@pytest.yield_fixture(autouse=True) | |
def newline_before_logging(request): | |
if request.config.getoption('capture') == 'no': | |
print() # new-line | |
yield |
from __future__ import absolute_import | |
import json | |
import sys | |
import re | |
import requests | |
import urllib | |
import urlparse | |
from urllib2 import HTTPError | |
from urllib2 import URLError | |
from urllib2 import urlopen |
import warnings | |
from skimage.measure import compare_ssim | |
from skimage.transform import resize | |
from scipy.stats import wasserstein_distance | |
from scipy.misc import imsave | |
from scipy.ndimage import imread | |
import numpy as np | |
import cv2 | |
## |