Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import subprocess
import os
import re
import xml.etree.ElementTree as ET
import yaml # Requires PyYAML installation
from collections import defaultdict
import sys
# import shutil # No longer needed for backup when using API
#!/usr/bin/env python3
import argparse
import configparser
import os
import re
import sys
from pathlib import Path
def parse_wg_config(config_path: Path) -> dict:
// ==UserScript==
// @name Amazon Enhanced URL Processor
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Processes Amazon URLs for various enhancements.
// @author ChatGPT with assistance from a1678991
// @match https://www.amazon.co.jp/*
// @grant none
// @run-at document-start
// ==/UserScript==

Generated by OpenAI o1-preview

Understanding Memory Performance in Recent AMD Ryzen Processors: MCLK, UCLK, FCLK, and More

In the realm of modern computing, especially with the advent of multi-core and high-throughput processors like the AMD Ryzen series, memory performance plays a pivotal role in overall system efficiency. For developers working on memory-intensive software, grasping the intricacies of memory clocks and their interplay within the CPU architecture is essential for optimizing application performance.

This comprehensive overview will delve into the key components affecting memory performance in recent AMD Ryzen processors:

  • MCLK (Memory Clock)
// ==UserScript==
// @name Booth.pm Download All
// @namespace http://tampermonkey.net/
// @author a1678991
// @version 1.0
// @description Add a "Download All" button to purchased items on Booth.pm
// @match https://accounts.booth.pm/library*
// @grant none
// ==/UserScript==
processor : 0
vendor_id : AuthenticAMD
cpu family : 25
model : 17
model name : AMD EPYC 9654P 96-Core Processor
stepping : 1
microcode : 0xa101144
cpu MHz : 1500.000
cache size : 1024 KB
physical id : 0
# Function to check if the script is running as Administrator
function Test-IsAdmin {
$currentUser = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
return $currentUser.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
}
# If not running as Administrator, restart the script with elevated privileges
if (-not (Test-IsAdmin)) {
Write-Output "Restarting script with elevated privileges..."
Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
// ==UserScript==
// @name Hugging Face Clone Button
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds a button to Hugging Face repository pages to easily copy the git clone command to the clipboard.
// @author a1678991
// @match https://huggingface.co/*
// @grant GM_setClipboard
// ==/UserScript==
@a1678991
a1678991 / ttl-serial-proxy.ino
Created February 23, 2024 09:02
esp32をシリアルのレベルシフター代わりにするやつ
#include <cmath>
#include <HardwareSerial.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
const int SERIAL_RX_PIN = 16; // シリアル受信ピン
const int SERIAL_TX_PIN = 17; // シリアル送信ピン
const int SERIAL_BAUD_RATE = 115200; // シリアルのボーレート
const int SERIAL_LOOP_DELAY_MS = 0.1; // ループ毎の待機時間
const int LED_RX_PIN = 2; // 受信用LEDのピン
@a1678991
a1678991 / HierarchyHighlighter.cs
Last active February 21, 2024 11:30
EditorOnlyに指定されているGameObjectをわかりやすく表示するやつ
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public class HierarchyHighlighter
{
static HierarchyHighlighter()
{
EditorApplication.hierarchyWindowItemOnGUI += HierarchyItemCB;
}