Skip to content

Instantly share code, notes, and snippets.

View ryan-williams's full-sized avatar
🚆

Ryan Williams ryan-williams

🚆
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryan-williams
ryan-williams / chain-example.ipynb
Last active March 30, 2020 04:55
A couple example notebooks associated with https://github.com/dask/dask/pull/6038 (`to_sql` support for Dask DataFrames)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryan-williams
ryan-williams / monad-monoid.md
Last active March 14, 2020 19:51
Attempt to articulate an intuitive understanding about why "a monad is a monoid in the category of endofunctors"™️

a monad is just a monoid in the category of endofunctors

Monoid

A monoid has two components:

id (or empty)

"make an instance from nothing"

  • 0 (Unit => Int)
  • "" (Unit => String)
  • Nil (Unit => List[_])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

NE Scala 2020: "online-only" post-mortem

2020-03-20

On Saturday we wrapped up the Northeast Scala Symposium: a community-run conference related to the Scala programming language.

Going "online-only" at the last minute

On Tuesday, having sold 170 tickets to a conference starting Thursday at a venue in DUMBO, we decided to go "online only".

It's possible we should have made the call earlier. As is, some ppl were able to cancel their travel plans, others had already traveled, and (seemingly most) others had canceled on their own (or their employers had done it on their behalf).

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryan-williams
ryan-williams / gist-dir
Last active December 30, 2019 03:31
Script for uploading [files or directories that may contain binary data] to GitHub gists; see https://github.com/defunkt/gist/issues/191
#!/usr/bin/env bash
python3 gist_dir.py "$@"
@ryan-williams
ryan-williams / pandas.md
Last active December 3, 2019 00:56
Pandas functions for a 2-D histogram of a dataframe: one column's values become the columns, and values become counts of given {row, column} pairs)
  • Col1 is the field that will be the "rows" index
  • Col2 is the column whose values will become the new columns
  • Col3 is any other column (assuming that other columns are always filled; .count() will only count cells where Col3 has a value)
df \
.groupby(['Col1', 'Col2']) \
[['Col3']] \
.count() \
.reset_index() \
.pivot('Col1', 'Col2', 'Col3')
@ryan-williams
ryan-williams / pyenv.md
Last active December 30, 2023 15:25
install pyenv (and required OpenSSL from source, in homedir, without root/sudo)

First, install pyenv:

curl https://pyenv.run | bash

(docs)

Follow its parting instructions to make sure you have pyenv in your $PATH:

# Load pyenv automatically by adding
# the following to ~/.bashrc: