Skip to content

Instantly share code, notes, and snippets.

View mike1e's full-sized avatar

Michael Le mike1e

View GitHub Profile
@dannguyen
dannguyen / README.openai-structured-output-demo.md
Last active April 14, 2025 16:56
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:

@kepano
kepano / Stripe's 2023 Annual Letter.md
Last active March 13, 2024 21:00
Stripe's 2023 Annual Letter

Source: https://stripe.com/annual-updates/2023

March 13, 2024

Dear Stripe community:

Charlie Munger described a two-part rule that works wonders in business, science, and elsewhere: 1) take a simple idea and 2) take it very seriously.

Stripe’s mission is to grow the GDP of the internet. The core idea behind the company—one we endeavor to take very seriously—is that we’re still early in the journey of software-driven innovation, and Stripe is an applied exercise in thinking through some of the corollaries of that. In particular, thanks to the new possi-bilities afforded by the internet, we believe that putting better—more global, easier to use, more flexible, faster, cheaper—economic infrastructure in the hands of companies and entrepreneurs will lead to a more vibrant and prosperous world. Remarkably, this journey was still in its infancy when Stripe launched in 2011. Thirteen years, and more than a doubling in internet users later, it’s still early. The world of 2034 is going to look very different.

@veekaybee
veekaybee / normcore-llm.md
Last active April 24, 2025 23:55
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@dannberg
dannberg / obsidian-daily-note-template.txt
Last active April 24, 2025 16:36
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@prologic
prologic / LearnGoIn5mins.md
Last active February 12, 2025 06:52
Learn Go in ~5mins
@kcak11
kcak11 / App.md
Last active April 15, 2025 11:32
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@clowestab
clowestab / Instagram-ghost.js
Created November 10, 2018 16:50
A script for synchronising your Instagram posts with your Ghost blog as discussed on my blog (https://thomasclowes.com)
const Parser = require('rss-parser');
const request = require('request');
const fs = require('fs');
const mime = require('mime-types');
const slugify = require('slugify');
//Enter your ghost credentials here
const clientId = "ghost-frontend";
const clientSecret = "enter-your-secret";
const username = "enter-your-email";
@rhythnic
rhythnic / vuex-reusable-functions.js
Last active October 21, 2022 07:41
Reusable Vuex Functions
// *******************************************************************
// ATTENTION
// This gist is now an npm module
// The API of some functions is altered slightly.
// All future work will happen in the repo.
//
// https://gitlab.com/rhythnic/vuex-intern
// *******************************************************************
// *******************************************************************