Building Agents with Retrieval-Augmented Generation (RAG) and Function Calling
mkdir mybuild
cd mybuild/
cmake -Dgtest_build_tests=ON -Dgmock_build_tests=ON $GTEST_REPO_DIR ..
make
make test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from information_schema.key_column_usage | |
where constraint_catalog=current_catalog and table_name='your_table_name' | |
and position_in_unique_constraint notnull; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyfiglet | |
from rich import box | |
from rich.console import Console, Group | |
from rich.markdown import Markdown | |
from rich.panel import Panel | |
from rich.text import Text | |
from time import sleep | |
from rich.align import Align | |
console = Console() |
In short:
Parameter | Monitoring | Observability |
---|---|---|
Purpose | Detect and alert on issues/problems | Understand the state of a system |
What/Which Data? | Predetermined metrics and logs | All telemetry data |
Goal is to | Identify problems | Understand why problems occur |
Method | Reactive | Proactive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import pandas as pd | |
import numpy as np | |
from datetime import datetime, timedelta | |
import random | |
from rich.progress import Progress | |
import time | |
def create_dataset(file_name, num_rows, start_date, end_date): | |
"""Create a dataset""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:7.3.0 | |
hostname: zookeeper | |
container_name: zookeeper | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import requests | |
import pandas as pd | |
import logging | |
import json | |
# Set up logging | |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
# Your ClickUp API token | |
api_token = "" |
NewerOlder