import * as React from "react";
export default function useDefault(initialValue, defaultValue) {
const [state, setState] = React.useState(initialValue);
if (typeof state === "undefined" || state === null) {
return [defaultValue, setState];
}
return [state, setState];
}
import * as React from "react";
export default function useDocumentTitle(title) {
React.useEffect(() => {
document.title = title;
}, [title]);
}
# Référence des flags de test Bash `[[ ]]`
## Tests sur les fichiers
| **Flag** | **Signification** | **Exemple** |
|----------|------------------|-------------|
| `-f` | Fichier régulier existe | `[[ -f file.txt ]]` |
| `-d` | Directory (dossier) existe | `[[ -d /tmp ]]` |
| `-e` | Existe (tout type) | `[[ -e /path ]]` |
| `-s` | Size > 0 (non vide) | `[[ -s file.txt ]]` |
| `-r` | Readable (lisible) | `[[ -r file.txt ]]` |
| `-w` | Writable (écriture) | `[[ -w file.txt ]]` |
| `-
#!/bin/bash
# package_size_analyzer.sh
# Script pour analyser la taille des packages Python installés
# et identifier lesquels mettre en Lambda Layers
# ========== CONFIGURATION ==========
# Table des mappings bizarres connus
declare -A WEIRD_MAPPINGS=(
["beautifulsoup4"]="bs4"
["pillow"]="PIL"
["pycryptodome"]="Crypto"
["scikit-learn"]="sklearn"
["python-dateutil"]="dateutil"
["msgpack-python"]="msgpack"
["opencv-python"]="cv2"
["mysqlclient"]="
<?php if ( is_active_sidebar( 'logo-right-ad' ) ) : dynamic_sidebar('logo-right-ad'); else: endif ?>
# ========== AUTO-SETUP CLOUDSHELL ==========
# Configuration PATH
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
# Installation UV si absent
if [[ ! -f "$HOME/.cargo/bin/uv" ]]; then
echo "⚙️ Installation UV..."
curl -LsSf https://astral.sh/uv/install.sh | sh 2>/dev/null
echo "✅ UUV installé"
# Tầm Quan Trọng Của Cách Bố Trí Phòng Thư Viện Trường Học
Thư viện trong trường học là không gian nuôi dưỡng thói quen đọc, phát triển tư duy, hỗ trợ tài liệu học tập cho học sinh. Tuy nhiên, để phát huy hết vai trò này, việc nghiên cứu **cách bố trí phòng thư viện trường học** trở thành yếu tố quan trọng. Một thư viện được thiết kế hợp lý giúp học sinh cảm thấy hứng thú, đồng thời nâng cao hiệu quả giáo dục.
|cert-file("/etc/syslog-ng/ssl/mbll-cert.pem")|' /etc/syslog-ng/syslog-ng.conf
/**
* @param {number} n
* @param {number[][]} languages
* @param {number[][]} friendships
* @return {number}
*/
var minimumTeachings = function(n, languages, friendships) {
// 1) Convert each user's language list to a Set for 0(1) checks.
// We'll store with 1-based alignment: user i => index i (ignore index 0).
const userLangs = Array(languages.length + 1);
for (let i = 0; i < languages.length; i++) {
userLangs[i + 1] = new Set(languages[i]); // users are 1-based
/// <summary>
/// Custom JSON converter that handles deserialization of a property that can be either:
/// - A single JsonObject
/// - An array of JsonObjects
/// Always returns a List<JsonObject> for consistent handling.
/// </summary>
public class FlexibleJsonObjectListConverter : JsonConverter<List<JsonObject>?>
{
public override List<JsonObject>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.Nu
SELECT
comps.type_name,
comps.name
FROM apex_210200.wwv_flow_appl_export_comps comps
LEFT JOIN (
SELECT type_name, id
FROM apex_210200.wwv_multi_component_export
WHERE flow_id = 115
) sel
ON comps.type_name = sel.type_name
AND comps.id = sel.id
WHERE comps.application_id = 115;
SELECT
comps.type_name,
comps.name
FROM apex_210200.wwv_flow_appl_export_comps comps
LEFT JOIN (
SELECT type_name
"""
train.py
---------
Entry point for training a classification (or simple segmentation) model.
The script demonstrates a minimal yet robust PyTorch training loop with:
- CLI args & YAML config
- Reproducible seeds
- AMP mixed precision
- Gradient clipping
- Checkpointing (best/last)
- Simple CSV logging
This file is intentionally ~100+ lines with rich comments for readability.
"""
import argparse, os, time, yaml, csv
from typing import Dict, Any
import torch
from torch import
```python
"""
model.py
Neural architectures for token-level sequence labeling (NER).
This file defines a simple Transformer-based token classification model
with an optional CRF head interface (stubbed) to keep the scaffold concise.
Design goals:
- Minimal dependencies (Transformers + Torch)
- Clear separation of encoder and classification head
- Strong typing and docstrings for readability
"""
from __future__ import annotations
import math
from dataclasses import dataclass
fro
```python
# model.py
# A simple BiLSTM sequence tagger with optional CRF placeholder.
# Heavy comments to guide extension.
from __future__ import annotations
import math
from typing import List, Tuple, Dict, Optional
import torch
import torch.nn as nn
class SequenceTagger(nn.Module):
"""
A minimal BiLSTM tagger:
- token embeddings
- BiLSTM
- linear projection to tag space
Extension hooks:
- Replace LSTM with TransformerEncoder
- Add CRF on