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
// ==UserScript== | |
// @name Google Messages Archiver | |
// @namespace Whatever | |
// @match https://messages.google.com/web/* | |
// @grant GM_log | |
// @author csm10495 | |
// @description Run doIt() in the console to archive all conversations after the most recent 5. | |
// @version 0.1.0 | |
// ==/UserScript== |
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
""" | |
A simple script to listen to a local weatherflow UDP broadcast and print out any received data. | |
(C) Charles Machalow via the MIT License (2023) .. See https://opensource.org/license/mit/ for details. | |
""" | |
import json | |
import logging | |
from pprint import pformat | |
from socket import AF_INET, IPPROTO_UDP, SOCK_DGRAM, socket | |
# pip install rich |
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
''' | |
Sample code to convert a module on import to snake_case from camelCase. | |
I wouldn't use this in production, but its kind of interesting to play with. | |
(C) 2023 - MIT License - Charles Machalow | |
''' | |
import inflection # pip install inflection | |
import inspect | |
import importlib | |
from typing import Any |
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
""" | |
Example code to show a couple different ways to wait for futures to complete and still have the ability | |
to log/print something out periodically while waiting for the futures to complete. | |
(C) - MIT License - 2024 - Charles Machalow | |
""" | |
from concurrent.futures import ( | |
ThreadPoolExecutor, | |
as_completed, |
OlderNewer