The code shown is a simple Python example of pulling data from a SQL database supported by SQLAlchemy, and then injecting the data as new JSON document into a collection of Watson Discovery Service on IBM Cloud.
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
# Masked wordcloud | |
# ================ | |
# Using a mask you can generate wordclouds in arbitrary shapes. | |
import sys, getopt | |
from os import path | |
from PIL import Image | |
import numpy as np | |
import random | |
import matplotlib.pyplot as plt |
Flow to automatically respond to tweets in Twitter. If the tag "archive" is used, then the incoming tweet is stored in the DB2-based sqldb service. A simple Web service is provided to retrieve the archived tweets from DB2.
To work, the table "twitarchive" needs to be created.
create table twitarchive(
id int generated always as identity,
tstamp timestamp,
tweet varchar(200),
username varchar(100)
This flow uses the sipgate.io service of German phone company Sipgate to get notified about incoming calls. The from/to (who is calling which number) information is logged in a Cloudant database and a SMS is sent out using the Twilio service.
All was created on the IBM Bluemix service with a free trial account. http://bluemix.net
More information in this blog entry: http://blog.4loeser.net/2014/10/nodered-simple-phoney-json-entries-in.html
NewerOlder