Fork of Wrapping Long Labels.
The difference is that we do a join to create the tspans, so that they have their own __data__
, in case we want to use it. Here I color them based on their text length.
# | |
# Hydrogen is a lightweight GUI framework for Pythonista | |
# | |
# Hydrogen - https://gist.github.com/BashedCrab/5924965 | |
# | |
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019 | |
# | |
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776 | |
# |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>SKVariables</key> | |
<array> | |
<dict> | |
<key>enabled</key> | |
<true/> | |
<key>name</key> |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
#!/bin/bash | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
Fork of Wrapping Long Labels.
The difference is that we do a join to create the tspans, so that they have their own __data__
, in case we want to use it. Here I color them based on their text length.
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); // skip this if you're working with vanilla CSS | |
var rename = require('gulp-rename'); | |
var cmq = require('gulp-combine-media-queries'); | |
var uncss = require('gulp-uncss'); | |
var download = require('download'); | |
var cssmin = require('gulp-cssmin'); | |
var clean = require('gulp-clean'); | |
var xml2js = require('gulp-xml2js'); |
# Step 1: Get list of any Wikidata item with NPG ID and anything that is a subclass of chemical hazard | |
# Step 2: Iterate through each item for invoked items and properties | |
# (for claim in claims; for subclaim in claim: 'Q' + str(subclaim['mainsnak']['data-value']['value']['numeric-id']) | |
# and subclaim['mainsnak']['property'] where claim[0]['datatype'] == 'wikibase-item') | |
# Step 3: De-duplicate to generate exhaustive list of each item/property of interest to NIOSH | |
# Step 4: Check labels: en, es, zh, fr, de | |
# Step 5: Prepare HTML table that lists each item/property of interest, highlighting cells where values are missing | |
# Step 6: Take percentages of coverage in each language; save to a timestamped log | |
import requests |
Paprika doesn't have their API documented, so this is me reverse-engineering it from an Android device
Transitioning between a sunburst and an icicle chart while preserving the chart dimensions by interpolating the difference in perimeter between the inner section and outer section until the difference is near zero.
Chrome currently has a rendering bug once the arcs' radii get really extreme, so this stops at about an 8-pixel difference.