Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/w/a/Wallpaper-Downloader-and-Rotator-for-Gnome-HEAD/01_wallpaper_downloader.py   Wallpaper-Downloader-and-Rotator-for-Gnome(Download)
                     ((100.0 - cfg.SIZE_TOLERANCE_PERCENTAGE)/100.0)
    file_name = web.get_file_name(image_url)
    file_path = cfg.PHOTO_DIR + file_name
    try:
        img = Image.open(file_path)
def delete_bad_images(bad_image_urls):
    """Delete images from the file system that are not suitable for wallpapers."""
    for url in bad_image_urls:
        os.remove(cfg.PHOTO_DIR + web.get_file_name(url))
 
        if not db.is_image_in_db(img_url):
            filename = os.path.basename(img_url)
            if not os.path.exists(cfg.PHOTO_DIR + filename):
                referer_string = web.get_referrer_string(img_url)  # to trick 4walled.org
                cmd = "wget {ref} {url} -O {save}".format(url=img_url, save=os.path.join(cfg.PHOTO_DIR, filename), ref=referer_string)
    for image_url in image_urls:
        file_name = web.get_file_name(image_url)
        file_path = cfg.PHOTO_DIR + file_name
        img = Image.open(file_path)
        width = img.size[0]

src/w/a/Wallpaper-Downloader-and-Rotator-for-Gnome-HEAD/wallpapers/helper/directories.py   Wallpaper-Downloader-and-Rotator-for-Gnome(Download)
def check_photo_dir():
    if not os.path.exists(cfg.PHOTO_DIR):
        os.makedirs(cfg.PHOTO_DIR)