3577. Count the Number of Computer Unlocking Permutations

You are given an array complexity of length n. There are n locked computers in a room with labels from 0 to n - 1, each with its own unique password. The password of the computer i has a complexity complexity[i]. The password for the computer labeled 0 is already decrypted and serves as the root. All other computers must be unlocked using it or another previously unlocked computer, following this information: You can decrypt the password for the computer i using the password for computer j, where j is any integer less than i with a lower complexity. (i.e. j < i and complexity[j] < complexity[i]) To decrypt the password for computer i, you must have already unlocked a computer j such that j < i and complexity[j] < complexity[i]. Find the number of permutations of [0, 1, 2, ..., (n - 1)] that represent a valid order in which the computers can be unlocked, starting from computer 0 as the only initially unlocked one. Since the answer may be large, return it modulo 109 + 7. Note that the password for the computer with label 0 is decrypted, and not the computer with the first position in the permutation.
/**
 * @param {number[]} complexity
 * @return {number}
 */
var countPermutations = function(complexity) {
    const n = complexity.length;
    const MOD = 1_000_000_007; // Large prime modulus for preventing overflow

    // Check validity: all elements after the first must be strictly greater
    for (let i = 1; i < n; i++) {
        if (complexity[i] <= complexity[0]) {
            return 0; // Invalid case
        }
    }

    // Compute factorial of (n-1) modulo MOD
    let result = 1;
    

OpenWRT in VirtualBox

- Download a stable release of the openwrt-x86-64-combined-ext4.img.gz image from targets/x86/64/ folder e.g. [https://archive.openwrt.org/releases/24.10.4/targets/x86/64/openwrt-24.10.4-x86-64-generic-ext4-combined.img.gz]()
- Uncompress the gziped img file. On Linux use the command `gzip -d openwrt-*.img.gz`. As a result you should get the raw `openwrt-x86-64-combined-ext4.img` image file.
- Convert it to native VBox format: `VBoxManage convertfromraw --format VDI openwrt-*.img openwrt.vdi`. T

ai docs

### Create TanStack Start Project with shadcn/ui

Source: https://ui.shadcn.com/docs/installation/tanstack

Initialize a new TanStack Start project with Tailwind CSS and shadcn/ui add-ons pre-configured. This command sets up the project structure and installs necessary dependencies in one command.

```bash
npm create @tanstack/start@latest --tailwind --add-ons shadcn
```

--------------------------------

### Install All shadcn/ui Components

Source: https://ui.shadcn.com/docs/installation/tanst

menu-layout.html

<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8" />
  <title>Nutrition Menu Demo</title>
  <style>
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      padding: 40px 16px;
      background: #fff7fb;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    }

    .nutrition-card {
      wi

LSTM Model Prediction

def generate_forecast_features(start_date: str, end_date: str) -> pd.DataFrame:
    """
    Generate a feature-engineered datetime DataFrame for model prediction.
    
    Parameters
    ----------
    start_date : str  
        Start date in 'YYYY-MM-DD' format.
    end_date : str  
        End date in 'YYYY-MM-DD' format.

    Returns
    -------
    pd.DataFrame  
        DataFrame indexed by datetime with all required time & cyclic features.
    """

    # Convert input date

3583. Count Special Triplets

You are given an integer array nums. A special triplet is defined as a triplet of indices (i, j, k) such that: 0 <= i < j < k < n, where n = nums.length nums[i] == nums[j] * 2 nums[k] == nums[j] * 2 Return the total number of special triplets in the array. Since the answer may be large, return it modulo 109 + 7.
/**
 * @param {number[]} nums
 * @return {number}
 */
var specialTriplets = function(nums) {
    const MOD = 1e9 + 7; // modulus to avoid overflow
    const n = nums.length;
    
    // Frequency maps
    let leftCount = new Map();   // counts of numbers before j
    let rightCount = new Map();  // counts of numbers after j
    
    // Initialize rightCount with all numbers
    for (let num of nums) {
        rightCount.set(num, (rightCount.get(num) || 0) + 1);
    }
    
    let result = 0;
   

orchestrator.py

from typing import Optional

from core.agents.architect import Architect
from core.agents.base import BaseAgent
from core.agents.bug_hunter import BugHunter
from core.agents.code_monkey import CodeMonkey
from core.agents.code_reviewer import CodeReviewer
from core.agents.developer import Developer
from core.agents.error_handler import ErrorHandler
from core.agents.executor import Executor
from core.agents.external_docs import ExternalDocumentation
from core.agents.human_input import HumanInput
f

Shopify discounts + refunds behavior

Issue:
> We are seeing incorrect refund amounts on imported historical orders that include discounts. Because discount amount is distributed between all items, refunding a full-price item can cause part of the original discount to be removed. A common scenario is an order containing a full-price item and a gift item discounted by 100%. When the full-price item is refunded, the system recalculates the discount distribution and the refund/discount amounts become inaccurate.

Reason:
> Shopify will

Blog Search + Filter

Matrix PP that acts in place of the blog main. Lists the posts and also includes a tag dropdown and input text search. | eg https://connerprairie2025.speakcreative.com/blog
{% assign base_classname = 'post-feed' %}
{% assign blogPage = SitePage %}
{% assign posts = Module.FieldValues.BlogSource.Entries %}
{% assign terms = posts[0].SiteTags %}
{% for entry in posts offset:1 %}
  {% assign terms = terms | Concat: entry.SiteTags | Uniq | OrderBy: 'Name', 'asc' %}
{% endfor %}
{% assign postsPerPage = Module.FieldValues.PostsPerPage | Default: 12 %}
{% if PageURLPath contains 'page' %}
  {% assign currentPage = PageURLPath | Split: '/' | Last | Round %}
{% e

agent-components

'use client'

import { LucideIcon } from 'lucide-react'

interface AgentCardProps {
  agent: {
    id: string
    name: string
    description: string
    icon: LucideIcon
    color: string
  }
  isSelected: boolean
  onClick: () => void
}

export default function AgentCard({ agent, isSelected, onClick }: AgentCardProps) {
  const Icon = agent.icon

  return (
    <div
      onClick={onClick}
      className={`
        agent-card-hover
        cursor-pointer
        bg-white dark:bg-gray-800
   

mastera-agents-nextjs-app

import { Agent } from '@mastra/core/agent'
import { nim, DEFAULT_MODEL } from '../nim-client'

export const projectManagerAgent = new Agent({
  name: 'Project Manager',
  instructions: `You are an expert Project Manager AI specializing in software development projects.

Your responsibilities include:
- Breaking down project requirements into actionable tasks
- Creating project timelines and milestones
- Coordinating between different specialized agents (Research, Design, Frontend, Backend, QA)
-

Extend WP login session

Saved from https://kb.hosting.com/docs/extending-login-session-on-wordpress-site
add_filter( 'auth_cookie_expiration', 'extend_login_session' );

function extend_login_session( $expire ) {

  return 31556926; // seconds for 1 year time period

}

git導入

gitインストール
ローカルとgithubを接続(名前とアドレスを登録)

翻墙vpn vps 搭建

# 开启 tcp bbr,https://github.com/iMeiji/shadowsocks_install/wiki/%E5%BC%80%E5%90%AF-TCP-BBR-%E6%8B%A5%E5%A1%9E%E6%8E%A7%E5%88%B6%E7%AE%97%E6%B3%95
# 开机后 uname -r 看看是不是内核 >= 4.9。
# 执行 lsmod | grep bbr,如果结果中没有 tcp_bbr 的话就先执行:
sudo modprobe tcp_bbr
echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf

# 然后执行
echo "net.core.default_qdisc=fq" | sudo tee --append /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee --append /etc/sysctl.conf
# 保存生效
sudo sysctl -p

# 执行
s

termine generieren v2

# ------------------------------------------------------------
# Automatischer Paketimport & -Installation
# ------------------------------------------------------------
import sys
import subprocess
import importlib
import importlib.util

def ensure_package(pkg_name, import_name=None):
    """
    Stellt sicher, dass ein Paket installiert und importierbar ist.
    Falls nicht installiert, wird es automatisch via pip installiert.
    """
    name_to_check = import_name or pkg_name
 

README.MD

  # 👋 Hi, I'm [Susant Kumar Sahoo]

<div align="center">
  
  [![Typing SVG](https://readme-typing-svg.demolab.com?font=Fira+Code&weight=600&size=28&pause=1000&color=2E9EF7&center=true&vCenter=true&width=600&lines=Data+Scientist;Machine+Learning+Engineer;AI+Enthusiast;Problem+Solver)](https://git.io/typing-svg)
  
</div>

## 🚀 About Me

I'm a passionate Data Scientist with expertise in building end-to-end machine learning solutions. I love turning data into actionable insights and creating intel