Skip to content

Instantly share code, notes, and snippets.

View hepplerj's full-sized avatar
💭
building the history web

Jason Heppler hepplerj

💭
building the history web
View GitHub Profile

Elon Musk's suspension reversals

The tables below show notable Twitter suspension reversals for each day since Elon Musk took over as owner and CEO.

All dates indicate when the suspension or reversal was detected, and the actual suspension or reversal may have been earlier. For most English-language accounts with large followings, this lag will generally not be longer than a few hours, but for accounts that have a small number of followers or that are outside the networks we are tracking, the difference can be larger, and in some cases an account on the list may have had its suspension reversed before 27 October 2022. These dates will get more precise as we refine the report.

Because of these limitations, this report should be considered a starting point for investigation, not a definitive list of suspension reversals.

@jwieringa
jwieringa / trainer.md
Last active January 2, 2018 15:08
Cycling Trainer
@rccordell
rccordell / renderSite.R
Last active September 8, 2020 00:42
This script builds on Aleszu Bajak's excellent [tutorial on building a course website using R Markdown and Github pages](http://www.storybench.org/convert-google-doc-rmarkdown-publish-github-pages/). It automates the rendering of HTML files from RMD and automatically generates the page menu for the site, eliminating much duplicative work.
# This script builds on Aleszu Bajak's excellent
# [tutorial on building a course website using R Markdown and Github pages](http://www.storybench.org/convert-google-doc-rmarkdown-publish-github-pages/).
# I was excited about the concept but wanted to automate a few of the production steps: namely generating the HTML files
# for the site from the RMD pages (which Aleszu describes doing one-by-one) and generating the site navigation menu,
# which Aleszu handcodes in the `_site.yml` file. This script should automate both processes, though it may have some quirks
# unique to my setup that you'd want to tweak to fit your own. It's likely more loquacious than necessary as well, so feel free
# to condense as you can. Ideally, each time you make updates to your RMD files you can run this script to generate updated HTML
# pages and a new `_site.yml`. Then commit changes to Github and you're up and running!
# Once you've got everything configured for your own site below, you should be able to run `source('rend
@wcaleb
wcaleb / empathy.md
Last active August 29, 2015 14:14
Draft Rubric for Empathy

3. Empathy

Look for the potential strengths and insights offered by alternative points of view on or in the past, even or especially when they conflict with your own or conventional understandings.

Empathy is an intellectual and imaginative skill that is required both when reading sources created in the past and when reading secondary sources created by other historians. Though often confused with "sympathy" or "positive feeling," empathy means understanding and entertaining even those points of view with which you disagree; it does not require or necessarily imply agreement.

A novice historian who lacks this skill tends to judge the decisions and ideas of historical actors according to his or her own present-day opinions, which are sometimes conflated in the novice's mind with "common sense" or "just the way it is." Beginners are typically not very interested in seeking out multiple perspectives on an issue; they identify the actor or historian whose perspective they most agree with, and then disco

@wcaleb
wcaleb / inlinenotes.py
Last active December 29, 2020 06:59
Pandoc filter to convert all notes to inline notes in Pandoc Markdown output
#!/usr/bin/env python
from pandocfilters import toJSONFilter, RawInline, Space, Str, walk
"""
Pandoc filter for Markdown that converts most endnotes into
Pandoc's inline notes. If input notes had multiple paragraphs,
the paragraphs are joined by a space. But if an input note
had any blocks other than paragraphs, the note is left as is.
"""
@wcaleb
wcaleb / chicago-wcm.csl
Created April 26, 2014 19:51
my modified Chicago CSL file
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>Chicago Manual of Style (full note, no Ibid.)</title>
<id>http://www.zotero.org/styles/chicago-fullnote-bibliography-no-ibid</id>
<link href="http://www.zotero.org/styles/chicago-fullnote-bibliography-no-ibid" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
@lmullen
lmullen / shapefile.r
Last active January 26, 2022 22:07
How I use shapefiles in R with ggplot2 and RGDAL
library(rgdal) # R wrapper around GDAL/OGR
library(ggplot2) # for general plotting
library(ggmaps) # for fortifying shapefiles
# First read in the shapefile, using the path to the shapefile and the shapefile name minus the
# extension as arguments
shapefile <- readOGR("path/to/shapefile/", "name_of_shapefile")
# Next the shapefile has to be converted to a dataframe for use in ggplot2
shapefile_df <- fortify(shapefile)
@mdml
mdml / README.md
Last active March 30, 2023 16:30
Dendrograms: Convert from Scipy to D3

A dendrogram is a common way to represent hierarchical data. For Python users, Scipy has a hierarchical clustering module that performs hierarchical clustering and outputs the results as dendrogram plots via matplotlib. When it's time to make a prettier, more customized, or web-version of the dendogram, however, it can be tricky to use Scipy's dendrogram to create a suitable visualization. My preferred method of visualizing data -- especially on the web -- is D3. This example includes a script to convert a Scipy dendrogram into JSON format used by D3's cluster method.

In the example, I cluster six genes by their expression values from two experiments. You can easily replace that data with your own, larger data set, to harness the power of both Scipy and D3 for analyzing hierarchical data. The D3 code I used to generate this example is straigh

@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@lmullen
lmullen / ToggleFootnoteJumping.vim
Created April 3, 2013 13:47
Jump between footnote markers with Vim's * key
" Find related Pandoc footnote numbers
" -------------------------------------------------------------------
" Vim's * key searches for the next instance of the word under the
" cursor; Vim decides what counts as the boundary of a word with the
" iskeyword option. This function toggles the special characters of a
" Pandoc footnote in the form [^1] to allow you to jump between
" footnotes with the * key.
nnoremap _fn :call ToggleFootnoteJumping()<CR>
function! ToggleFootnoteJumping()
if exists("g:FootnoteJumping")