Saturday, August 12, 2023

AP Comp Sci (Java)

high school CS class material

AP Computer Science A Exam Review 2023 | Study Guides, Trivia, Lives | Fiveable



better-sqlite3: SQLite + JS

Not async! but fast apparently. 

WiseLibs/better-sqlite3: The fastest and simplest library for SQLite3 in Node.js. @GitHub

"The fastest and simplest library for SQLite3 in Node.js.

  • Full transaction support
  • High performance, efficiency, and safety
  • Easy-to-use synchronous API (better concurrency than an asynchronous API... yes, you read that correctly)
  • Support for user-defined functions, aggregates, virtual tables, and extensions
  • 64-bit integers (invisible until you need them)
  • Worker thread support (for large/slow queries)"
docs:


NPM sqlite:



The fastest and simplest library for SQLite3 in Node.js. (simple, sinc funcs)

A wrapper library written in Typescript with ZERO dependencies that adds ES6 promises and SQL-based migrations API to sqlite3 (docs).

Asynchronous, non-blocking SQLite3 bindings for Node.js.

Postgres as vector db with pgvector extension

 Vectors are the new JSON in PostgreSQL | Jonathan Katz

"Generative AI and all the buzz around it has caused developers to look for convenient ways to store and run queries against the outputs of these systems, with PostgreSQL being a natural choice for a lot of reasons. But even with the hype around generative AI, this is not a new data pattern. Vectors, as a mathematical concept, have been around for hundreds of years. Machine learning has over a half-century worth of research. The array – the fundamental data structure for a vector – is taught in most introductory computer science classes. Even PostgreSQL has had support for vector operations for over 20 years

Vectors are not new, but they’re having a surge in popularity these days. As mentioned earlier, this is due to the newfound accessibility of AI/ML systems, and that the output of these systems are vectors. A common use-case is to build a model on stored data (text, sound, video), convert it to vector format, and then use it for “semantic search.”

pgvector: an open source extension for storing and searching vectors in PostgreSQL