Skip to content

Instantly share code, notes, and snippets.

Please go to https://github.com/nishuzumi/gemini-teacher
@dannguyen
dannguyen / README.openai-structured-output-demo.md
Last active May 25, 2025 00:53
A basic test of OpenAI's Structured Output feature against financial disclosure reports and a newspaper's police blotter. Code examples use the Python SDK and pydantic for the schema definition.

Extracting financial disclosure reports and police blotter narratives using OpenAI's Structured Output

tl;dr this demo shows how to call OpenAI's gpt-4o-mini model, provide it with URL of a screenshot of a document, and extract data that follows a schema you define. The results are pretty solid even with little effort in defining the data — and no effort doing data prep. OpenAI's API could be a cost-efficient tool for large scale data gathering projects involving public documents.

OpenAI announced Structured Outputs for its API, a feature that allows users to specify the fields and schema of extracted data, and guarantees that the JSON output will follow that specification.

For example, given a Congressional financial disclosure report, with assets defined in a table like this:

@nicostombros
nicostombros / data-table.tsx
Last active May 17, 2025 17:57
Shadcn UI implementation of DataTable and Pagination components working together
// same as your regular shadcn datatable implementation (which uses tanstack table)
// note that the shadcn datatable uses shadcn table for the ui. see https://ui.shadcn.com/docs/components/data-table
import {
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFilteredRowModel,
@jinjier
jinjier / javdb-top250.md
Last active June 6, 2025 11:02
JavDB top 250 movies list. [Updated on 2025/06]
@kepano
kepano / obsidian-web-clipper.js
Last active May 29, 2025 16:45
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@bmaupin
bmaupin / open-source-sso.md
Last active May 22, 2025 09:40
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 5, 2025 09:28
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active June 6, 2025 12:15
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References