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
{ | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"$id": "https://example.com/product.schema.json", | |
"title": "Trase Website Metadata", | |
"description": "", | |
"type": "object", | |
"properties": { | |
"name": {}, | |
"contexts": { | |
"type": "array", |
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
""" | |
This script fetches the ETag of an AWS S3 object. It then computes | |
the ETag locally to see if it matches. | |
From From https://teppen.io/2018/10/23/aws_s3_verify_etags/ | |
""" | |
from typing import Optional | |
from hashlib import md5 |
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
on: | |
pull_request: | |
types: [synchronize, opened, reopened, ready_for_review] | |
jobs: | |
build: | |
if: github.event.pull_request.draft == false |
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 collections import Counter | |
def iterables_equal(a, b): | |
""" | |
Returns true if and only if two iterables of hashable objects are equal up to their | |
order. Iterables can be nested. | |
For example: | |
iterable_equality([1, 2], [2, 1]) # True |
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 python3 | |
import argparse | |
import sys | |
from dateutil import parser as date_parser | |
from datetime import datetime | |
INTERVALS = (('years', 60 * 60 * 24 * 7 * 52), | |
('weeks', 60 * 60 * 24 * 7), |