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
////////////////////////// | |
// Generated by Codium AI | |
////////////////////////// | |
const passage = `以色列總理稱,加薩地帶的戰爭將很快進入一個新階段。 | |
「與哈馬斯的激烈戰爭階段即將結束,」以色列總理本雅明·納坦尼雅胡週日接受電視採訪時說。「這並不意味著戰爭即將結束,但戰爭的激烈階段即將結束。」 | |
但是,經歷了半年多的可怕流血事件之後,無論這些言論能多讓人寬慰,納坦尼雅胡都迅速澄清了兩件事:加薩停火還沒有到來。下一場戰鬥可能是在黎巴嫩,與哈馬斯的盟友真主黨部隊作戰。 | |
他說,從加薩撤軍後,「我們就能把部分部隊調往北部。」 | |
納坦尼雅胡沒有宣布入侵黎巴嫩——因為此舉很可能導致以黎雙方都損失慘重,而是與真主黨達成外交解決方案留下了餘地。 | |
關於加薩問題的任何外交解決方案仍然不確定,部分原因是,如果以色列未將哈馬斯趕下台就停止在加薩的戰鬥,納坦尼雅胡的聯盟可能會崩潰。 |
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
# For wordpress multisite networks with sub-directory installs | |
# nginx.conf | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name example.com; | |
index index.php index.html index.htm; |
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
# Remember to install Pillow and ghostscript first | |
# In Mac, to install GhostScript, run: brew install ghostscript | |
# In Mac, to install Pillow | |
# TODO | |
# - Cannot handle directory name with space | |
# - If directory did not contains any *.pdg file, it will throw error (e.g. a directory within a directory) | |
# Directory Structure | |
# ./books |
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: |
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
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
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 |
Loading
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
# 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: |
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
♔ | |
♕ | |
♖ | |
♗ | |
♘ | |
♙ | |
♚ | |
♛ | |
♜ | |
♝ |
NewerOlder