Skip to content

Instantly share code, notes, and snippets.

View wrobstory's full-sized avatar

Rob Story wrobstory

View GitHub Profile
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@mbostock
mbostock / README.md
Last active June 7, 2023 18:33
Underscore’s Equivalents in D3

Collections

each(array)

Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
@marcprux
marcprux / index.html
Last active December 16, 2015 15:29
<html>
<head>
<title>Vega Object Constancy Issue Demo</title>
<script src="http://trifacta.github.com/vega/d3.v3.min.js"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
</head>
<body>
<div id="vis"></div>
</body>
<script type="text/javascript">
@marcprux
marcprux / index.html
Created April 25, 2013 16:53
Resizable stacked bar chart using vega+d3+svg
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Visualization</title>
<meta
charset="UTF-8" />
<meta
http-equiv="Content-type"
content="text/html;charset=UTF-8" />
@kwmsmith
kwmsmith / pairwise_cython.pyx
Last active August 12, 2022 04:25
Numba vs. Cython: Parallel Cython with OMP
#cython:boundscheck=False
#cython:wraparound=False
import numpy as np
from cython.parallel cimport prange
from libc.math cimport sqrt
cdef inline double dotp(int i, int j, int N, double[:, ::1] X) nogil:
cdef:
int k
@mplewis
mplewis / flask-uwsgi-nginx-primer.md
Last active October 24, 2022 19:20
Flask + uWSGI + nginx Primer. I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.
[{"0500000US33009": 4.5, "0500000US38041": 3.5, "0500000US38043": 6.4, "0500000US39069": 9.7, "0500000US38045": 3.0, "0500000US38047": 3.0, "0500000US33001": 5.6, "0500000US33000": 5.4, "0500000US33003": 5.4, "0500000US33005": 5.3, "0500000US47159": 9.4, "0500000US33007": 7.6, "0500000US19175": 5.5, "0500000US19177": 7.1, "0500000US46095": 5.8, "0500000US19171": 6.9, "0500000US19173": 4.6, "0500000US24045": 9.0, "0500000US24047": 12.2, "0500000US24510": 10.5, "0500000US19179": 7.6, "0500000US48373": 9.7, "0500000US24043": 9.8, "0500000US46093": 5.0, "0500000US55103": 7.0, "0500000US46091": 6.6, "0500000US26009": 12.3, "0500000US31183": 3.6, "0500000US31181": 4.4, "0500000US31185": 4.5, "0500000US49041": 7.4, "0500000US49043": 6.1, "0500000US39067": 10.3, "0500000US49047": 5.1, "0500000US56000": 6.0, "0500000US18155": 7.0, "0500000US18157": 7.7, "0500000US18151": 10.2, "0500000US18153": 10.1, "0500000US29021": 7.4, "0500000US55029": 10.6, "0500000US29023": 8.2, "0500000US18159": 10.3, "0500000US29027": 7.5, "0
@debasishg
debasishg / gist:8172796
Last active May 10, 2024 13:37
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@jrmontag
jrmontag / git-branch-prompt
Last active August 29, 2015 13:56
git branch in prompt (minimal working example)
# (ubuntu)
# add to end of .bashrc :
export PS1="\$(__git_ps1) "$PS1
# gives e.g. (when in a repo):
(master) user@host:~$
# more info: http://stackoverflow.com/questions/15883416/adding-git-branch-on-the-bash-command-prompt