Tutorial by Examples

Training a custom classifier requires a corpus of images organized into groups. In this example, I have a bunch of images of apples in one ZIP file, a bunch of images of bananas in another ZIP file, and a third group of images of things that are not fruits for a negative set. Once a custom classif...
'use strict'; let watson = require('watson-developer-cloud'); let fs = require('fs'); var visualRecognition = watson.visual_recognition({ version: 'v3', api_key: process.env.API_KEY, version_date:'2016-05-19' }); let classifier_id_to_delete = 'TheNameofMyClassifier_485506080'; ...
Prerequisites First, you have to install the watson-developer-cloud SDK. $ npm install watson-developer-cloud Classify an image URL We'll use an image of Captain America from Wikipedia. 'use strict'; let watson = require('watson-developer-cloud'); var visualRecognition = watson.visual...
The following examples use the Item Sales and Customers sample databases. Note: The BETWEEN operator is inclusive. Using the BETWEEN operator with Numbers: SELECT * From ItemSales WHERE Quantity BETWEEN 10 AND 17 This query will return all ItemSales records that have a quantity that is gr...
The examples below fill in a PhoneNumber for any Employee who is also a Customer and currently does not have a phone number set in the Employees Table. (These examples use the Employees and Customers tables from the Example Databases.) Standard SQL Update using a correlated subquery: UPDATE ...
Scollector binaries for Windows, Mac, and Linux are available from the Bosun release page and can be saved to /opt/scollector/ or C:\Program Files\scollector\. The Scollector configuration file uses TOML v0.2.0 to specify various settings and defaults to being named scollector.toml in the same folde...
On Windows you can install Scollector as a service using the -winsvc="install" flag. On Mac and Linux you must manually create a service or init script. For example here is a basic systemd unit file: #Scollector unit file saved to /etc/systemd/system/scollector.service [Unit] Descriptio...
#Example of a PowerShell external collector. See http://bosun.org/scollector/external-collectors for details #This file should be saved in C:\Program Files\scollector\collectors\0\mymetrics.ps1 since it is a continuous output script #scollector.toml should have ColDir = 'C:\Program Files\scollecto...
The following can be saved as main.go. After you update the EDITME settings and build the executable it can be used as a continuous external collector. package main import ( "fmt" "log" "net/url" "strconv" "time" &...
This is a continuous collector that uses the hadoop fs -du -s /hbase/* command to get details about the HDFS disk usage. This metric is very useful for tracking space in an OpenTSDB system. #!/bin/bash while true; do while read -r bytes raw_bytes path; do echo "hdfs.du $(date +&...
Scollector will monitor Linux processes specified in the configuration file. [[Process]] Command = "/opt/bosun/bosun" Name = "bosun" [[Process]] Command = "ruby" Name = "puppet-agent" Args = "puppet" [[Process]] Command = &qu...
Scollector will monitor any Windows processes or services specified in the configuration file. [[Process]] Name = "^scollector" [[Process]] Name = "^chrome" [[Process]] Name = "^(MSSQLSERVER|SQLSERVERAGENT)$"
You can neatly group your options within a selection menu in order to provide a more structured layout in a long list of options by using the <optgroup> element. The syntax is very basic, by simply using the element with a label attribute to identify the title for the group, and containing ze...
The options inside a selection menu are what the user will be selection. The normal syntax for an option is as follows: <option>Some Option</option> However, it's important to note that the text inside the <option> element itself is not always used, and essentially becomes the ...
The following Go file can be compiled into a continuous external collector that will query a MSSQL server database that uses the StackExchange.Exceptional schema. It will query multiple servers/databases for all exceptions since UTC 00:00 to convert the raw entries into a counter. It also uses the b...
Scollector can also monitor any Windows processes using the .NET framework. If no ProcessDotNet settings are specified it will default to just monitoring the w3wp worker processes for IIS. You can specify which applications to monitor in the configuration file. [[ProcessDotNet]] Name = "^w3...
The following demo features an <output> element's use of the [for] and [form] attributes. Keep in mind, <output> needs JavaScript in order to function. Inline JavaScript is commonly used in forms as this example demonstrates. Although the <input> elements are type="number&quot...
<output name="out1" form="form1" for="inp1 inp2"></output>
NSLog(@"Log Message!"); NSLog(@"NSString value: %@", stringValue); NSLog(@"Integer value: %d", intValue); The first argument of NSLog is an NSString containing the log message format. The rest of the parameters are used as values to substitute in place of the forma...
NSLog(@"NSLog message"); printf("printf message\n"); Output: 2016-07-16 08:58:04.681 test[46259:1244773] NSLog message printf message NSLog outputs the date, time, process name, process ID, and thread ID in addition to the log message. printf just outputs the message. N...

Page 91 of 1336