/**
* @param {number[]} nums
* @param {number} k
* @return {number}
*/
var maximumBeauty = function(nums, k) {
// Sort the array in non-decreasing order
nums.sort((e1, e2) => e1 - e2);
// Initialize two pointers and a variable to store the maximum beauty
let l = 0;
let r = 0;
let result = 0;
// Use a sliding window approach to find the maximum length of subsequence
while (r < nums.length) {
// Check if the current window is valid
if (nums[r]
="("&ESQUERDA(C33;2)&") "&EXT.TEXTO(C33;4;5)&"-"&DIREITA(C33;4)
void gpiod_init(void);
void app_main(void){
gpiod_init();
while (1)
{
asm volatile (
"LDR R0, =0x40020C14 \n" // GPIOD_ODR address
"LDR R1, =0xF000 \n" // Value to set pins 12-15
"STR R1, [R0] \n" // Write to GPIOD_ODR
);
HAL_Delay(1000);
asm volatile (
"LDR R0, =0x40020C14 \n" // GPIOD_ODR address
"MOV R1, #0 \n" // Value to clear pins 12-15
/*
https://javascript.plainenglish.io/7-infamous-javascript-bugs-that-shook-the-internet-3cf8f8f76098
*/
// Proper event listener cleanup to prevent memory leaks
function attachEvent() {
const btn = document.querySelector("#myButton");
const handleClick = () => console.log("Button clicked!");
btn.addEventListener("click", handleClick);
// Return a function to remove the listener and free up memory
return () => btn.removeEventListener("click", handleClick);
}
const detach
asm("LDR R5, [R1]");
asm("STR R3, [R1]");
cat load5.redis | redis-cli -h MY_HOST_OR_IP -p 6379 -a "MY_PASS"
docker pull mcr.microsoft.com/azure-sql-edge
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=dockerStrongPwd123" -p 1433:1433 --name heineken-mssql -d mcr.microsoft.com/azure-sql-edge
source ~/.nvm/nvm.sh
nvm install 18
nvm use 18
npm install -g sql-cli
mssql -u sa -p dockerStrongPwd123
DROP DATABASE heinekenb2b;
CREATE DATABASE heinekenb2b;
ALTER DATABASE heinekenb2b SET READ_COMMITTED_SNAPSHOT ON;
ALTER DATABASE heinekenb2b SET ALLOW_SNAPSHOT_ISOLATION ON;
use heinekenb2b;
SET TRANSACTION
import random
import socket
import threading
from typing import Callable
import rpyc
class RpycClient:
def __init__(self, port: int, secret: str) -> None:
self.port = port
self.secret = secret
def check_port(self, host, port):
sock = None
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.5)
result = sock.connect_ex((host, port))
return result == 0
{{ 'section-multicolumn.css' | asset_url | stylesheet_tag }}
{% comment %}
<style>
.multicolumn {
&-list{
gap: 10px;
}
&.multicolumn--trusted {
--grid-desktop-horizontal-spacing: 0;
--grid-desktop-vertical-spacing: 10px;
.multicolumn-card {
--text-boxes-radius: 8px;
--text-boxes-border-width: 1px;
--color-foreground: var(--main-color-foreground);
--text-boxes-border-opacity: 0.20;
height: 100%;
border-radius: 8px;
import random
import socket
import threading
from typing import Callable
import rpyc
class RpycClient:
def __init__(self, port: int, secret: str) -> None:
self.port = port
self.secret = secret
def check_port(self, host, port):
sock = None
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.5)
result = sock.connect_ex((host, port))
return result == 0
const anchorLinks = document.querySelectorAll('[href="#bundle-product"]');
// TODO refactore
if (anchorLinks) {
anchorLinks.forEach(elem => {
elem.addEventListener('click', function () {
document.querySelector('[id="bundle-product"]').scrollIntoView({
behavior: 'smooth'
});
})
})
}
##### CELL 1 #####
%%capture --no-stderr
# Installs
PACKAGES = [
'google-cloud-firestore',
'google-cloud-secret-manager',
'langchain',
'langchain-google-cloud-sql-mysql',
'langchain-google-vertexai',
'langchain-core',
'langchain-community',
'langgraph',
'pymysql',
]
PACKAGES_STR = ' '.join(PACKAGES)
%pip install -U $PACKAGES_STR
##### CELL 2 #####
# Check versions
%pip freeze | grep -iE "$(echo {PACKAGES_STR} | tr ' ' '|')"
##### CELL 3 #####
# Also check
"""
Code relative to agent instanciation and answering
"""
from langchain.agents import create_sql_agent
from langchain.agents.agent_types import AgentType
from langchain_community.agent_toolkits import SQLDatabaseToolkit
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_google_vertexai import ChatVertexAI
MULTIMODAL_MODEL = "gemini-1.5-flash" # Light model to reduce costs
SQL_PREFIX = """You are an agent designed to interact with a SQL database.
Given an input
"""
Module devoted to instanciate an object for LangChain to interact with
the MySQL database, hosted on Cloud SQL.
"""
from google.cloud import secretmanager
from langchain_google_cloud_sql_mysql import MySQLEngine
from langchain_community.utilities.sql_database import SQLDatabase
from sqlalchemy import create_engine
def instanciate_db(
project_id: str, region: str, instance: str, database: str, user: str
) -> SQLDatabase:
"""
Instanciate an object for LangChain to interact wit
.text-line-dots {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}