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
# Just run `docker compose up --build` to build and run these containers | |
# To access the UI go to http://localhost | |
# While I haven't REALLY use program to access producer/consumer, you can use the Python wrapper | |
# provided by Confluent: https://developer.confluent.io/get-started/python/#introduction | |
# to get start | |
version: "3" | |
services: | |
zookeeper: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
FROM php_base:latest | |
RUN apt update -y && apt upgrade -y | |
WORKDIR /var/www/html | |
RUN composer update --optimize-autoloader | |
COPY src/. /var/www/html | |
COPY build/php/.env.local /var/www/html/.env |
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
def send_email(sender, recipient, aws_region, subject, file_name): | |
# The email body for recipients with non-HTML email clients. | |
BODY_TEXT = "Hello,\r\nPlease find the attached file." | |
# The HTML body of the email. | |
BODY_HTML = """\ | |
<html> | |
<head></head> | |
<body> | |
<h1>Hello!</h1> | |
<p>Please find the attached file.</p> |
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
""" | |
Again, don't just copy and paste the code below. This is for your study only. | |
Change the code to suit your case accordingly. | |
""" | |
import logging | |
import csv | |
import zipfile | |
from zoneinfo import ZoneInfo |
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 ollama | |
import chromadb | |
import os | |
# Read files in `data` dir as string | |
# and create a list of documents | |
data_dir = 'data' | |
files = os.listdir(data_dir) | |
documents = [] | |
for file in files: |
OlderNewer