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
curl -v --user username:password 'https://localhost:8443/zoomdata/service/upload?source=API%20Test' \ | |
-X POST \ | |
-H 'Content-Type: application/json' \ | |
-d '{"product":"widget", "price":"19.95", "quantity":10}' \ | |
--insecure |
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 requests, json | |
headers = {'Content-type': 'application/json'} | |
params = {'source':'API Test'} | |
data = {"product":"widget", "price":"19.95", "quantity":10} | |
url = "https://localhost:8443/zoomdata/service/upload" | |
r = requests.post(url, data=json.dumps(data), headers=headers, params=params, auth=('username', 'password'), verify=False) |
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 requests | |
r = requests.get('http://craigslist.com') | |
print r.status_code #200 is printed because Craigslist has no idea who you are | |
r = requests.get('http://craigslist.com', headers={'User-Agent': 'AppEngine-Google'}) | |
print r.status_code #404 is printed because Craigslist doesn't like you |
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
product | price | quantity | |
---|---|---|---|
widget1 | 19.95 | 10 | |
widget2 | 24.00 | 20 | |
widget1 | 12.00 | 40 |
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
// ©2013 Zoomdata, Inc. All Rights Reserved. | |
$(document).ready( function() { | |
$("#timeControls").hide(); | |
$("head").append("<style>"); | |
css = $("head").children(":last"); | |
css.attr({ | |
type: "text/css" | |
}); | |
cssString = '.axis path, .axis line {' + |
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
// ©2013 Zoomdata, Inc. All Rights Reserved. | |
CurrentVisualizationController = (function (){ | |
var Datum = Backbone.Model.extend({ | |
defaults: { | |
} | |
}); | |
var Graph = Backbone.Collection.extend({ |
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
// Set up initial code for visualization | |
var svg = d3.select(controller.element).append("svg") | |
.attr("width", "100%").attr("height", "100%") | |
.append("g") | |
.attr("transform", "translate(10,10)"); | |
// This function receives a JS Array of JS Objects | |
// representing the current state of your data. | |
controller.update = function (data) { | |
// Join new data with old elements, if any. |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
html { | |
-webkit-user-select: none; /* Chrome all / Safari all */ | |
-moz-user-select: none; /* Firefox all */ | |
-ms-user-select: none; /* IE 10+ */ | |
/* No support for these yet, use at own risk */ | |
-o-user-select: 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
/* | |
* This example illustrates listening to the window resize event and triggering a visualization to be resized. | |
*/ | |
var visualization, | |
el = document.getElementById('visualization'); | |
var zoomdataClient = new ZoomdataClient({ | |
apiKey: 'YOUR API KEY', | |
host: 'localhost:8080/zoomdata', |
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
declare module 'react-joyride' { | |
import * as React from "react"; | |
export default class Joyride extends React.Component<Props, State> { | |
constructor(props: Props); | |
reset(restart?: boolean): void; | |
next(): void; | |
back(): void; | |
addTooltip(data: Step): void; |