# model.py
# TourFusionNet: Multi-Source Data Fusion for Sports Tourism Preference Prediction
# Implements: modality encoders, hierarchical fusion (self & cross attention),
# graph propagation, and Adaptive Preference Integration Strategy (APIS).
# PyTorch >= 1.10 recommended.
from typing import Dict, Optional, List, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
# -----------------------------
# Utility blocks
# ----------------------------
import torch
import torch.nn as nn
import torch.nn.functional as F
# Define the Harmonic Scene Integration Network (HSIN)
class HSIN(nn.Module):
def __init__(self, music_dim, scene_dim, embedding_dim, output_dim):
super(HSIN, self).__init__()
# Define the multi-modal encoder for music and scene data
self.music_encoder = nn.Sequential(
nn.Linear(music_dim, embedding_dim),
nn.ReLU(),
nn.Dropout(0.5)
)
import torch
import torch.nn as nn
import torch.nn.functional as F
# Define the Behavioral Recognition-Driven Quality Assessment Network (BRQAN)
class BRQAN(nn.Module):
def __init__(self, input_dim, feature_dim, output_dim):
super(BRQAN, self).__init__()
# Define the multimodal encoder for feature extraction
self.conv1 = nn.Conv2d(input_dim, 64, kernel_size=3, stride=2, padding=1)
self.conv2 = nn.Conv2d(64, 128, kernel_size=3, stride=2, pa
import torch
import torch.nn as nn
import torch.nn.functional as F
# Define the Cultural Embedding Transmission Network (CETNet)
class CETNet(nn.Module):
def __init__(self, input_dim, hidden_dim, output_dim):
super(CETNet, self).__init__()
# Define layers for encoding the motif and cultural memory
self.encoder = nn.LSTM(input_dim, hidden_dim, batch_first=True)
self.memory_embedding = nn.Linear(hidden_dim, hidden_dim) # Cultural memory upd
# models/structural_attention.py
from __future__ import annotations
from typing import Optional, Tuple
import torch
from torch import nn, Tensor
import torch.nn.functional as F
class StructuralAttentionConv(nn.Module):
r"""
Structural Attention message passing (single head) inspired by the paper's
formulations (attention over neighbors with separate W1/W2 and vector 'a').​:contentReference[oaicite:3]{index=3}
For a directed graph G=(V,E), we compute for edge u->v:
import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiModalAttention(nn.Module):
def __init__(self, input_dims, attention_dims):
super(MultiModalAttention, self).__init__()
self.attention_layers = nn.ModuleList([
nn.Linear(input_dim, attention_dims) for input_dim in input_dims
])
self.attention_weights = nn.Parameter(torch.ones(len(input_dims)))
def forward(self, inputs):
attention_scores
# models/hape.py
from __future__ import annotations
import math
from typing import Optional, Tuple, Dict
import torch
from torch import nn, Tensor
import torch.nn.functional as F
class SinusoidalPositionalEncoding(nn.Module):
"""
Classic transformer-style fixed positional encoding.
Args:
dim: feature dimension
max_len: maximum sequence length supported
"""
def __init__(self, dim: int, max_len: int = 10_000):
super().__init__()
pe = torch.z
DECLARE
v_total_pkg NUMBER := 0;
v_success_pkg NUMBER := 0;
v_error_pkg NUMBER := 0;
v_total_prc NUMBER := 0;
v_success_prc NUMBER := 0;
v_error_prc NUMBER := 0;
v_total_fnc NUMBER := 0;
v_success_fnc NUMBER := 0;
v_error_fnc NUMBER := 0;
v_total_trg NUMBER := 0;
v_success_trg NUMBER := 0;
v_error_trg NUMBER := 0;
BEGIN
-- PACKAGES
FOR pkg IN (SELECT DISTINCT object_name FROM user_objects WHERE object
# shareX audio recording parameters

<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