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
@PixiedustDisplay(isDefault=True) | |
class TableDisplayMeta(DisplayHandlerMeta): | |
@addId | |
def getMenuInfo(self,entity, dataHandler): | |
if dataFrameMisc.isPySparkDataFrame(entity) or dataFrameMisc.isPandasDataFrame(entity): | |
return [ | |
{"categoryId": "Table", "title": "DataFrame Table", "icon": "fa-table", "id": "dataframe"} | |
] | |
elif dataFrameMisc.fqName(entity) == "graphframes.graphframe.GraphFrame": | |
return [ |
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 request = require('superagent'); | |
// Replace these 3 variables with your own information | |
// Note: The database must be world readable | |
const CLOUDANT_ACCOUNT = 'opendata'; | |
const CLOUDANT_DB = 'pois'; | |
const GEO_INDEX = '_design/idx/_geo/spatial'; | |
for (var index = 0; index < 500; index++) { | |
runQuery(index) |
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
# Deletes documents returned from a view named 'badones' in a design document named 'logging' | |
# The view must emit doc._id as the key. Here's an example design document | |
# function (doc) { | |
# var badword = 'mistake'; | |
# if (doc.anotherprop && doc.anotherprop.substr(0, badword.length) === badword) { | |
# emit(doc._id, doc.anotherprop); | |
# } | |
# } | |
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
import os | |
from cloudant import cloudant | |
from cloudant.client import Cloudant | |
from cloudant.document import Document | |
CLOUDANT_USERNAME = os.getenv('CLOUDANT_USERNAME', 'myusername') | |
CLOUDANT_PW = os.getenv('CLOUDANT_PW', 'mypw') | |
CLOUDANT_DB = 'mydb' | |
PROPS = ['rec','r','h','m','s','idts','idvc','idn','refts'] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<title>Cloudant/CouchDB Changes Listener</title> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>PouchDB write test</title> | |
</head> | |
<body> | |
<div class="container-fluid"> | |
<h1>PouchDB write test</h1> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"docs": [ | |
{ | |
"geometry": { | |
"coordinates": [ | |
-71.05987446, | |
42.28339928 | |
], | |
"type": "Point" | |
}, |