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
#!/bin/bash | |
# USAGE | |
# bash ./parallel_download.sh url_list.txt | |
set -o nounset | |
set -o errexit | |
FILELIST=$1 |
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
# Submit a "GET" request via POST so we can send | |
# more data than fits in a URL | |
resp = requests.post( | |
url, | |
headers = {'X-HTTP-Method-Override': 'GET'}, | |
data=params) |
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
import requests | |
from PIL import Image | |
image = Image.open(requests.get(url, stream=True).raw) |
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
SELECT c.category_name, i.image_id FROM categories c | |
CROSS JOIN LATERAL ( | |
SELECT image_id | |
FROM image_hashes v | |
WHERE v.category_id = c.category_id | |
LIMIT 5 | |
) i; |
OlderNewer