Skip to content

Instantly share code, notes, and snippets.

View mhkeller's full-sized avatar

Michael Keller mhkeller

View GitHub Profile
name country longitude latitude height_m year_built
Tower of Hercules Spain -8.4067 43.3856 55 110
Cape Hatteras Lighthouse United States -75.5288 35.2509 64 1870
Île Vierge Lighthouse France -4.6131 48.6386 83 1902
Jeddah Light Saudi Arabia 39.1728 21.4783 133 1990
Lanterna di Genova Italy 8.9036 44.4047 76 1543
Bell Rock Lighthouse United Kingdom -2.3878 56.4339 35 1811
Fastnet Rock Lighthouse Ireland -9.6033 51.3936 54 1904
Peggys Point Lighthouse Canada -63.9156 44.4922 15 1915
Portland Head Light United States -70.2078 43.6231 24 1791
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
[
{
"county": "Autauga",
"state": "Alabama",
"abbreviation": "AL",
"Region": "South",
"id": 1001,
"rank": 1371,
"education": 21.7,
"income": 53773,
@mhkeller
mhkeller / package.json
Last active September 16, 2025 20:36
Convert a parquet file to bytes representing an arrow table
{
"name": "parquet-to-arrow",
"version": "1.0.0",
"description": "",
"scripts": {
},
"dependencies": {
"apache-arrow": "^15.0.2",
"arrow-js-ffi": "^0.4.1",
"parquet-wasm": "^0.6.0-beta.2"
const { Pool, Client } = require('pg');
const namespaceQuery = `SELECT nspname
FROM pg_namespace
WHERE oid = pg_my_temp_schema();`;
const fnQuery = `CREATE OR REPLACE FUNCTION pg_temp.increment(i integer)
RETURNS integer
LANGUAGE plpgsql
AS $function$
AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY
@mhkeller
mhkeller / README.md
Last active July 19, 2024 14:33
HTML, CSS and JavaScript tutorials

HTML, CSS and JavaScript tutorials

Here's a collection of guidebooks and tutorials that give the basics of HTML, CSS and JavaScript – three languages that form the basis for the modern web. The Mozilla links are documents that you can read through. The CodeCademy and other sites are interactive tutorials to get used to writing code.

For future projects, install Visual Studio Code, which is a handy text editor, useful for more than just web development (you can take interview notes in it, for example).

I think the fastest way to get up and running is to write using the Svelte REPL, which is an online interface for writing HTML, CSS and JavaScript. You can use it as a playground for quick experiments and following along with some of the tutorials.

HTML - Creating elements and text (the structure of a page)

@mhkeller
mhkeller / inject-css.js
Last active December 6, 2021 04:57
Bookmarklet for injecting new css
javascript: (function() {
var newcss = `PUT NEW CSS HERE`;
var tag = document.createElement("style");
tag.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(tag);
tag[(typeof document.body.style.WebkitAppearance == "string") ? "innerText" : "innerHTML"] = newcss
})();
@mhkeller
mhkeller / group.js
Last active December 3, 2021 04:19
d3-array's group and groups functions
class InternMap extends Map {
constructor(entries, key = keyof) {
super();
Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});
if (entries != null) for (const [key, value] of entries) this.set(key, value);
}
get(key) {
return super.get(intern_get(this, key));
}
has(key) {
@mhkeller
mhkeller / .block
Created February 24, 2021 05:04 — forked from syntagmatic/.block
d3-hierarchy tree
license: gpl-3.0
border: no
height: 500