Wednesday, February 07, 2024

AI: Large Action Models (LAMs) & Rabbit, Poem/1 devices

Large Action Models (LAMs) & Rabbits 🐇 (Practical AI #254) |> Changelog

rabbit.tech  "a smartphone without a phone" :)

$199, no subscription required, fifth batch sold out






Priced at $150 on Kickstarter today, Poem/1 was developed by Matt Webb’s one-man studio Acts Not Facts along with the industrial design firm Approach. With an e-paper display and Wi-Fi, the clock presents the time as something of a never-ending sonnet.



SQLite queries

SQLite engine is written in C, and used from many other prog. languages, 
directly or via ORMs. The syntax of queries may vary, depending on language and lib used.

JS async: sqlite3 - npm

sql - Does SQLite3 have prepared statements in Node.js? - Stack Overflow

// Directly in the function arguments.
db.run("UPDATE tbl SET name = ? WHERE id = ?", "bar", 2);

// As an array.
db.run("UPDATE tbl SET name = ? WHERE id = ?", [ "bar", 2 ]);

// As an object with named parameters.
db.run("UPDATE tbl SET name = $name WHERE id = $id", {
  $id: 2,
  $name: "bar"
});

JS sync (faster): better-sqlite3 - npm


C# (.NET) Parameters - Microsoft.Data.Sqlite | Microsoft Learn

Parameters can be prefixed with either :@, or $.

command.CommandText = @" INSERT INTO user (name) VALUES ($name) "; command.Parameters.AddWithValue("$name", name);


Go: Go sqlite3 - working with sqlite3 in Golang

    stm, err := db.Prepare("SELECT * FROM cars WHERE id = ?")
    var id int
    var name string
    var price int
    cid := 3
    err = stm.QueryRow(cid).Scan(&id, &name, &price)

Python: Python 3 sqlite parameterized SQL-query - Stack Overflow

sql = "select exists(SELECT * from USERS where PASSWORD = ? AND USERNAME = ?)"
args = (var1,var2)
cursor = database_connection.execute(sql, args)