Skip to content

Instantly share code, notes, and snippets.


Alex Holachek aholachek

View GitHub Profile
aholachek / gist:dcb0400c7b72078f6671
Created Sep 23, 2014
Querying solr using requests library
View gist:dcb0400c7b72078f6671
SOLR_PATH = 'http://localhost:9000/solr/select/'
def query_solr(q = '', start = 0, rows = 200, fl = 'bibcode,title,recid,citation_count,year,property', sort = "date desc"):
d = {'q' : q,
'sort': sort,
'fl' : fl,
'start' : start,
'rows' : rows,
aholachek / flare.json
Last active Jan 19, 2016
draggable partition
View flare.json
"name": "flare",
"children": [
"name": "analytics",
"children": [
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
aholachek /
Last active Feb 22, 2016
Calendar Day View Layout

##D3 Calendar Day View Layout

This script demonstrates a layout algorithm I developed for a day calendar view. The height and y-axis placement of each calendar item are solely determined by its start and end times, but the width and x-axis placement of each item is dependent on how many other items occur during the same time as it.

You can change the layout by adding items using the form to the left, or clicking on items to remove them.

###There are three main steps for the layout calculation:

aholachek /
Last active Jul 10, 2018
Sankey with animated gradient links
aholachek /
Last active May 25, 2016
Accessible D3 Line Chart with the HTML Audio API + JQuery DataTables

Please use the "open block" link to the right to open in a new window, as the current view cuts off an important section of the page.

View hopper-widget.js
], function(
aholachek / gist:3b3c80b4e3726880f8f86dfd7173d626
Last active Dec 9, 2016
Better HTML Starter Snippet for Atom
View gist:3b3c80b4e3726880f8f86dfd7173d626
".text.html, .text.php":
"prefix": "html"
"body": """
<!DOCTYPE html>
<html lang="en-us" class="no-js">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="utf-8">
aholachek / sample_snippets.cson
Last active Apr 6, 2017
Sample snippets.cson for Atom
View sample_snippets.cson
"Mocha it()":
"prefix": "it("
"body": "it('$1', () => {$2})"
"functional component":
"prefix": "functional component"
"body": """
import React, {PropTypes} from 'react'
aholachek / .script-compiled.js
Last active May 21, 2017
Continuous Scale Exploration
View .script-compiled.js
var svg ='svg')
var margin = {top: 40, right: 40, bottom: 40, left: 40}
var width = svg.attr('width') - margin.left - margin.right
var height = svg.attr('height') - - margin.bottom
var g = svg.append('g').attr('transform', 'translate(' + margin.left + ',' + + ')')
var data = d3.range(100000).map(function (n){
if (n % 1000 === 0){
return { x : n, y : n}