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 | |
from typing import List | |
def goldfish_to_txt(lines: List[str], skip_headers=False) -> List[str]: | |
""" Takes a deck in mtggoldfish format and returns traditional text | |
Arguments: | |
lines -- each line is either a "header" or a decklist entry | |
skip_headers -- whether to skip header lines |
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 | |
""" replace secrets with base64-encoded env-vars | |
Specifically, replace any instance of ${{ secrets.XXXX }} with the Base64 encoded value of $XXXX. | |
Usage: | |
`python secrets.py <input file> [output file]` | |
if output file is unspecified, outputs to stdout. | |
""" | |
import os |
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
-- Copyright (c) 2020, petzku <[email protected]> | |
-- | |
-- Permission to use, copy, modify, and distribute this software for any | |
-- purpose with or without fee is hereby granted, provided that the above | |
-- copyright notice and this permission notice appear in all copies. | |
-- | |
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
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
""" Diff video sources to catch infoboxes and other signs. | |
Usage: $ python diff.py <clean> <hardsubbed> [start-offset] | |
`start-offset` should be the number of frames to drop from start to align the two video sources. | |
Positive values drop frames from `clean`, negative from `hardsubbed`. | |
If left out, automatically deduce the proper offset. | |
Outputs frame ranges to stdout, and a diffing clip to "out.y4m". |
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 | |
import re | |
import sys | |
from pathlib import Path | |
from datetime import timedelta | |
import argparse | |
import contextlib | |
from dataclasses import dataclass |