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 base64 | |
| import os | |
| from cryptography.fernet import Fernet, MultiFernet | |
| from cryptography.hazmat.primitives import hashes | |
| from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
| psk = "superSecretPreSharedKey" | |
| salt = os.urandom(16) | |
| content = "Super secret data" |
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 os | |
| import json | |
| import cherrypy | |
| import time | |
| import threading | |
| from cklib.graph import Graph | |
| from cklib.graph.export import node_from_dict | |
| from prometheus_client import Summary | |
| from prometheus_client.exposition import generate_latest, CONTENT_TYPE_LATEST |
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
| git checkout $(git branch | grep -E "(main|master)" | sed -e 's/*\s\+//') && git branch | grep -vE "(main|master)" | xargs git branch -D |
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/env python3 | |
| import signal | |
| import socket | |
| import multiprocessing | |
| import asyncio | |
| import logging | |
| import argparse | |
| from threading import Event | |
| from asyncio import StreamReader, StreamWriter |
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 boto3 | |
| from datetime import datetime, timedelta | |
| from typing import Dict, List | |
| def cpu_usage_metrics_for_instance( | |
| region: str, instance_id: str, start_time: datetime, duration: timedelta | |
| ) -> Dict[str, float]: | |
| end_time = start_time + duration | |
| metric_name = "CPUUtilization" |
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/sh | |
| for file in $(git ls-tree -r main --name-only); do git grep -I '^' -- "$file" >/dev/null && git blame --line-porcelain main -- "$file" | grep '^author ' | sed 's/^author //'; done | sort | uniq -c | sort -n |
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/python3 | |
| import os | |
| import dbus | |
| import gpiod | |
| import time | |
| import logging | |
| from argparse import ArgumentParser, Namespace | |
| from datetime import datetime | |
| from gpiod.line import Direction, Value |
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.13 | |
| import pytest | |
| import sys | |
| import re | |
| from packaging.version import Version | |
| from typing import Tuple | |
| def encode_version( | |
| major: int, |
OlderNewer