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 time | |
| from contextlib import contextmanager | |
| from peewee import CharField, IntegerField, Model, OperationalError, PostgresqlDatabase | |
| from tenacity import ( | |
| RetryError, | |
| Retrying, | |
| retry_if_exception_type, | |
| stop_after_attempt, | |
| wait_incrementing, |
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 ddtrace import patch_all as dd_patch_all | |
| from ddtrace import tracer | |
| tracer.configure(enabled=True) | |
| dd_patch_all() | |
| print(requests.get("https://example.org")) |
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 logging | |
| import random | |
| import sys | |
| import time | |
| from collections import OrderedDict | |
| from contextlib import contextmanager | |
| from functools import wraps | |
| from typing import Callable | |
| import numpy as np |
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 logging | |
| import sys | |
| import time | |
| from collections import OrderedDict | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| from contextlib import contextmanager | |
| from functools import wraps | |
| from typing import Callable | |
| from peewee import Database |
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 bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| shopt -s nullglob extglob | |
| cd "`git rev-parse --git-path objects`" | |
| search() { |
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
| # Install commands | |
| nix-env -iA nixpkgs.imagemagick7Big | |
| nix-env -iA nixpkgs.tesseract4 | |
| # Convert `input.pdf` to `out-image.tiff` | |
| convert -density 300 input.pdf -depth 8 -background white -alpha Off out-image.tiff | |
| # Convert `out-image.tiff` to `output.txt` | |
| tesseract out-image.tiff output |
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
| ## Server setup (run multiple times) | |
| Create `wheel` user and group | |
| - this user & group should be used as an alias to root | |
| - modify /etc/sudoers file using visudo and add `%wheel ALL=(ALL) NOPASSWD: ALL` | |
| - keep the group of any user to wheel, you want to give sudo access to | |
| - use this user to run commands as root, apache, nginx, caddy | |
| ## Install packages as `wheel` (run multiple times) |
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
| # <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
| # |<---- Using a Maximum Of 50 Characters ---->| | |
| # Explain why this change is being made | |
| # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
| # Provide links or keys to any relevant tickets, articles or other resources | |
| # Example: Github issue #23 |
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
| gsettings get org.gnome.desktop.interface monospace-font-name | |
| gsettings get org.gnome.desktop.interface document-font-name | |
| gsettings get org.gnome.desktop.interface font-name | |
| gsettings get org.gnome.desktop.wm.preferences titlebar-font |