WooCommerce > Set shipping to $0 if 'shipping class' items of "{shipping class}" are > $50

/**
 * PART 1: Split cart into separate shipping packages by class.
 * Each package shows as its own labeled shipping line at checkout.
 * 
 * Update the 3 slugs below to match your exact WooCommerce shipping class slugs
 * (WooCommerce > Settings > Shipping > Shipping Classes — use the "Slug" column).
 */
add_filter( 'woocommerce_cart_shipping_packages', 'split_cart_by_shipping_class' );
function split_cart_by_shipping_class( $packages ) {

    $cart = WC()->cart->get_cart();
    if 

webアプリケーション要件定義雛形

# `<システム名>` 要件定義書

| 項目 | 内容 |
|------|------|
| プロジェクト名 | `<記入>` |

## 用語集

> 記入ガイド: 本書中で使用する固有名詞・略語・業界用語を定義する。読み手が前提知識なしで読めることを目標とする。

| 用語 | 定義 |
|------|------|
| SPA | Single Page Application。初回ロード後はクライアントサイドで画面遷移を行う Web アプリケーション方式。 |
| SLA | Service Level Agreement。提供するサービス品質の合意指標(稼働率、応答時間 等)。 |

---

# 第1章 はじめに

## 1. 背景

> 記入ガイド: なぜ本システムが必要になったのかを記述する。現状の課題、ビジネス上の要求、外部環境の変化(法改正、技術革新、競合動向 等)を含める。
>
> 例: 当社では従来、経費精算を Excel テンプレートと紙の領収書による申請で運用してきた。リモートワークの定着により紙の物理回付が困難となり、申請者・承認者・経理部門のいずれ

botによる大量アクセス対策(インフラ)

# ボットによる大量アクセスに対するコスト調整の原則

## 1. レート制限(Rate Limiting)

### 1.1 制限単位

| 単位 | 説明 |
|------|------|
| IPアドレス | 送信元IPごとにリクエスト数を制限する |
| APIキー | 発行したキーごとにリクエスト数を制限する |
| ユーザーID | 認証済みユーザーごとにリクエスト数を制限する |
| セッション | セッションIDごとにリクエスト数を制限する |

### 1.2 アルゴリズム

| アルゴリズム | 動作 |
|--------------|------|
| Token Bucket | トークンを一定速度で補充し、リクエストごとにトークンを消費する。バースト許容。 |
| Leaky Bucket | リクエストをキューに格納し、一定速度で処理する。出力レートが一定。 |
| Fixed Window | 固定時間枠(例:1分間)内でリクエスト数をカウントする。境界でリセット。 |
| Sliding Window | 移動する時間枠内でリクエスト数をカウントする

Deep Learning-Driven Abnormal Vital Sign Monitoring in Critical Care

# Deep Learning-Driven Abnormal Vital Sign Monitoring in Critical Care Official repository for the paper: **Exploration of deep learning-driven methods for monitoring abnormal vital signs in critical care** This repository contains the implementation of a deep learning framework for real-time abnormal vital-sign monitoring in ICU settings. The proposed method combines temporal-spectral representation learning with context-aware decision-making to improve reliability, adaptability, and interpretability in critical care monitoring. The framework is composed of two main modules: **ViSpecFormer** and **ClinConDec**. --- ## Overview Real-time detection of abnormal vital signs is essential in critical care. Traditional threshold-based monitoring systems often ignore temporal dependencies and interactions among physiological variables, which can reduce performance in complex ICU environments. This project addresses that limitation with a deep learning framework designed for multivariate physiological time series and patient-specific clinical context. The framework follows a two-stage design: 1. **ViSpecFormer** Learns latent representations from multivariate vital-sign sequences using: - input embedding - spectral transformation - temporal self-attention - context-aware fusion 2. **ClinConDec** Refines abnormality predictions through: - dynamic thresholding - temporal smoothing - cross-feature consistency adjustment - rule-guided interpretation - optional memory-based evidence retrieval This separation makes the system easier to interpret and better suited to ICU abnormality monitoring. --- ## Key Features - Temporal-spectral modeling for multivariate vital-sign data - Context-aware abnormality detection instead of fixed-threshold rules - Improved robustness under heterogeneous clinical conditions and sparse observations - Interpretable decision refinement for ICU monitoring - Designed for near-real-time inference on modern hardware --- ## Method Summary ### ViSpecFormer ViSpecFormer is the signal representation module. It converts multivariate physiological observations into latent representations that preserve both temporal dependencies and frequency-related patterns. It uses discrete cosine transform based spectral filtering to capture low-frequency trends and high-frequency fluctuations, followed by temporal self-attention to model long-range dependencies. Context-aware fusion then combines physiological evidence with clinical context. ### ClinConDec ClinConDec is the decision module. Instead of using a fixed global threshold, it computes a patient-specific, context-dependent decision boundary. It further stabilizes predictions through temporal smoothing and can improve interpretability through rule-guided alignment and memory-based retrieval of similar cases. --- ## Data This study is based on public ICU databases: - **MIMIC-IV v2.2** - **eICU Collaborative Research Database** The experiments use task-specific cohorts derived from these sources after preprocessing, harmonization, eligibility screening, and window-level label generation. The datasets were processed and evaluated independently rather than merged into a joint training set. ### Variables Used Common physiological variables include: - heart rate - respiratory rate - oxygen saturation - blood pressure - temperature Selected contextual clinical variables are also incorporated when available. ### Data Access The raw patient-level data cannot be redistributed directly. Access to MIMIC-IV and eICU-CRD requires credentialed approval through the official providers. --- ## Preprocessing The preprocessing pipeline includes: - temporal alignment - resampling - normalization - missing-value handling - sliding-window generation - window-level label assignment Observation windows are 60 seconds with a stride of 10 seconds, and labels are assigned based on whether a predefined abnormal event occurs within a future prediction horizon. --- ## Experimental Setup - Framework implemented in **PyTorch 2.1** - Training hardware includes **NVIDIA A100 (80GB)** - Mixed-precision training used for efficiency - Five-fold stratified cross-validation - Early stopping based on validation AUC - Repeated experiments with different random seeds ### Default Model Configuration - Embedding dimension: `128` - Hidden dimension: `128` - Attention heads: `8` - Dropout: `0.1` - Temporal smoothing kernel: `K = 2` --- ## Results According to the manuscript, the proposed framework consistently outperforms baseline models such as LSTM, GRU, TCN, GRU-D, InceptionTime, and PatchTST across multiple ICU cohorts and benchmark subsets, especially in AUC and F1 Score. The reported computational profile suggests that the model is compatible with near-real-time ICU monitoring on modern server-class hardware. ## Repository Structure ├── configs/ # Configuration files ├── data/ # Data processing scripts or dataset instructions ├── datasets/ # Dataset loaders ├── models/ # ViSpecFormer, ClinConDec, and related modules ├── trainers/ # Training and evaluation logic ├── utils/ # Utility functions ├── scripts/ # Train/test/preprocess scripts ├── notebooks/ # Optional analysis notebooks ├── checkpoints/ # Saved model weights └── README.md Quick Start 1. Preprocess data python scripts/preprocess.py --config configs/preprocess.yaml 2. Train the model python scripts/train.py --config configs/train.yaml 3. Evaluate the model python scripts/evaluate.py --config configs/eval.yaml 4. Run inference python scripts/infer.py --input path/to/sample.csv --checkpoint checkpoints/best_model.pt Update the commands above to match your actual project structure. Citation If you use this repository in your research, please cite: @article{song2025abnormalvitals, title={Exploration of deep learning-driven methods for monitoring abnormal vital signs in critical care}, author={Song, Bingbing and Li, Qunfeng and Chen, Hong}, journal={PeerJ}, year={2025} } Please replace this BibTeX entry with the final published citation information. Reproducibility To support reproducibility, this project is intended to provide: cohort construction protocol preprocessing scripts variable mapping tables label generation rules split-generation procedure training configuration These materials should allow credentialed users to reproduce the experimental pipeline after obtaining access to the original controlled databases. Limitations Although the method shows promising performance, the manuscript notes that further work is needed on: deployment efficiency in resource-constrained environments generalization across institutions prospective validation in real clinical workflows integration with hospital systems License This project is released under the MIT License unless otherwise specified. Acknowledgments We acknowledge the public resources that made this work possible, including MIMIC-IV and eICU-CRD.
import math
from dataclasses import dataclass
from typing import Callable, Dict, Optional, Tuple

import torch
import torch.nn as nn
import torch.nn.functional as F


# =========================================================
# Configuration
# =========================================================

@dataclass
class ModelConfig:
    input_dim: int
    context_dim: int
    latent_dim: int = 128   # dz
    hidden_dim: int = 128   # dh
    num_heads: int = 8
    dropout: floa

1320. Minimum Distance to Type a Word Using Two Fingers

You have a keyboard layout as shown above in the X-Y plane, where each English uppercase letter is located at some coordinate. For example, the letter 'A' is located at coordinate (0, 0), the letter 'B' is located at coordinate (0, 1), the letter 'P' is located at coordinate (2, 3) and the letter 'Z' is located at coordinate (4, 1). Given the string word, return the minimum total distance to type such string using only two fingers. The distance between coordinates (x1, y1) and (x2, y2) is |x1 - x2| + |y1 - y2|. Note that the initial positions of your two fingers are considered free so do not count towards your total distance, also your two fingers do not have to start at the first letter or the first two letters.
/**
 * @param {string} word
 * @return {number}
 */
var minimumDistance = function(word) {
    // Keyboard coordinates for A–Z
    const pos = {};
    const layout = [
        "ABCDEF",
        "GHIJKL",
        "MNOPQR",
        "STUVWX",
        "YZ"
    ];
    
    for (let r = 0; r < layout.length; r++) {
        for (let c = 0; c < layout[r].length; c++) {
            pos[layout[r][c]] = [r, c];
        }
    }

    const dist = (a, b) => {
        const [x1, y1] = pos[a];
        const [x2

unicorn - серврер

uvicorn название раздела:app --port 8001 - запуск

venv -virtual environment (виртуальное окружение Python)

python3 -m venv venv - создать venv
source venv/bin/activate - активировать
which python - проверить
deactivate - выйти из venv

prompts

[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

mcp config for lm studio

{
  "mcpServers": {
    "firecrawl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "firecrawl-mcp"
      ],
      "env": {
        "FIRECRAWL_API_KEY": "fc-0b4d8657290a4ffdacee91bb1614089d"
      }
    },
    "exa": {
      "command": "npx",
      "args": [
        "-y",
        "exa-mcp-server"
      ],
      "env": {
        "EXA_API_KEY": "e030e9c4-3bbb-47d1-ae23-7f12dce7ed2a"
      }
    },
    "mem0-mcp": {
      "url": "https://mcp.mem0.ai/mcp"
    }
  }
}

3741. Minimum Distance Between Three Equal Elements II

You are given an integer array nums. A tuple (i, j, k) of 3 distinct indices is good if nums[i] == nums[j] == nums[k]. The distance of a good tuple is abs(i - j) + abs(j - k) + abs(k - i), where abs(x) denotes the absolute value of x. Return an integer denoting the minimum possible distance of a good tuple. If no good tuples exist, return -1.
/**
 * @param {number[]} nums
 * @return {number}
 */
var minimumDistance = function(nums) {
    const lastTwo = new Map(); // value -> [prevPrev, prev]
    let ans = Infinity;

    for (let i = 0; i < nums.length; i++) {
        const v = nums[i];

        if (!lastTwo.has(v)) {
            lastTwo.set(v, [i]); // first occurrence
            continue;
        }

        const arr = lastTwo.get(v);

        if (arr.length === 1) {
            // second occurrence
            arr.push(i);
      

claudtet-code-repoduces

Level Up Coding
You're reading for free via Fareed Khan's Friend Link. Become a member to access the best of Medium.

Member-only story



Building Claude Code with Harness Engineering
Multi-agents, MCP, skills system, context pipelines and more
Fareed Khan
Fareed Khan

Follow
78 min read
·
4 days ago
933


6



Read this story for free: link

As of early 2026, Claude Code crossed $1 billion in annualized revenue within six months of launch. It did not get there because of better prompts. It got

claudtet-code-repoduces

Level Up Coding
You're reading for free via Fareed Khan's Friend Link. Become a member to access the best of Medium.

Member-only story



Building Claude Code with Harness Engineering
Multi-agents, MCP, skills system, context pipelines and more
Fareed Khan
Fareed Khan

Follow
78 min read
·
4 days ago
933


6



Read this story for free: link

As of early 2026, Claude Code crossed $1 billion in annualized revenue within six months of launch. It did not get there because of better prompts. It got

AWS Trusted Advisor - Exposed IAM Access Keys

AWSTemplateFormatVersion: 2010-09-09
Description: Trusted Advisor - Exposed Access Key Detection & Alerting

Parameters:
  Organization:
    Description: Organization name being deployed to
    Type: String
    MinLength: 1

  NotificationHTTPS:
    Description: HTTPS (PagerDuty) Endpoint for SNS Topic Subscription
    Type: String
    MinLength: 1

Resources:

  ########################
  ## SNS TOPIC
  ########################

  SNSTopicAlerts:
    Type: AWS::SNS::Topic
    Properties:
      

3740. Minimum Distance Between Three Equal Elements I

You are given an integer array nums. A tuple (i, j, k) of 3 distinct indices is good if nums[i] == nums[j] == nums[k]. The distance of a good tuple is abs(i - j) + abs(j - k) + abs(k - i), where abs(x) denotes the absolute value of x. Return an integer denoting the minimum possible distance of a good tuple. If no good tuples exist, return -1.
/**
 * @param {number[]} nums
 * @return {number}
 */
var minimumDistance = function(nums) {
    const pos = new Map();

    // Collect positions for each value
    for (let i = 0; i < nums.length; i++) {
        if (!pos.has(nums[i])) pos.set(nums[i], []);
        pos.get(nums[i]).push(i);
    }

    let ans = Infinity;

    // For each value, check triples of consecutive indices
    for (const [val, arr] of pos.entries()) {
        if (arr.length < 3) continue;

        for (let i = 0; i + 2 <

CSS Anchor Nav Slider Effect

<nav>
  <a href="#">Home</a>
  <a href="#">About</a>
  <a href="#">Articles</a>
  <a href="#">Contact</a>
</nav>

CSSだけでmasonryをやる(grid-lane)

<div class="container">
  <img class="item" src="https://assets.codepen.io/221808/masonry_photo1.jpg" width="500" alt="" />
  <img class="item" src="https://assets.codepen.io/221808/masonry_photo2.jpg" width="500" alt="" />
  <img class="item" src="https://assets.codepen.io/221808/masonry_photo3.jpg" width="500" alt="" />
  <img class="item" src="https://assets.codepen.io/221808/masonry_photo4.jpg" width="500" alt="" />
  <img class="item" src="https://assets.codepen.io/221808/masonry_photo5.jpg