Bubble charts encode data in the area of circles. Although less perceptually-accurate than bar charts, they can pack hundreds of values into a small space. Implementation based on work by Jeff Heer. Data shows the Flare class hierarchy, also courtesy Jeff Heer.
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
import pkg_resources, os | |
def requirements_versions(req_file=None): | |
path = req_file | |
if path and not os.path.exists(path) or not path: | |
path = 'base_requirements.txt' | |
elif not os.path.exists(path): | |
path = 'req.txt' | |
elif not os.path.exists(path): | |
return None |
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
$('#form').submit(function() { | |
payload = $(this).serialize(); | |
$.ajax({ | |
url: 'http://', | |
type: 'POST', | |
data: payload, | |
dataType: 'jsonp' | |
success: function(data){ | |
// present success message here | |
} |
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
import sys | |
def info(type, value, tb): | |
if hasattr(sys, 'ps1') or not sys.stderr.isatty(): | |
# we are in interactive mode or we don't have a tty-like | |
# device, so we call the default hook | |
sys.__excepthook__(type, value, tb) | |
else: | |
import traceback, pdb | |
# we are NOT in interactive mode, print the exception... |
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
function getTradeDayPercent() { | |
// calculate the percent of time passed since trade opened in sydney | |
gmtoffset = (new Date).getTimezoneOffset() * 60 * 1000; | |
now = Date.now() + gmtoffset; | |
today = new Date(now).set({hour: 0, minute: 0, second: 0}); | |
midnight = today.getTime() | |
hour = parseInt((now - midnight) / 1000 / 60 / 60); | |
if (hour < 17) today.addDays(-1); | |
gmt5 = today.set({hour: 17}); | |
return ((now - gmt5.getTime() + gmtoffset) / 864000); |
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
[mysqld] | |
default-character-set=utf8 | |
default-collation=utf8_general_ci | |
character-set-server=utf8 | |
collation-server=utf8_general_ci | |
init-connect='SET NAMES utf8' | |
[client] | |
default-character-set=utf8 |
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/env python | |
# | |
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved. | |
# | |
# Permission to use, copy, modify, and distribute this software and its | |
# documentation for any purpose and without fee is hereby granted, | |
# provided that the above copyright notice appear in all copies and that | |
# both that copyright notice and this permission notice appear in | |
# supporting documentation, and that the name of Vinay Sajip | |
# not be used in advertising or publicity pertaining to distribution |
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
""" | |
Welcome to github candidate finder! | |
Note: Current github api hardcode limit for searches is 1000 results | |
Valid arguments are either: | |
a. set the CREDS tuple in the code or, | |
b. pass one of the following: | |
* A github OAUTH_TOKEN | |
* A valid set of credentials (<Username>, <Password>) with which we'll |
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 django.db import models | |
app_names = [] | |
excuded = ['SomeModel', ...] | |
for app in models.get_apps(): | |
for model_class in models.get_models(app): | |
if model_class.__name__ in : | |
continue |
The tree
layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.
Compare to this Cartesian layout.
This fork uses DS locations connections as data + link to a live jsfiddle example
OlderNewer