1722. Minimize Hamming Distance After Swap Operations

You are given two integer arrays, source and target, both of length n. You are also given an array allowedSwaps where each allowedSwaps[i] = [ai, bi] indicates that you are allowed to swap the elements at index ai and index bi (0-indexed) of array source. Note that you can swap elements at a specific pair of indices multiple times and in any order. The Hamming distance of two arrays of the same length, source and target, is the number of positions where the elements are different. Formally, it is the number of indices i for 0 <= i <= n-1 where source[i] != target[i] (0-indexed). Return the minimum Hamming distance of source and target after performing any amount of swap operations on array source.
/**
 * @param {number[]} source
 * @param {number[]} target
 * @param {number[][]} allowedSwaps
 * @return {number}
 */
var minimumHammingDistance = function(source, target, allowedSwaps) {
    const n = source.length;

    // --- DSU (Union-Find) ---
    const parent = Array.from({ length: n }, (_, i) => i);
    const find = x => parent[x] === x ? x : parent[x] = find(parent[x]);
    const union = (a, b) => parent[find(a)] = find(b);

    // Build DSU from allowed swaps
    for (const [a, b] of

sqlalchemy foundation

SQLALCHEMY - Наиболее популярная библиотека для работы с базой данных.
Алхимия делится на core/orm части. 

Можно использовать только core без использования orm.

agent-skills

---
name: web-artifacts-builder
description: Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
license: Complete terms in LICENSE.txt
---

# Web Artifacts Builder

To build powerful frontend claude.ai artifacts, follow these steps:
1. Initialize the fr

RAG Projects

"I want to build an advanced RAG project using only PDF data. The data includes mixed content such as text, mathematics, diagrams, and other elements from the electrical energy domain. Please suggest the best approach for the data cleaning and chunking parts only, so that my RAG system will perform better."

2078. Two Furthest Houses With Different Colors

There are n houses evenly lined up on the street, and each house is beautifully painted. You are given a 0-indexed integer array colors of length n, where colors[i] represents the color of the ith house. Return the maximum distance between two houses with different colors. The distance between the ith and jth houses is abs(i - j), where abs(x) is the absolute value of x.
/**
 * @param {number[]} colors
 * @return {number}
 */
var maxDistance = function(colors) {
    const n = colors.length;
    let ans = 0;

    // Check from the left end
    for (let j = n - 1; j >= 0; j--) {
        if (colors[j] !== colors[0]) {
            ans = Math.max(ans, j - 0);
            break; // this is the farthest possible from the left
        }
    }

    // Check from the right end
    for (let i = 0; i < n; i++) {
        if (colors[i] !== colors[n - 1]) {
            ans = M

Account upgrade links


Change to team plan - app.cacher.io/enter?action=change_to_plan&p=team
Change to expert plan - app.cacher.io/enter?action=change_to_plan&p=expert

pi-project-manager

---
name: projectmanager
description: End-to-end project management specialist for this repo. Acts as roadmap/sprint manager, technical PM, active coordinator that delegates to other subagents, and status reporter while preferring local repo inspection over web tools.
systemPromptMode: replace
inheritProjectContext: true
inheritSkills: true
maxSubagentDepth: 3
---

You are projectmanager, an end-to-end software project management specialist embedded in this repository.

You combine fo

image prompt

[Subject]: A complex, vintage Chicano tattoo-style graphic composition featuring a large menacing skull wearing aviator sunglasses and a snapback cap reading 'Nawf Side'. Below the skull is elaborate, ornate gothic typography reading 'TRILLA THAN THA REST' intertwined with decorative flowing ribbons. At the base sits a classic 90s luxury lowrider sedan with wire spoke wheels, flanked by stacks of hundred dollar bills, a smoking double styrofoam cup, a giant faceted diamond, and a smaller skull r

Mentor Prompt

You are a veteran Full-Stack Web Developer, Certified Google Cloud Engineer, and AI Engineer. Your tool stack is Javascript-based, with Node.JS for the backend and for Machine Learning algorithms, and React Native, Next.js and other js frameworks for styling. You are my mentor in Google Developer Program, and Google Cloud. You will be guiding and tutoring me in Full-Stack Cloud Dev, AI Engineering, Prompt Engineering, and freelance work.

バックエンド・インフラの守備範囲メモ

# バックエンドエンジニアリング基礎領域マップ

実務で着手する順に構成。

---

## 1. Linuxとシェルの基礎

すべての土台。クラウド環境の問題も、実態はLinuxレベルの問題であることが多い。

- **操作**:ファイルシステムのナビゲーション / パーミッション管理(chmod / chown) / ポート管理(lsof / ss) / 環境変数
- **プロセス管理**:ps / kill / バックグラウンド実行(nohup / &) / ゾンビプロセスの検出と対処
- **サービス管理**:systemdによるサービスの起動・停止・自動再起動設定(systemctl enable / start / status)
- **リソース監視**:
  - **CPU**:top / htop / mpstat
  - **メモリ**:free / vmstat
  - **ディスク**:df / du / iostat
  - **ネットワーク**:iftop / nethogs
- **ログ調査**:grep / tail -f / less / journa

バックエンド・インフラの守備範囲メモ

# バックエンドエンジニアリング基礎領域マップ

実務で着手する順に構成。

---

## 1. Linuxとシェルの基礎

すべての土台。クラウド環境の問題も、実態はLinuxレベルの問題であることが多い。

- **操作**:ファイルシステムのナビゲーション / パーミッション管理(chmod / chown) / ポート管理(lsof / ss) / 環境変数
- **プロセス管理**:ps / kill / バックグラウンド実行(nohup / &) / ゾンビプロセスの検出と対処
- **サービス管理**:systemdによるサービスの起動・停止・自動再起動設定(systemctl enable / start / status)
- **リソース監視**:
  - **CPU**:top / htop / mpstat
  - **メモリ**:free / vmstat
  - **ディスク**:df / du / iostat
  - **ネットワーク**:iftop / nethogs
- **ログ調査**:grep / tail -f / less / journa

ページ遷移前にhoverで遷移先ページ情報を読み込ませる

<!-- ==========================================================
  Speculation Rules API テンプレート
  構成: prefetch + prerender + 副作用URL除外 + セレクター除外
  ※ type="speculationrules" の中身はJSONとしてパースされるためコメントを含められない。HTML側で補足する
  ※ 配置: head内またはbody内。JSとして実行されないため他のscriptとの順序は無関係
  ※ 無効化条件:
      Save-Dataヘッダー有効時
      省エネモード かつ バッテリー残量低下時
      メモリ不足時
========================================================== -->

<!-- prefetch with eager: HTMLのみ取得。発動タイミングはブラウザ依存で、immediateとmoderateの間 -->
<!-- 同時保持上限は2件。上限到達時は

1855. Maximum Distance Between a Pair of Values

You are given two non-increasing 0-indexed integer arrays nums1​​​​​​ and nums2​​​​​​. A pair of indices (i, j), where 0 <= i < nums1.length and 0 <= j < nums2.length, is valid if both i <= j and nums1[i] <= nums2[j]. The distance of the pair is j - i​​​​. Return the maximum distance of any valid pair (i, j). If there are no valid pairs, return 0. An array arr is non-increasing if arr[i-1] >= arr[i] for every 1 <= i < arr.length.
/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @return {number}
 */
var maxDistance = function(nums1, nums2) {
    let i = 0, j = 0;
    let ans = 0;

    while (i < nums1.length && j < nums2.length) {
        if (nums1[i] <= nums2[j]) {
            ans = Math.max(ans, j - i);
            j++; // try to go farther
        } else {
            i++; // need a smaller nums1[i]
        }
    }

    return ans;
};

GCP-Useful commands

# GCP Useful Commands

## CLI

### Buckets

* List all files: `gcloud storage ls gs://your-bucket-name`

Python_TD_General

# PYTHON & PATH

## PATH "HOT LOAD"
Sometimes we just want to add a module / library for a specific project, and "hot load" it.
We can modify the search path for this project by running the following command ( before we acutally load the module)

Rather than a global mod to system env PYTHONPATH, we use the following code; ( here for inside of touchdesigner )

Firing an Execute DAT onStart() with the code snippet below:


### example execute dat in TD.
```
import sys
mypath = "C:/Python311/Lib/s

3783. Mirror Distance of an Integer

You are given an integer n. Define its mirror distance as: abs(n - reverse(n))​​​​​​​ where reverse(n) is the integer formed by reversing the digits of n. Return an integer denoting the mirror distance of n​​​​​​​. abs(x) denotes the absolute value of x.
/**
 * @param {number} n
 * @return {number}
 */
var mirrorDistance = function(n) {
    let original = n;
    let rev = 0;

    // Reverse the digits of n
    while (n > 0) {
        rev = rev * 10 + (n % 10);
        n = Math.floor(n / 10);
    }

    // Mirror distance = |n - reverse(n)|
    return Math.abs(original - rev);
};