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
| #render html file with table of Image, Dates in rows, from the espcam_history folder with filenames lik livingroom-2024-04-23_20-36.jpg | |
| import os | |
| import sys | |
| import datetime | |
| import re | |
| import subprocess | |
| import argparse | |
| import jinja2 | |
| import logging |
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
| setTimeout(function(){ | |
| function getAllHaCards(root = document) { | |
| const haCards = []; | |
| const elements = root.querySelectorAll('*'); | |
| elements.forEach(element => { | |
| if (element.shadowRoot) { | |
| haCards.push(...element.shadowRoot.querySelectorAll('ha-card')); | |
| haCards.push(...getAllHaCards(element.shadowRoot)); | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Highlight 404 links in red background | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-07-01 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://*.ingham.org/* | |
| // @match https://cms3.revize.com/revize/inghamcounty/* | |
| // @exclude https://itsm.ingham.org/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=ingham.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
| # Description: This script converts a json file to a csv file | |
| # Author: Lily Rudloff | |
| # Date: 05-23-2024 | |
| # Version: 1.0 | |
| # Usage: python convert_to_csv.py input.json output.csv | |
| # Notes: This script requires the json file to be a list of dictionaries | |
| # where each dictionary represents a row in the csv file. | |
| # The keys of the first dictionary will be used as the headers | |
| # for the csv file. |
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 fastapi import FastAPI, HTTPException, Depends | |
| from pydantic import BaseModel | |
| import requests | |
| import time | |
| import sqlite3 | |
| from contextlib import closing | |
| import numpy as np | |
| app = FastAPI() | |
| embeddings_model = "mxbai-embed-large" |
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 | |
| def get_list(entity_id): | |
| """Retrieve the list of to-do items from a custom 'todo' integration.""" | |
| return hass.services.async_call("todo", "get_items", | |
| { | |
| "entity_id": entity_id, | |
| }, | |
| blocking=True, |
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 json | |
| import logging | |
| class MQTTDevice: | |
| def __init__(self, name): | |
| name = self.sanitize(name,lower=False) | |
| self.name = name | |
| self.sensors = {} | |
| self.sensor_topic_root = f"homeassistant/sensor/{self.name}" | |
| self.button_topic_root = f"homeassistant/button/{self.name}" |
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/python | |
| import sys | |
| import re | |
| import openai | |
| import pyperclip | |
| from dotenv import load_dotenv | |
| import json | |
| import os | |
| from pathlib import Path | |
| import hashlib |