Integration

# How to Enable or Disable Peer to Peer Connection in Viva Terminal App

## Overview

This guide will help you turn on or off the Peer to Peer connection feature in your Viva Terminal app. The Peer to Peer protocol (also known as 'Local Terminal API') allows Twine POS system to communicate with your card terminal device over the same network.

---

## Requirements

- Viva Terminal app installed on your Android device
- Access to the app's settings menu
- Both your terminal and ECR system must be

script create wp with database

### Eliminar un dominio

Eliminar el enlace de activación
```
sudo rm /etc/nginx/sites-enabled/dominio.com
```

Eliminar el archivo de configuración:
```
sudo rm /etc/nginx/sites-available/dominio.com
```

Aplicar cambios y reiniciar Nginx
```
sudo nginx -t
sudo systemctl restart nginx
```

Borrar la Carpeta de Archivos
```
sudo rm -rf /var/www/dominio.com
```

```
./wp_setup.sh midominio.com ClaveFuerteYSegura!1
```

LinkedIn

1. HR & Talent Acquisition (IT-focused)
HR Manager IT

Technical Recruiter

IT Recruiter

Talent Acquisition Specialist IT

HR Business Partner Technology

People Operations IT

Campus Recruiter IT

HR Generalist IT

2. IT Domain (General)
IT Specialist

IT Consultant

IT Project Manager

IT Support Engineer

IT Infrastructure Manager

Systems Administrator

Cloud Engineer

IT Operations Lead

3. Machine Learning / Deep Learning
Machine Learning Engineer

Deep Learning Engineer

AI Research Scie

1262. Greatest Sum Divisible by Three

Given an integer array nums, return the maximum possible sum of elements of the array such that it is divisible by three.
/**
 * @param {number[]} nums
 * @return {number}
 */
var maxSumDivThree = function(nums) {
    // Step 1: Calculate the total sum of the array
    let totalSum = nums.reduce((acc, num) => acc + num, 0);

    // Step 2: If already divisible by 3, return it
    if (totalSum % 3 === 0) return totalSum;

    // Step 3: Separate numbers by their remainder when divided by 3
    let remainder1 = []; // numbers where num % 3 === 1
    let remainder2 = []; // numbers where num % 3 === 2

    for (let nu

Langgraph_Note

# LangGraph Complete Study Notes

## 1. Core Concepts

### What is LangGraph?
- **Stateful graph framework** for building complex LLM workflows
- **Cyclic graphs** - supports loops and conditional flows
- **Built on LangChain** - integrates seamlessly with LCEL
- **Persistence** - save and resume workflows at any point

### Graph Types
- **StateGraph** - Main graph with typed state (most common)
- **MessageGraph** - Specialized for chat messages
- **WorkflowGraph** - Simple workflow

Langchain_Notes

# LangChain
llms_chat_model, prompts,output_parsers, memory, chains, messages.py", rag_retrievers,
embedding, retrievers, runnables, callbacks, text_splitter, tools_toolkits, document_loader,
streaming.py", mcp_client,
        
# LangGraph

state, nodes, edges, checkpointer", persistence", workflows


# Langchain all important technique names

# LangChain Essential Techniques Reference

## 1. Prompts (Core Techniques)

### Must-Know
- **ChatPromptTemplate** - Primary template fo

prompt

# Notes

- Combine chat history and notes into a single markdown file.
- Note: Do not include unnecessary objects.
- Revise the notes file for a short, clear read.
- Correct only the prompt wording.

ovpn profile on Ubuntu

## List client

ls /etc/openvpn/easy-rsa/pki/issued/

## Delete client

su

cd /etc/openvpn/easy-rsa/

./easyrsa revoke client_to_delete

./easyrsa gen-crl

cp /etc/openvpn/easy-rsa/pki/crl.pem /etc/openvpn/

chmod 644 /etc/openvpn/crl.pem

systemctl restart openvpn

openssl crl -in /etc/openvpn/crl.pem -noout -text | grep -A1 "Revoked Certificates"

## Add client

./ubuntu-22.04-lts-vpn-server.sh

## Check certif expired 

openssl x509 -in /etc/openvpn/easy-rsa/pki/issued/server_*.crt -text -no

C1 U9

E STUDY THE RULES AND PUT THE DIRECT SPEECH INTO REPORTED SPEECH STARTING WITH "SHE SAID..."  REPORTED SPEECH  
1. "I’ve had better results than any other student on the program."  
She said, she had had better results...
2. "I saw you stealing money from the charity box and I’m going to report it right now."  
She said, she had seen you stealing money and she was going to report it right then
3. "We should do a sponsored run to raise money tomorrow."  
She said, we should do a sponsored run to 

correlation_metrics_report

def generate_correlation_report(df: pd.DataFrame, output_path: str = None) -> dict:
    """
    Generates a correlation metrics report:
    1. Strong correlations (>|0.80|)
    2. Very weak correlations (< 0.01)

    Optionally saves the report as JSON.

    Parameters
    ----------
    df : pd.DataFrame
        Input dataframe.
    output_path : str, optional
        File path to save JSON report.

    Returns
    -------
    dict
        Correlation summary report.
    """

save_json

import json
import os
from typing import Any, Dict
from datetime import datetime

class SaveJsonException(Exception):
    """Custom exception for JSON saving errors."""
    pass


def save_json(data: Dict[str, Any], file_path: str) -> None:
    """
    Save dictionary data to a JSON file with full reliability.
    
    Key Capabilities:
    -----------------
    • Creates directories automatically  
    • Supports UTF-8 encoding  
    • Atomic write operation (prevents corrupti

Bootstrap 5 Tutorials

W3SCHOOLS
https://www.w3schools.com/bootstrap5/index.php

• Grids
https://www.w3schools.com/bootstrap5/bootstrap_grid_basic.php

Bootstrap 5 Design Resources

• https://github.com/jqueryscript/Bootstrap-5-Design-Resources

Bootstrap 5 Lightboxes

Some of the best free options
• Lightbox for Bootstrap 5 (a.k.a. bs5-lightbox): This is a pure JavaScript lightbox gallery plugin specifically designed for Bootstrap 5. It leverages Bootstrap's Modal and Carousel components, ensuring a consistent look and feel with your existing Bootstrap 5 project. Listed in Bootstrap 5 Design Resources (see below).
• Chocolat: A free, lightweight, and responsive lightbox plugin that offers flexibility in how images are displayed (fullscreen or within a contain

3190. Find Minimum Operations to Make All Elements Divisible by Three

You are given an integer array nums. In one operation, you can add or subtract 1 from any element of nums. Return the minimum number of operations to make all elements of nums divisible by 3.
/**
 * @param {number[]} nums
 * @return {number}
 */
var minimumOperations = function(nums) {
    // Initialize a counter to keep track of total operations
    let operations = 0;

    // Loop through each number in the array
    for (let num of nums) {
        // Find the remainder when divided by 3
        let remainder = num % 3;

        // If remainder is 1, subtract 1 -> costs 1 operation
        // If remainder is 2, add 1 -> costs 1 operation
        // If remainder is 0, no operation n

SCTM-SSAS: Syntactic–Contextual Translation Framework

# SCTM-SSAS: Syntactic–Contextual Translation Framework This repository provides a research-oriented implementation of the two core components proposed in **“English translation semantic alignment mechanism combining syntactic mapping and context awareness for translation optimization”** by **Huiying Ye** and **Yanjie Ye**. :contentReference[oaicite:2]{index=2} The system integrates **syntactic mapping** and **contextual awareness** to build a translation process that is both grammatically coherent and semantically aligned. It consists of two main modules: - **SCTM — Syntactic-Contextual Translation Model** - **SSAS — Semantic-Syntactic Alignment Strategy** The goal is to bridge the gap between structural linguistic precision and dynamic contextual interpretation, enabling more fluent and semantically accurate translations. --- ## 1. Background Machine translation has long struggled with mismatches between: - syntactic structure - contextual nuances - semantic intentions Traditional rule-based systems preserved grammar but lacked adaptability, while statistical and deep learning models improved fluency at the cost of losing fine-grained structural control. This work proposes a unified mechanism that merges both syntactic dependency modeling and contextual embedding to enhance translation quality across diverse linguistic environments. --- ## 2. Model Overview ### **2.1 Syntactic Mapping Layer (from SCTM)** Based on the formulation in Section 3.3 (page 5–6) :contentReference[oaicite:3]{index=3}: - Dependency parsing constructs a syntactic graph - A syntactic relation matrix **S** encodes connection strengths - Structural similarity between words is computed using syntactic adjacency - Each word obtains a syntactic embedding aggregated from its neighbors This preserves grammatical relations and strengthens structural fidelity during translation. --- ### **2.2 Contextual Awareness Layer (SCTM)** As described in Section 3.3 (page 6–7) :contentReference[oaicite:4]{index=4}: - A bidirectional LSTM processes the full sentence - Global context vector **C** is computed - Hidden states are combined to form contextual embeddings - Word-level contextual similarity is calculated - Final contextual representation merges local and global signals This captures long-range dependencies and semantic nuances. --- ### **2.3 Attention Integration (SCTM)** Using Equation (15): - Syntactic embedding - Contextual embedding - Attention alignment are fused to generate target-side translation embeddings. --- ## 3. Semantic-Syntactic Alignment Strategy (SSAS) Section 3.4 (page 7–9) :contentReference[oaicite:5]{index=5} introduces SSAS as an optimization layer applied after SCTM output. ### SSAS consists of: 1. **Dynamic Syntactic Mapping** - Re-maps syntactic units between source and target - Computes syntactic distance & similarity - Improves structural alignment quality 2. **Contextual Adaptation** - BiLSTM-derived global context - Contextual similarity - Adjusted contextual embedding 3. **Adaptive Feedback Mechanism** - Alignment loss - Gradient-based updates - Feedback-corrected target embedding This iterative loop stabilizes translation outputs and increases consistency. --- ## 4. Key Features - Rich syntactic dependency modeling - Global-local contextual embedding fusion - Attention-based alignment for translation - Feedback-driven refinement with syntactic & semantic loss - Modular design suitable for multilingual or low-resource settings --- ## 5. Potential Applications - Machine translation systems - Syntactic parsing-based NLP pipelines - Context-aware language understanding - Cross-lingual semantic alignment research --- ## 6. Citation If you use this work, please cite: > Ye, H., & Ye, Y. *English translation semantic alignment mechanism combining syntactic mapping and context awareness for translation optimization.* :contentReference[oaicite:6]{index=6} --- ## 7. License You may choose any license suitable for academic or commercial use (MIT recommended).
import torch
import torch.nn as nn
import torch.nn.functional as F


# --------------------------------------------------------------------
# 1. Syntactic Mapping Layer
# --------------------------------------------------------------------

class SyntacticMapping(nn.Module):
    """
    Implements:
    - syntactic relation matrix S (eq.4)
    - adjacency g(i,j) (eq.5)
    - syntactic similarity (eq.6)
    - word-level syntactic embedding (eq.7)
    """

    def __init__(self, e