PostsGridYearSeparator

Not used - because BlogBox.php has its functionality - see AC and PostGrid block (use wp query).
/**
 * PostsGridYearSeparator
 * Separates posts grid by year headers based on data-post-year attribute
 *
 * @class
 */
export class PostsGridYearSeparator {

	/**
	 * Constructor
	 *
	 * @param {string} selector - CSS selector for posts grid container
	 */
	constructor( selector = '.wp-block-query.b-posts-grid' ) {

		this.selector = selector;
		this.yearHeaderClass = 'b-posts-grid__year-header';
		this.yearGroupClass = 'b-posts-grid__year-group';

		// Defer initialization 

PCRE - subroutine vs backreference

<?php

$regex1 = '/(\d+) \1/';     // Backreference
$regex2 = '/(\d+) (?1)/';   // Subroutine

100 100 // ✅ only backreference
100 200 // ✅ both!


// https://github.com/Hamz-a/php-regex-best-practices/blob/master/07%20Writing%20modular%20regexes.md

// named subroutines
$regex = '/(?<number>\d+),(?&number)/';   // Named subroutine

// advanced 
$regex = <<<'regex'
~
(?(DEFINE)
   (?<id>\d+)
   (?<username>user(?&id))
   (?<protocol>https?|ftp)
   (?<domain>example[.]com)
   (?<url>(?&protocol):

Liauid - doc - Example

{%- doc -%}
This snippet is used to render the product grid on collection and search
@param {object) section The section object @param {object) paginate Pagination object
@param {object} products - Array of product objects
@param {string} [title]
-
Header of the collection or search results
@param {string} children List or grid of product cards
{% enddoc -%}

[Tauri] カスタムタイトルバー(縮小・拡大・閉じるボタン)

# CustomTitleBarを実装する方法

## 実装ファイルと概要

### **フロントエンド (React)**

1. **`src/components/CustomTitleBar.tsx`**
   - カスタムタイトルバーのコンポーネント実装(最小化・最大化・閉じるボタンとメニュー)

2. **`src/components/CustomTitleBar.css`**
   - タイトルバーのスタイリング(ボタンのホバー効果、レイアウトなど)

3. **`src/App.tsx`**
   - CustomTitleBarコンポーネントをアプリに配置

### **バックエンド (Tauri)**

4. **`src-tauri/tauri.conf.json`**
   - `"decorations": false` でデフォルトのタイトルバーを非表示化

5. **`src-tauri/capabilities/default.json`**
   - ウィンドウ操作のパーミッション許可(close, mini

DVC

stages:
  data_ingestion:
    cmd: python src/pipelines/data_ingestion_pipeline.py
    deps:
      - src/constants/paths.py
      - src/utils/helpers.py
      - src/entity/components_config_entity.py
      - src/components/data_ingestion.py
      - data/raw
    outs:
      - artifacts/data_ingestion/

  data_validation:
    cmd: python src/pipelines/data_validation_pipeline.py
    deps:
      - src/constants/paths.py
      - src/utils/helpers.py
      - src/utils/handler.py
   

Useful python + pandas snippets


### Supress warnings when displaying numeric columns with NaN or very very big or small values 
```py
import warnings
with warnings.catch_warnings():
    warnings.simplefilter("ignore", RuntimeWarning)
    display(....)
```
### System wide display settigns 
```py
import pandas as pd
pd.set_option("display.max_rows", 5)
```

### Scoped display settings
```py
import pandas as pd
with pd.option_context("display.max_rows", 10):
    display(....)
```

3381. Maximum Subarray Sum With Length Divisible by K

You are given an array of integers nums and an integer k. Return the maximum sum of a subarray of nums, such that the size of the subarray is divisible by k.
/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
var maxSubarraySum = function(nums, k) {
    let n = nums.length;

    // Step 1: Build prefix sums
    let prefix = new Array(n + 1).fill(0);
    for (let i = 0; i < n; i++) {
        prefix[i + 1] = prefix[i] + nums[i];
    }

    // Step 2: Track the minimum prefix sum for each remainder class
    // Initialize with Infinity (we'll minimize later)
    let minPrefix = new Array(k).fill(Infinity);

    // Step 3: Result 

🐍 Typage Structurel

**Typage Structurel** (ou *Structural Typing*) en Python.

Utiliser `isinstance(x, ABC)` revient à poser la question : **"Peu m'importe qui sont tes parents (héritage), est-ce que tu sais faire ce job (comportement) ?"**

C'est la pratique la plus robuste pour valider des entrées sans coupler votre code à des types précis comme `list` ou `dict`.

Voici les 3 "Contrats" les plus courants que vous devez maîtriser en Data Engineering, du plus laxiste au plus strict.

### 1\. Le Contrat "Je veux jus

TRANSFERE

import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
    if arcpy.Describe(lyr).dataType == "FeatureLayer":
        count = arcpy.GetCount_management(lyr)
        print(lyr.name, count[0])

Fresh CC Fullz Bank Logs Paypal Transfer WU Transfer Bug MoneyGram CashApp Zelle Venmo Apple Pay Skrill Transfer ATM Cards.


_______ JEANSON ANCHETA_______

               🌎 

💻💸 Fresh Logs Pricing 💸💻
🔐 UK/US Logs / Clean Bank Drops (GBP/$)
💰 10K GBP/$ = 250
💰 12K GBP/$ = 300
💰 16K GBP/$ = 350
💰 20K GBP/$ = 500
💰 30K GBP/$ = 800

🛡️ Verified • HQ Access • Fast Delivery
💬 DM for escrow or direct 🔥
WESTERN UNION / MONEY GRAM/BANKS LOGINS/BANK TRANFERS/PAYPAL TRANSFERS WORLDWIDE/CASHAPP/ZELLLE/APPLE PAY/SKRILL/VENMO TRANSFER
Telegram:@JeansonTooL       https://t.me/+2__ynBAtFP00M2Fk                 
https://t.me/+CsF2t7

📓 Jupytext

## 1\. Comprendre Jupytext (Le traducteur temps réel)

Le problème fondamental des Notebooks (`.ipynb`), c'est leur format.

  * **Ce que vous voyez :** Du code, du texte et des graphiques.
  * **Ce que l'ordinateur voit :** Un fichier **JSON** énorme et illisible.

Si vous ouvrez un `.ipynb` avec un éditeur de texte, vous verrez ceci :

```json
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "source": [
    "import numpy as np\n"
   ]
  }
 ...
}
```

C'est fragile. Une vir

SYS_VPN

# VPN STUFF

### TAILSCALE
##### INTERFACE METRIC
By default TS interface is set to 5 which might be lower than your main ETH interface, causins some request to be sent to TS.
##### DNS / MAGIC DNS
In TS admin console, check how DNS is handled, by default magic DNS is enabled and can cause some issue (see above ), you can add other domain in the webbase admin console, or disable magicDNS interialy.

🔥 Issue with WSL2 for windows, as the tailscale Interface gets pickup for the netresolv.conf in l

特定のページ以外はトップページへリダイレクト

RewriteEngine On
RewriteCond %{REQUEST_URI} !(^/aaa/bbb/)
RedirectMatch 301 ^/aaa/bbb/ https://aaa/bbb
RewriteRule ^(.*)$ https://www.aaa [R=301,L]

WSL_GeneralTips

# WSL TIPS & TRICKS

## INSTALL
in cmd prompt / powershell as admin:
`wsl --install`
## GPU
-> [guide](https://joelognn.medium.com/installing-wsl2-pytorch-and-cuda-on-windows-11-65a739158d76)
## NETWORK
with tailscale installed my autogenerated config was erronous, no internet access ( DNS resolve issues)
Bit of a bitch at this stage ! doinga  fresh -reinstall

`sudo nano /etc/resolv.conf`\
add / correct the nameserver entry:\
`nameserver 8.8.8.8`

We would also want to stop automatic generation

2435. Paths in Matrix Whose Sum Is Divisible by K

You are given a 0-indexed m x n integer matrix grid and an integer k. You are currently at position (0, 0) and you want to reach position (m - 1, n - 1) moving only down or right. Return the number of paths where the sum of the elements on the path is divisible by k. Since the answer may be very large, return it modulo 109 + 7.
/**
 * @param {number[][]} grid
 * @param {number} k
 * @return {number}
 */
var numberOfPaths = function(grid, k) {
    const MOD = 1e9 + 7; // modulus for large answers
    const m = grid.length;      // number of rows
    const n = grid[0].length;   // number of columns
    
    // Initialize a 3D DP array:
    // dp[i][j][r] = number of ways to reach (i,j) with remainder r
    // Dimensions: m x n x k
    let dp = Array.from({ length: m }, () =>
        Array.from({ length: n }, () =>
      

Streamlit

import streamlit as st
from datetime import datetime
import time

from src.langchain_ext.document_loader import get_openai_api_key
from src.langchain_ext.prompts import get_chat_prompt
from src.langchain_ext.memory import get_memory
from src.langchain_ext.chains import get_chat_chain


# Page configuration
st.set_page_config(
    page_title="AI Chatbot",
    page_icon="🤖",
    layout="wide",
    initial_sidebar_state="expanded"
)

# Custom CSS for better UI
st.markdown("""