Skip to content

Instantly share code, notes, and snippets.

View paulgribble's full-sized avatar

Paul Gribble paulgribble

View GitHub Profile
@nitely
nitely / rpn.py
Last active December 18, 2020 23:03
Python shunting-yard algorithm
# LICENSE: MIT
import collections
RIGHT, LEFT = range(2)
Op = collections.namedtuple('Op', [
'precedence',
'associativity'])
@max-mapper
max-mapper / bibtex.png
Last active November 6, 2024 09:03
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active May 8, 2025 14:50
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
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.
@EderSantana
EderSantana / CATCH_Keras_RL.md
Last active June 22, 2024 17:07
Keras plays catch - a single file Reinforcement Learning example
@pdarragh
pdarragh / Jekyll Static Highlighting Navigation Menu.md
Last active November 24, 2024 21:49
Jekyll navigation bar with automatic highlighting.

Jekyll NavBar

In building a site powered by Jekyll and hosted by GitHub, I wanted the ability to highlight the current page's tab in the bar. I also wanted the bar to support second-level items (i.e. a dropdown), which proved somewhat tricky. This is the solution I arrived at after a few hours of fiddling around.

Construction

The contents of the navigation bar are contained in a data file located at _data/navigation.yml. This makes it accessible via the site-wide Liquid element {{ site.data.navigation}}. You can see the file for the formatting I used.

How it Works

@dashed
dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@postmodern
postmodern / comment.md
Last active January 11, 2024 15:37
Crypto Privacy Copy Pasta
@paulgribble
paulgribble / install.sh
Created September 10, 2012 17:45
ubuntu install LaTeX
#!/bin/sh
# LaTeX
echo "installing LaTeX"
sudo apt-get -qq install texlive-full texlive-fonts-extra cm-super texlive-latex-extra auctex
sudo texconfig paper letter
wget http://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
chmod +x install-getnonfreefonts
sudo ./install-getnonfreefonts
sudo getnonfreefonts garamond
@paulgribble
paulgribble / install.sh
Created September 10, 2012 17:44
ubuntu install python scientific stack
#!/bin/sh
echo "updating ubuntu"
sudo apt-get -qq update
sudo apt-get -qq upgrade
# development
echo "installing development tools"
sudo apt-get -qq install build-essential