Skip to content

Instantly share code, notes, and snippets.

View colinricardo's full-sized avatar

Colin Ricardo colinricardo

View GitHub Profile
The Last Question by Isaac Asimov © 1956
The last question was asked for the first time, half in jest, on May 21, 2061, at a time when humanity first stepped into the light. The question came about as a result of a five dollar bet over highballs, and it happened this way:
Alexander Adell and Bertram Lupov were two of the faithful attendants of Multivac. As well as any human beings could, they knew what lay behind the cold, clicking, flashing face -- miles and miles of face -- of that giant computer. They had at least a vague notion of the general plan of relays and circuits that had long since grown past the point where any single human could possibly have a firm grasp of the whole.
Multivac was self-adjusting and self-correcting. It had to be, for nothing human could adjust and correct it quickly enough or even adequately enough -- so Adell and Lupov attended the monstrous giant only lightly and superficially, yet as well as any men could. They fed it data, adjusted questions to its needs and tran
@colinricardo
colinricardo / api.md
Created April 12, 2022 14:45
audyo api discussion

Authentication

API Keys

The API will be made accessible through the provision of API keys, private or public.

There are a number of possible approaches to API key generation i.e. random numbers, UUIDs etc. This package does a good job of creating random, readable API keys.

Private Keys

{
"title": "Map Hyper + d to F12",
"rules": [
{
"description": "Map Hyper + d to F12",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "d",
@colinricardo
colinricardo / notes.md
Last active October 5, 2023 12:55
prefs

keyboard speed

defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat int 10

zsh

@colinricardo
colinricardo / spec.yaml
Last active October 31, 2023 22:48
spec
openapi: 3.0.0
info:
title: Conjecture API
description: The Conjecture REST API.
version: 0.0.1
termsOfService: "https://conjecture.dev/terms-of-use"
contact:
name: Conjecture Support
url: "https://help.conjecture.dev/"
servers:
# install xcode stuff
xcode-select --install
# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install warp
brew install --cask warp
// src/filler/browserbase.ts
import { BROWSER_BASE_API_KEY, BROWSER_BASE_PROJECT_ID } from "@/config";
import { log, logError } from "@/lib/logger";
import Browserbase from "@browserbasehq/sdk";
import { Browser, Page, chromium } from "playwright";
import { BasePlaywrightComputer } from "./browser";
// You'll need to create a type for the Browserbase instance
interface BrowserbaseSession {
id: string;

got it. i'll design an approach to extract structured tabular data (with notes) from lossy entryText arrays like these, where spacing and line breaks can vary. i'll use regex, rule-based parsing, and heuristics around patterns like dates and titles to reconstruct columns.

will include fallback logic for edge cases (e.g. merged rows, dangling notes, partial entries) and provide a clear JSON schema for the output.

sit tight, i'll be back with the full outline and rationale.

Plan: Parsing Land Registry “Schedule of Notices of Leases” into Structured Data

Overview of the Problem

Land Registry title registers include a Schedule of Notices of Lease presented in tabular form. This schedule has four columns of information for each lease entry:

cool, i’ll write up a short explanation of the approach and give you python code to parse and structure the lease schedule entries like the ones you shared

starting now—i’ll break down how to reliably extract the 4 canonical fields (registration info, property desc, lease date/term, lessee title), plus notes and structure them cleanly

will drop the code shortly

Transforming "Schedule of Notices of Leases" Data into Structured Records

Explanation of Approach