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
| #!/bin/bash | |
| # USAGE | |
| # bash ./parallel_download.sh url_list.txt | |
| set -o nounset | |
| set -o errexit | |
| FILELIST=$1 |
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
| # 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 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 requests | |
| from PIL import Image | |
| image = Image.open(requests.get(url, stream=True).raw) |
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
| 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; |
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
| #!/bin/bash | |
| # Tool to find which commits are unique to a given branch using patch-id comparison. | |
| # This is helpful for finding good stuff & new contributions in old branches when they have become out of sync with main. | |
| # Assumes the trip branch is called main. | |
| set -o nounset | |
| set -o errexit | |
| set -o pipefail |
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
| # /// script | |
| # https://peps.python.org/pep-0723/ | |
| # dependencies = [ | |
| # "boto3" | |
| # ] | |
| # /// | |
| import boto3 | |
| from botocore.exceptions import ClientError |
OlderNewer