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
| find . -name "*.png" -print0 | parallel -0 ' [14:26:20] | |
| dir=$(dirname {}) | |
| file=$(basename {}) | |
| parent_dir=$(basename "$dir") | |
| new_basepath="${parent_dir}-webp" | |
| mkdir -p "${new_basepath}" | |
| new_name="${new_basepath}/${file}" | |
| cwebp -q 100 {} -o "${new_name}.webp" | |
| ' |
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 typing import Any, Generator | |
| import asyncio | |
| import functools | |
| import json | |
| import random | |
| import time | |
| from http import HTTPStatus | |
| from pathlib import Path | |
| import aiohttp |
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 | |
| # Example: `./get-all-object-versions.sh -b jeonju-cctv --key "prod/4-5_10.png"` | |
| #Read the argument values | |
| while [[ "$#" -gt 0 ]] | |
| do | |
| case $1 in | |
| -b|--bucket) BUCKET="$2"; shift;; | |
| -k|--key) SEARCH_KEY="$2"; shift;; |
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
| Private Sub ListBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single) | |
| HookListBoxScroll | |
| End Sub | |
| Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) | |
| UnhookListBoxScroll | |
| End Sub |
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
| """ | |
| Playing with python's single dispatch. | |
| See: https://hynek.me/articles/serialization/ | |
| See also PEP 443: https://www.python.org/dev/peps/pep-0443/ | |
| """ | |
| from datetime import datetime | |
| from functools import singledispatch |