<form id="purchase-form">
<label>
個数(最大2個まで):
<input type="number" id="quantity" name="quantity" min="1" max="2" required />
</label>
<button type="submit">購入</button>
</form>
<script>
document.getElementById("purchase-form").addEventListener("submit", async (e) => {
e.preventDefault();
const quantity = parseInt(document.getElementById("quantity").value, 10);
// フロント側バリデーション
if (quantity > 2) {
alert("2個までしか購入できません");
return;
}
// APIに送信
Abrir PHP Artisan Tinker
```php
php artisan tinker
```
```
use App\Models\User;
User::create([
'name' => 'test',
'email' => 'test@testuser.com',
'password' => bcrypt('0QcrNCKSQ7uuay2@'),
]);
```
## Exemple d'URL à requêter
https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2025-01.parquet
## Paramètres de `__init__`
BASE_URL = 'https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata'
YEAR = '2025'
DATA_DIR = 🚧 Définir avec path relatif par rapport à la racine du projet
🚧 Il faut éventuellement générer le folder data (dans le `__init__` ou dans un
autre script?)
/**
* @param {number[]} nums
* @return {number}
*/
var maxIncreasingSubarrays = function (nums) {
let maxK = 0; // Stores the maximum valid k found so far
let curLen = 1; // Length of the current strictly increasing run
let prevLen = 0; // Length of the previous strictly increasing run
for (let i = 1; i < nums.length; i++) {
if (nums[i] > nums[i - 1]) {
// Continue the current increasing run
curLen++;
} else {
/
import pandas as pd
from datetime import datetime, timedelta
import yfinance as yf
# Define the end date
end = str(pd.Timestamp.today().strftime('%Y-%m-%d'))
# Calculate the start date (20 years before the end date)
no_years = 20
start = (datetime.strptime(end, '%Y-%m-%d') - timedelta(days=no_years*365)).strftime('%Y-%m-%d')
# Generate the date range
date_range = pd.date_range(start, end, freq='D')
print(date_range, '\n\n')
tickers = ['SPY', 'MDY']
data = yf.download(ticker
Если задача с типом **decomp**

- нужно создать новую задачу на разработку, где производится описание задачи.
- задачу нужно оценить самому и отдать на оценку QA переведя в статус Requirements Review (RR).
QA уже дальше переведет в ready to develop
### Линковки
- Задачу по декомпозиции линкуем children задача для разработки
- Задачу по разработке линкуем с задачей по декомпозу parent
- Задачу
# Setting Up Pre-commit Hooks with UV
Pre-commit hooks automatically check your code before each commit, catching issues early and enforcing consistent code quality.
## Installation
Add pre-commit as a development dependency:
```bash
uv add --dev pre-commit
```
## Configuration
Create `.pre-commit-config.yaml` in your project root:
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
# 查看远程仓库
git remote -v
# 断联
git remote remove origin
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io.shapereader import Reader
sys.path.insert(0, "/data8/xuyf/Project/shouxian")
from configs import MAP_DIR
sheng = Reader(os.path.join(MAP_DIR, 'sheng.shp'))
BDY_DIR = "/data8/xuyf/Data/Static/boundary/GS(2024)0650-SHP"
sheng = Reader(os.path.join(BDY_DIR, 'sheng.shp'))
fig = plt.figure(figsize=(12, 8), dpi=300)
ax = fig.subplots(1, 1, subplot_kw={'projection': ccrs.PlateCarree()})
ax.add_feature(cfeatu
function Mount-RegistryHive {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
$KeyName
,
[Parameter(Mandatory = $true, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
$FileName
)
begin {
Add-Type -Name LoadHive -NameSpace RegistryHelper -MemberDefinition @"
[DllImport("advapi32.dll", SetLast
/**
* @param {number[]} nums
* @param {number} k
* @return {boolean}
*/
var hasIncreasingSubarrays = function(nums, k) {
// Helper function to check if a subarray is strictly increasing
function isStrictlyIncreasing(start, end) {
for (let i = start; i < end; i++) {
if (nums[i] >= nums[i + 1]) {
return false; // Not strictly increasing
}
}
return true;
}
// Total length needed for two adjacent subarrays of length
<div class="pp-stats-countup" data-id="pp-{{Matrix.MatrixId}}">
<div class="section-copy">{{Module.FieldValues.SectionCopy}}</div>
<ul class="stats-countup-list" data-layout="{{Module.FieldValues.Layout | default: 'quarter'}}">
{% for item in List.Items %}
{% assign el = item.FieldValues %}
<li
class="single-stat"
data-start-value="{{el.StartingValue}}"
data-value="{{el.Value}}"
>
<h3>
```python
# model.py
# SFAN + CMEFS unified model for semantic music culture modeling
# Based on Feng Liu (2025)​:contentReference[oaicite:11]{index=11}​:contentReference[oaicite:12]{index=12}
import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiHeadAttention(nn.Module):
"""Multi-head self-attention for multimodal fusion."""
def __init__(self, dim, heads=4):
super().__init__()
self.qkv = nn.Linear(dim, dim * 3)
```python
# model.py
# GEMFEN + AKIS for Intelligent Rural Evaluation System
# Based on Zhu et al. (2025)​:contentReference[oaicite:11]{index=11}
import torch
import torch.nn as nn
import torch.nn.functional as F
class GraphConvLayer(nn.Module):
"""Basic GNN layer (Eq. 1 & 4)."""
def __init__(self, in_dim, out_dim):
super().__init__()
self.linear = nn.Linear(in_dim, out_dim)
def forward(self, x, adj):
h = torch.matmul(adj, x)
```python
# model.py
# Implementation of EVCAN + AVPAM for Art Style Recognition
# Based on equations and architecture in Shi & He (2025) :contentReference[oaicite:9]{index=9}
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
class MultiScaleConv(nn.Module):
"""Multi-scale feature extraction (Eq. 7–10)."""
def __init__(self, in_ch, out_ch, scales=(3,5,7)):
super().__init__()
self.branches = nn.ModuleList([
nn.Conv2
```python
# model.py
# TSLM + AKIS (minimal PyTorch implementation)
# References to equations and sections follow the uploaded paper. :contentReference[oaicite:10]{index=10}
from typing import Optional, Tuple
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class SinusoidalPositionalEncoding(nn.Module):
"""
Classic sinusoidal positional encodings (paper Eq. (9)-(10)). :contentReference[oaicite:11]{index=11}
"""
def __init__(self, d