Designed by Stephen Few, a bullet chart “provides a rich display of data in a small space.” A variation on a bar chart, bullet charts compare a given quantitative measure (such as profit or revenue) against qualitative ranges (e.g., poor, satisfactory, good) and related markers (e.g., the same measure a year ago). Layout inspired by Stephen Few. Implementation based on work by Clint Ivy, Jamie Love of N-Squared Software and Jason Davies. The "update" button randomizes the values slightly to demonstrate transitions.
This file contains hidden or 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 urllib import quote | |
| from string import ascii_lowercase | |
| from operator import itemgetter | |
| import os | |
| import random | |
| import requests | |
| from datetime import datetime | |
| from lib.languages import LANGUAGES, get_language_by_name | |
| from lib.utils import format_timedelta |
This file contains hidden or 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
| db.foo.drop(); | |
| db.foo.insert( { actor: "Richard Gere", movies: ['Pretty Woman', 'Runaway Bride', 'Chicago'] }) | |
| db.foo.insert( { actor: "Julia Roberts", movies: ['Pretty Woman', 'Runaway Bride', 'Erin Brockovich'] }) | |
| map = function() { | |
| for(var i in this.movies){ | |
| key = { movie: this.movies[i] }; | |
| value = { actors: [ this.actor ] }; | |
| emit(key, value); | |
| } |
This file contains hidden or 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
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // | |
| // the regular expression composed & commented | |
| // could be easily tweaked for RFC compliance, | |
| // it was expressly modified to fit & satisfy | |
| // these test for an URL shortener: |
This file contains hidden or 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
| /* | |
| * Copyright (c) 2010 Tobias Schneider | |
| * This script is freely distributable under the terms of the MIT license. | |
| */ | |
| (function(){ | |
| var UPC_SET = { | |
| "3211": '0', | |
| "2221": '1', | |
| "2122": '2', |
NewerOlder