static float floatvar = 12345.67; | |
static char sprintfbuffer[15]; | |
static char dtostrfbuffer[15]; | |
void setup() { | |
sprintf(sprintfbuffer,"%f", floatvar); | |
dtostrf(floatvar,8, 2, dtostrfbuffer); | |
Serial.begin(9600); | |
Serial.print("sprintf: "); |
{ | |
"// my options for SublimeLinter " : "//", | |
"jshint_options" : { | |
"boss": true, | |
"browser": true, | |
"curly": false, | |
"devel": true, | |
"eqeqeq": false, | |
"eqnull": true, |
# Python 2.7.3 (default, Apr 20 2012, 23:04:22) [GCC 4.6.3] | |
# Use plot() to plot lists or arrays | |
# Use print to show results in the command line history | |
from numpy import sin, cos, pi | |
def f(s,itr): | |
xo=0 | |
yo=0 | |
a=0 |
var myURL="mydomain.com"; | |
var restifyOptions={} | |
restifyOptions.certificate = fs.readFileSync('PathTo:fullchain.pem'); | |
restifyOptions.key = fs.readFileSync('PathTo:privkey.pem'); | |
var server = restify.createServer(restifyOptions); | |
var nonSecure = restify.createServer({name: 'redirectToSSL'}); | |
nonSecure.get(/.*/,function (req, res, next) { | |
res.redirect(301, 'https://' + myURL + req._url.href, next); |
First your need plotly npm package, and a plotly account.
npm install plotly
export PLOTLY_USERNAME=<plotly-username>
export PLOTLY_APIKEY=<plotly-apikey>
export MAPBOX_ACCESS_TOKEN=<your-mapbox-token>
To generate a image:
curl --silent "https://api.mapbox.com/analytics/v1/accounts/?period=2016-01-01,2016-04-29&access_token=$MAPBOX_ACCESS_TOKEN" | ./render-image.js > chart.png
Your API does REST, but can it SLEEP?
SLEEP (Syncable Lightweight Event Emitting Persistence) is an emerging standard for distributed data sync using HTTP and JSON. A generalized version of CouchDB's much lauded built-in replication, SLEEP extends the REST architecture to define a way in which databases can offer syncable JSON APIs that foster open data innovation by allowing developers to replicate entire databases over the net.
SLEEP comes from the Apache CouchDB project which is now widely known for it's multi-master streaming HTTP + JSON replication. This is possible in part because of the CouchDB _changes feed, which is a particular API that lets you see if there have been any changes made to the database since last time you synchronized. CouchDB can efficiently implement the _changes feed because of one subtle difference between it and most other databases: it stores a history of all changes that happen to the database, including deletes.
If you synchronize data from a remote source and then the
### generate questionnaire data | |
library(triangle) | |
set.seed(0) | |
q1_d1 <- round(rtriangle(1000, 1, 7, 5)) | |
q1_d2 <- round(rtriangle(1000, 1, 7, 6)) | |
q1_d3 <- round(rtriangle(1000, 1, 7, 2)) |
#!/usr/bin/env python | |
# | |
# Copyright 2009 Empeeric LTD. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
begin | |
require 'terminal-notifier' | |
module Jekyll | |
class Site | |
alias jekyll_process process | |
def process | |
jekyll_process | |
TerminalNotifier.notify('Jekyll rebuild finished.') | |
end | |
end |