Paprika doesn't have their API documented, so this is me reverse-engineering it from an Android device
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
# 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 |
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
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'); |
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.
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
#!/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 | |
---------------------------------------- |
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
# 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 |
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
<?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> |
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
# | |
# 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 | |
# |
The series hover interactivity uses the technique from lgrammel seen here: http://bl.ocks.org/1963983
It isn't necessarily a tooltip, but data is displayed by inverting the x-axis value into a date, and mapping the date to the corresponding data value for the series.