Skip to content

Instantly share code, notes, and snippets.

View mhkeller's full-sized avatar

Michael Keller mhkeller

View GitHub Profile
@jcsalterego
jcsalterego / .gitignore
Last active December 14, 2023 16:59
Bluesky Icon
icon.iconset
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
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
@john-guerra
john-guerra / .block
Last active March 16, 2023 21:11
vega-lite JavaScript API browser example with vegaEmbed
license: mit
@jsvine
jsvine / visidata-pipx-installation.md
Last active May 16, 2023 05:55
Installing VisiData via pipx

Installing VisiData via pipx

pipx is a command-line tool that allows you to run Python applications in isolated environments. It's a great way to make VisiData available across your system without worrying that its dependencies will conflict with other Python projects. This short guide will show you how.

Step 0: Uninstall global VisiData

If you have have previously VisiData installed globally, uninstall it by running pip3 uninstall visidata.

Otherwise, you can skip this step.

@blacki
blacki / dev-environment.md
Last active June 14, 2019 00:19
Managing a Python Dev Environment w/ Virtual Env

Dev Environment

I do the following on a per project basis.

Install virtualenv

If you don't have virtualenv installed, install it globally by running pip install virtualenv from any folder. If that didn't work because you have no pip try pip3 install virtualenv instead.

Create a new python for the project

@thomaswilburn
thomaswilburn / generators.js
Last active September 14, 2018 18:57
CSV iterators
// test data -- we also use an identical "test.csv" to check streams
var csv = `
one,two,three
1,2,3
a,b,c
"1,000",1000,"hey there"
`.trim();
// easy numeric indexes for iterables
var forEach = function*(iter) {
@ljharb
ljharb / array_iteration_thoughts.md
Last active April 22, 2024 10:15
Array iteration methods summarized

Array Iteration

https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu

@veltman
veltman / README.md
Created October 10, 2016 16:08
Geosupport w/ JS and node-ffi

Geocoding 10,000 addresses a second with NYC's Geosupport library and Node FFI

Following on Chris Whong's excellent writeup of how to make calls directly to NYC's Geosupport client and this first attempt at generalizing it, here's a way that let me geocode about 10,000 addresses a second on Ubuntu using Node FFI.

Note: this assumes Ubuntu - other Linux is probably fine but may need adjustments.

First, install the basics:

# Update, install Node and unzip (if needed)
@mhkeller
mhkeller / main.js
Last active July 17, 2018 16:13
A boilerplate client-side javascript setup
/* --------------------------------------------
*
* Main.js
* Install browserify dependencies with `npm install --save <package name>`
* e.g. `npm install --save d3
*
* --------------------------------------------
*/
/* --------------------------------------------

NodeTogether Curriculum

Step 0. git Up and Running

Github

Github is where we will store all our code and collaborate on it with others. Make an account here: https://github.com/

git

git is a way to keep track of your projects as they change.