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 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 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
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
""" | |
Parse markdown list items (such as FAQ) into a TOC | |
Usage: | |
python list_toc_generator.py <markdown_file, markdow_file...> | |
""" | |
import re | |
import sys |
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
https://d396qusza40orc.cloudfront.net/posaconcurrency/slides/S0-P1-MOOC-organization-and-topics.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/slides/S0-P3-MOOC-prereqs-and-learning-strategies.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S1-M1-P1-concurrency-motivations.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S1-M1-P2-concurrency-challenges.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S0-P4-overview-of-patterns-and-frameworks.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/2014-PDFs/S0-P5-overview-of-patterns-and-frameworks-pt2.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s1.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s2.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s3.pdf | |
https://d396qusza40orc.cloudfront.net/posaconcurrency/lecture_slides/android-layers-s4.pdf |
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
import os | |
import sys | |
from django.conf import settings | |
import django | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'app.tests.test_settings' | |
try: | |
from django.test.utils import get_runner | |
TestRunner = get_runner(settings) |
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
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 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
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 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
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 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
[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 |
OlderNewer