Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on LLMs.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://anggtwu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://anggtwu.net/e/llms.e>
#           or at <http://anggtwu.net/e/llms.e.html>.
#        See also <http://anggtwu.net/emacs.html>,
#                 <http://anggtwu.net/.emacs[.html]>,
#                 <http://anggtwu.net/.zshrc[.html]>,
#                 <http://anggtwu.net/escripts.html>,
#             and <http://anggtwu.net/>.
#
#######





# «.emacs-packages»		(to "emacs-packages")
# «.chatgpt-free»		(to "chatgpt-free")
# «.gptel»			(to "gptel")
# «.sqlite-to-python»		(to "sqlite-to-python")
# «.sqlite-to-elisp»		(to "sqlite-to-elisp")
# «.video-smaller»		(to "video-smaller")
# «.strawberry-question»	(to "strawberry-question")



#####
#
# emacs-packages
# 2024sep05
#
#####

# «emacs-packages»  (to ".emacs-packages")
# (find-telegachat "6264384040#236523" "que eu te mando links pros mais óbvios")
# (find-telegachatm "6264384040#236524")
# (find-epackage-links 'chatgpt-shell)
# (find-epackage-links 'gpt)
# (find-epackage-links 'gpt-commit)
# (find-epackage-links 'gptai)
# (find-epackage-links 'gptel)
# (find-epackage-links 'magit-gptcommit)
# (find-epackage-links 'ob-chatgpt-shell)
# (find-epackage-links 'org-ai)
# (find-epackage-links 'sumibi)




#####
#
# chatgpt-free
# 2024sep05
#
#####

# «chatgpt-free»  (to ".chatgpt-free")
# (find-telegachat "6264384040#237141" "Tipo algum esquema de N perguntas gratis por mes?")
# https://chatgpt.com/




#####
#
# gptel
# 2024sep05
#
#####

# «gptel»  (to ".gptel")
# https://www.blogbyben.com/2024/08/gptel-mindblowing-integration-between.html?m=1
# https://www.blogbyben.com/2024/08/gptel-mindblowing-integration-between.html
# (find-youtubedl-links "/sda5/videos/Emacs/" "Every_LLM_in_Emacs_with_gptel" "bsRnh_brggM" ".mp4" "everyllm")
# (code-video "everyllmvideo" "/sda5/videos/Emacs/Every_LLM_in_Emacs_with_gptel-bsRnh_brggM.mp4")
# (find-everyllmvideo "0:00")
# (find-everyllmvideo "1:28")

# (find-epackage-links 'gptel "gptel" "~/.emacs.d/elpa/gptel-20240905.1946/")
# (code-c-d "gptel" "~/.emacs.d/elpa/gptel-20240905.1946/")
# (find-gptelfile "")
# (find-gptelgrep "grep --color=auto -niH --null -e chatgpt *.el")
# (find-efunctiondescr 'gptel-send)
# (find-efunction      'gptel-send)
# (find-evardescr      'gptel-api-key)
# (find-evariable      'gptel-api-key)
# (find-efunctiondescr 'gptel-api-key-from-auth-source)
# (find-efunction      'gptel-api-key-from-auth-source)
# (find-node "(auth)Overview")




#####
#
# sqlite-to-python
# 2024sep05
#
#####

# «sqlite-to-python»  (to ".sqlite-to-python")
# https://chatgpt.com/share/928d014f-c32e-4dd3-a6c7-1f3f6615d7a8
# (find-es "sqlite" "python")

# (find-man "1 sqlite3")

---
How do I translate these SQLite commands to the Python SQLite API?
create table tbl1 (one varchar(10), two smallint);
insert into tbl1 values ('hello!',  10);
insert into tbl1 values ('goodbye', 20);
.mode columns
.headers on
select * from tbl1;
.help
.databases
.dump tbl1
.exit
---

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -fv  /tmp/example.db
sqlite3 /tmp/example.db
create table tbl1 (one varchar(10), two smallint);
insert into tbl1 values ('hello!',  10);
insert into tbl1 values ('goodbye', 20);
.mode columns
.headers on
select * from tbl1;
.help
.databases
.dump tbl1
.exit

* (find-sh0 "rm -fv /tmp/example.db")
* (eepitch-python)
* (eepitch-kill)
* (eepitch-python)
import sqlite3
conn = sqlite3.connect('/tmp/example.db')
cursor = conn.cursor()
cursor.execute("CREATE TABLE tbl1 (one VARCHAR(10), two SMALLINT)")
cursor.execute("INSERT INTO tbl1 VALUES ('hello!', 10)")
cursor.execute("INSERT INTO tbl1 VALUES ('goodbye', 20)")
conn.commit()
cursor.execute("SELECT * FROM tbl1")
rows = cursor.fetchall()
print("one".ljust(10), "two")
print("-" * 15)
for row in rows:
    print(str(row[0]).ljust(10), row[1])

for line in conn.iterdump():
    print(line)

conn.close()

* (sqlite-mode-open-file "/tmp/example.db")






#####
#
# sqlite-to-elisp
# 2024sep07
#
#####

# «sqlite-to-elisp»  (to ".sqlite-to-elisp")
# https://chatgpt.com/c/66dcfce6-57dc-800a-8302-4cf71445523d
# (find-es "sqlite" "elisp")


(require 'sqlite)
(delete-file "/tmp/foo.db")

(setq db (sqlite-open "/tmp/foo.db"))
(sqlite-execute db "CREATE TABLE tbl1 (one VARCHAR(10), two SMALLINT);")
(sqlite-execute db "INSERT INTO tbl1 VALUES ('hello!', 10);")
(sqlite-execute db "INSERT INTO tbl1 VALUES ('goodbye', 20);")
(sqlite-select  db "SELECT * FROM tbl1;")

(setq dbcreates
      (mapconcat
       (lambda (row) (format "%s\n" row))
       (sqlite-execute db "SELECT sql FROM sqlite_master WHERE type='table' AND name='tbl1';")
       ))

(setq dbcreates
      (mapconcat
       (lambda (row) (format "%s\n" row))
       (sqlite-execute db "SELECT sql FROM sqlite_master WHERE type='table';")
       ))

(setq dbselects
      (mapconcat
       (lambda (row) (format "%S\n" row))
       (sqlite-select db "SELECT * FROM tbl1;")
       ""))

(with-temp-buffer
  (insert dbcreates)
  (insert (mapconcat (lambda (row) (format "%S" row))
                     (sqlite-select db "SELECT * FROM tbl1;")
                     "\n"))



  (write-file "/tmp/foo_dump.sql"))


    (message "Data: %S" result))



;; Open the database (in-memory for example)
(let ((db (sqlite-open ":memory:")))
  ;; Create table

  ;; Insert values

  ;; Select data
  (let ((result (sqlite-select db "SELECT * FROM tbl1;")))
    (message "Data: %S" result))

  ;; Dump table

  ;; Close the connection
  (sqlite-close db))





#####
#
# video-smaller
# 2024sep06
#
#####

# «video-smaller»  (to ".video-smaller")
# https://chatgpt.com/c/66daee4c-7acc-800a-95fd-d8036ba76f9c
# How do I convert a video to a smaller format with ffmpeg?




#####
#
# strawberry-question
# 2024sep22
#
#####

# «strawberry-question»  (to ".strawberry-question")

anthropic strawberry hacker news
https://news.ycombinator.com/item?id=40116488 Anthropic: Prompt Library (anthropic.com)
https://news.ycombinator.com/item?id=41395921 Anthropic's Prompt Engineering Interactive Tutorial (github.com/anthropics)
https://news.ycombinator.com/item?id=40116488 Anthropic: Prompt Library (anthropic.com)
https://news.ycombinator.com/item?id=41540902 Terence Tao on O1 (mathstodon.xyz)
https://www.reddit.com/r/singularity/comments/1dl3pgq/the_strawberry_question_should_now_be_a_prize_lol/


https://ben.page/jumbocode-ai AI is an impediment to learning web development
https://news.ycombinator.com/item?id=41757711 AI is an impediment to learning web development (ben.page)

https://old.reddit.com/r/ChatGPT/comments/1fye6tb/the_human_internet_is_dying_ai_images_taking_over/
https://news.ycombinator.com/item?id=41767648 Nearly all of the Google images results for "baby peacock" are AI generated (twitter.com/notengoprisa)



How do I create an array with all the file names in a directory in Python?
https://chatgpt.com/c/66dc8826-921c-800a-94db-63069883d5d3

https://gist.github.com/PHAredes/b3f986648fa31120fa2997e27dde4475 sexp hyperlinks and eepitch blocks

# (find-google-links "how do I obtain my chatgpt key")

https://github.com/pv-pterab-s/emacs-pinky-saver/tree/main

# (find-telegachat "-1002188044240#4239" "igualdade é antissimetrica")
# (find-fline "~/tmp/equality_is_anisymmetric.jpg")






#  Local Variables:
#  coding:               utf-8-unix
#  End: