Name: ruff-format
Program: $PyInterpreterDirectory$/ruff
Arguments: format .
Working directory: $ProjectFileDir$
This file contains hidden or 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
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 | |
## |
This file contains hidden or 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
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 |
This file contains hidden or 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
@pytest.yield_fixture(autouse=True) | |
def newline_before_logging(request): | |
if request.config.getoption('capture') == 'no': | |
print() # new-line | |
yield |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
# 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 |
This file contains hidden or 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
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": |
This file contains hidden or 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
--- appicon.py 2015-01-23 02:21:33.000000000 +0900 | |
+++ appicon2.py 2015-01-23 02:47:26.000000000 +0900 | |
@@ -4,6 +4,7 @@ | |
import os | |
import sys | |
from wand.image import Image | |
+from wand.exceptions import BlobError, CoderError, MissingDelegateError | |
DIMENSIONS = { | |
'OSX': [ |
This file contains hidden or 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 python2 | |
# coding: utf-8 | |
from __future__ import print_function | |
from tempfile import NamedTemporaryFile | |
import os | |
import sys | |
from shutil import copyfile | |
from wand.image import Image | |
DIMENSIONS = { |
NewerOlder