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
"""TS011F Circuit Breaker * Tongou TO-Q-SY2-JZT.""" | |
"""Supports HA 2024.11""" | |
from typing import Any, Optional, Union | |
import logging | |
import enum | |
from struct import (iter_unpack, pack) | |
from zigpy.profiles import zgp, zha | |
from zigpy.quirks.v2 import ( |
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
# | |
# Short script for converting GNU Radio XML blocks to YAML blocks | |
# without having to start GRC | |
# | |
# Please note that this program _WILL_ overwrite files. | |
# | |
# How to use: | |
# 1. Save this file to grc/converter/cmdline_converter.py | |
# 2. Navigate back to the GNU Radio project root | |
# 3. Run: python3 -m grc.converter.cmdline_converter [name.xml] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>A simple clock</title> | |
</head> | |
<body translate="no" > |
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,re, datetime | |
d = '/var/lib/pacman/local' | |
packages = os.listdir(d) | |
packages.sort() | |
packages.remove('ALPM_DB_VERSION') | |
pkgname_search = re.compile('^(.*?)-[0-9]') |
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
/* | |
* interpreter.ino: Simple Arduino command line interpreter. | |
* | |
* This is intended solely as a template for building richer, | |
* application-specific interpreters. Add your specific commands to the | |
* exec() function, and whatever you need to setup() and loop(). | |
* | |
* Usage: | |
* Talk to it through the serial port at 9600/8N1. Commands should be | |
* terminated by CR (\r), answers are terminated by CRLF (\r\n). This |
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 jenkins.model.* | |
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /my_regex_here/ | |
} | |
matchedJobs.each { job -> | |
println job.name | |
//job.delete() | |
} |
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/bash | |
ROOT="$(pwd)" | |
dl() { | |
local cookie="/tmp/pacman-mirror-cookie.txt" | |
touch "${cookie}" | |
local 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
#include <stdio.h> | |
void DumpHex(const void* data, size_t size) { | |
char ascii[17]; | |
size_t i, j; | |
ascii[16] = '\0'; | |
for (i = 0; i < size; ++i) { | |
printf("%02X ", ((unsigned char*)data)[i]); | |
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') { | |
ascii[i % 16] = ((unsigned char*)data)[i]; |