For continuous data such as time series, a streamgraph can be used in place of stacked bars. This example also demonstrates path transitions to interpolate between different layouts. Streamgraph algorithm, colors, and data generation inspired by Byron and Wattenberg.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Python script for automated compilation of .less files | |
Author: Jesse the Game | |
Usage: python autolessc.py <infile> <outfile> | |
Parse infile for dependencies, then compile less code into the outfile. | |
From then on, the script periodically check for modifications on dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .http import statuses | |
def Foo(Resource): | |
def get(request): | |
try: | |
something = api.do_something() | |
except api.Timeout: | |
request.response['So'] = 'many' # with the response attached to the request | |
request.response_headers['options'] = 'available' # or just the headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lego { | |
.X(@n, @greedy: false) {#raster > .X(@n, @greedy)} | |
.Y(@n, @greedy: false) {#raster > .Y(@n, @greedy)} | |
.Z(@n, @start, @var: true) {#shadow-stack > .Z(@n, @start, @var)} | |
// Walls (push an area up or down) | |
//////////////////////////////////////////////////////////// | |
.wall(@n, @color, @side-color) when not (@side-color) { | |
background-color: @color; | |
#shadow-stack > .box(@n, @color, @side-color); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* taken from http://www.wprecipes.com/disable-wordpress-automatic-formatting-on-posts-using-a-shortcode | |
* | |
* [raw] tag allows for raw html in pages as shortcode. | |
*/ | |
function my_formatter($content) { | |
$new_content = ''; | |
$pattern_full = '{(\[raw\].*?\[/raw\])}is'; | |
$pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; | |
$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/moduleA | |
index.js | |
require('coffee-script/register') | |
require('./src') | |
extensions.js | |
require('coffee-script/register') | |
require('./src/extensions') | |
/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint semi: [2, "never"] */ | |
var STORY_COUNT = 45 // [34, 48, 48, 31, 45, 36, 43, 38, 40, 34] | |
var HELPERS = range(0, 3) | |
var LENGTHS = range(3, 12) | |
var ALPHABET = 26 // Needs per country | |
var HELPER_COUNT = 3 | |
var DIVERSITY = 6 // OR: [6, 6, 2, 2, 2, 2, 2, 2, 2, 2] | |
function range(start, end) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX = clang++ | |
VERSION = | |
EXEC = sketch | |
FLAGS = -Wall -Werror -Wextra | |
LDDFLAGS = -L/usr/local/opt/opencv3/lib | |
LIBS = -lopencv_core.3.0 -lopencv_imgproc.3.0 -lopencv_imgcodecs.3.0 | |
CPPFLAGS = -I/usr/local/opt/opencv3/include | |
OBJS = sketch.o | |
build: $(OBJS) |