Cloud Vision V1 API - Class Google::Cloud::Vision::V1::ImageAnnotator::Client (v0.6.4)
Reference documentation and code samples for the Cloud Vision V1 API class Google::Cloud::Vision::V1::ImageAnnotator::Client.
Client for the ImageAnnotator service.
Service that performs Google Cloud Vision API detection tasks over client images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service returns detected entities from the images.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ImageAnnotator Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ImageAnnotator clients ::Google::Cloud::Vision::V1::ImageAnnotator::Client.configure do |config| config.timeout = 10.0 end
#async_batch_annotate_files
def async_batch_annotate_files(request, options = nil) -> ::Gapic::Operation
def async_batch_annotate_files(requests: nil, parent: nil) -> ::Gapic::Operation
Run asynchronous image detection and annotation for a list of generic
files, such as PDF files, which may contain multiple pages and multiple
images per page. Progress and results can be retrieved through the
google.longrunning.Operations
interface.
Operation.metadata
contains OperationMetadata
(metadata).
Operation.response
contains AsyncBatchAnnotateFilesResponse
(results).
def async_batch_annotate_files(request, options = nil) -> ::Gapic::Operation
async_batch_annotate_files
via a request object, either of type
AsyncBatchAnnotateFilesRequest or an equivalent Hash.
- request (::Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def async_batch_annotate_files(requests: nil, parent: nil) -> ::Gapic::Operation
async_batch_annotate_files
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- requests (::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest, ::Hash>) — Required. Individual async file annotation requests for this batch.
-
parent (::String) — Optional. Target project and location to make a call.
Format:
projects/{project-id}/locations/{location-id}
.If no parent is specified, a region will be chosen automatically.
Supported location-ids:
us
: USA country only,asia
: East asia areas, like Japan, Taiwan,eu
: The European Union.Example:
projects/project-A/locations/eu
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new # Call the async_batch_annotate_files method. result = client.async_batch_annotate_files request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#async_batch_annotate_images
def async_batch_annotate_images(request, options = nil) -> ::Gapic::Operation
def async_batch_annotate_images(requests: nil, output_config: nil, parent: nil) -> ::Gapic::Operation
Run asynchronous image detection and annotation for a list of images.
Progress and results can be retrieved through the
google.longrunning.Operations
interface.
Operation.metadata
contains OperationMetadata
(metadata).
Operation.response
contains AsyncBatchAnnotateImagesResponse
(results).
This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
def async_batch_annotate_images(request, options = nil) -> ::Gapic::Operation
async_batch_annotate_images
via a request object, either of type
AsyncBatchAnnotateImagesRequest or an equivalent Hash.
- request (::Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def async_batch_annotate_images(requests: nil, output_config: nil, parent: nil) -> ::Gapic::Operation
async_batch_annotate_images
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- requests (::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>) — Required. Individual image annotation requests for this batch.
- output_config (::Google::Cloud::Vision::V1::OutputConfig, ::Hash) — Required. The desired output location and metadata (e.g. format).
-
parent (::String) — Optional. Target project and location to make a call.
Format:
projects/{project-id}/locations/{location-id}
.If no parent is specified, a region will be chosen automatically.
Supported location-ids:
us
: USA country only,asia
: East asia areas, like Japan, Taiwan,eu
: The European Union.Example:
projects/project-A/locations/eu
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new # Call the async_batch_annotate_images method. result = client.async_batch_annotate_images request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#batch_annotate_files
def batch_annotate_files(request, options = nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse
def batch_annotate_files(requests: nil, parent: nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse
Service that performs image detection and annotation for a batch of files. Now only "application/pdf", "image/tiff" and "image/gif" are supported.
This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.
def batch_annotate_files(request, options = nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse
batch_annotate_files
via a request object, either of type
BatchAnnotateFilesRequest or an equivalent Hash.
- request (::Google::Cloud::Vision::V1::BatchAnnotateFilesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_annotate_files(requests: nil, parent: nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse
batch_annotate_files
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- requests (::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest, ::Hash>) — Required. The list of file annotation requests. Right now we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.
-
parent (::String) — Optional. Target project and location to make a call.
Format:
projects/{project-id}/locations/{location-id}
.If no parent is specified, a region will be chosen automatically.
Supported location-ids:
us
: USA country only,asia
: East asia areas, like Japan, Taiwan,eu
: The European Union.Example:
projects/project-A/locations/eu
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Vision::V1::BatchAnnotateFilesResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new # Call the batch_annotate_files method. result = client.batch_annotate_files request # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. p result
#batch_annotate_images
def batch_annotate_images(request, options = nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse
def batch_annotate_images(requests: nil, parent: nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse
Run image detection and annotation for a batch of images.
def batch_annotate_images(request, options = nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse
batch_annotate_images
via a request object, either of type
BatchAnnotateImagesRequest or an equivalent Hash.
- request (::Google::Cloud::Vision::V1::BatchAnnotateImagesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_annotate_images(requests: nil, parent: nil) -> ::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse
batch_annotate_images
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- requests (::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest, ::Hash>) — Required. Individual image annotation requests for this batch.
-
parent (::String) — Optional. Target project and location to make a call.
Format:
projects/{project-id}/locations/{location-id}
.If no parent is specified, a region will be chosen automatically.
Supported location-ids:
us
: USA country only,asia
: East asia areas, like Japan, Taiwan,eu
: The European Union.Example:
projects/project-A/locations/eu
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Vision::V1::BatchAnnotateImagesResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new # Call the batch_annotate_images method. result = client.batch_annotate_images request # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ImageAnnotator Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#crop_hints_detection
def crop_hints_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type CROP_HINTS.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.crop_hints_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#document_text_detection
def document_text_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type DOCUMENT_TEXT_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.document_text_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#face_detection
def face_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type FACE_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.face_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#image_properties_detection
def image_properties_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type IMAGE_PROPERTIES.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.image_properties_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#initialize
def initialize() { |config| ... } -> Client
Create a new ImageAnnotator client object.
- (config) — Configure the ImageAnnotator client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Vision::V1::ImageAnnotator::Client.new do |config| config.timeout = 10.0 end
#label_detection
def label_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type LABEL_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.label_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#landmark_detection
def landmark_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type LANDMARK_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.landmark_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#logo_detection
def logo_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type LOGO_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.logo_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#object_localization_detection
def object_localization_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type OBJECT_LOCALIZATION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.object_localization_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#operations_client
def operations_client() -> ::Google::Cloud::Vision::V1::ImageAnnotator::Operations
Get the associated client for long-running operations.
#product_search_detection
def product_search_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type PRODUCT_SEARCH.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.product_search_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#safe_search_detection
def safe_search_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type SAFE_SEARCH_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.safe_search_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#text_detection
def text_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type TEXT_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.text_detection image: "path/to/image.png" response.responses.each do |res| puts res end
#web_detection
def web_detection(images: [], image: nil, max_results: 10, options: nil, async: false, mime_type: nil, batch_size: 10, destination: nil, image_context: nil, &block) { |result, operation| ... } -> Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation
Detect features of type WEB_DETECTION.
- images (Array<String>, Array<File>) (defaults to: []) — An array containing files, file paths, io objects, image urls, or Google Cloud Storage urls. Can be used with or instead of image.
- image (File, String) (defaults to: nil) — A file, file path, io object, url pointing to an image, or Google Cloud Storage url. Can be used with or instead of images.
- max_results (Integer) (defaults to: 10) — Optional. Defaults to 10.
- options (Gapic::CallOptions) (defaults to: nil) — Optional. Overrides the default settings for this call, e.g, timeout, retries, etc.
-
async (Boolean) (defaults to: false) — Optional. Defaults to
false
. Iffalse
, performs the request synchronously, returning aBatchAnnotateImagesResponse
. Iftrue
, performs the request asynchronously, returning aGapic::Operation
. -
mime_type (String) (defaults to: nil) — Required only if async is
true
. -
batch_size (Integer) (defaults to: 10) — Optional. Defaults to 10. When async is
true
, this specifies the number of input files per output json. -
destination (String) (defaults to: nil) — A Google Cloud Storage location for storing the output. Required
only if async is
true
. - image_context (Hash) (defaults to: nil) — Optional. Image context and/or feature-specific parameters.
- (result, operation) — Access the result along with the RPC operation
- result (Google::Cloud::Vision::V1::BatchAnnotateImagesResponse, Gapic::Operation)
- operation (GRPC::ActiveCall::Operation)
-
(Google::Cloud::Vision::V1::BatchAnnotateImagesResponse) — if async is
false
. -
(Gapic::Operation) — if async is
true
.
- (Google::Cloud::Error) — if the RPC is aborted.
require "google/cloud/vision/v1" image_annotator_client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new response = image_annotator_client.web_detection image: "path/to/image.png" response.responses.each do |res| puts res end


CHINTAN PARIKH
Working towards a career in Web App Testing and Security
About Me
Projects
Resume
Contact Me
▲
▲
▲
▲
Some information here
Contact Me!
Email:


Users can build sources in Strat that emit events that other sources and services can subscribe to.
Many sources will need to receive events from the outside world and bring them into the Strat ecosystem. It's important that every external event be directed to the correct function without mutation, so Strat provides a special source "Extern" that lets users tell Strat a particular function will handle outside events. Here's an example:
source MySource {
include "Extern"
Extern -> reception (any):any -> "./mySourceReception.js"
//...
}
Note: Strat doesn't know how to interpret external events--it must have an Extern function to send things it can't identify, so if your source is connected to the outside world it must provide an Extern function. Additionally, your source can't have multiple extern functions, and stratc will only place a single extern function on each piece of infrastructure since it couldn't pick which function to send an event to.
After a source is deployed, the Birth event is dispatched to the deployed system. Responding to the Birth event is the opportunity to extend the deployment process by connecting external systems to the deployed Strat infrastructure. The data contained inside the Birth event is substrate specific but usually contains infrastructure implementation details like lambda function arns.
To emit an event a source must call it's "emit" function, which it can access via Strat('this.emit'). If no emit function is provided on a source stratc injects the standard emit function, which just iterates through a source's subscribers looking for a match using the match function. Sources may specify that they are "async" by putting the "async" keyword before "source" in its declaration:
async source MySource { ... }
The async keyword changes the behavior of standard emit--async sources can have multiple matches per event, while non-async sources will throw an error of multiple subscribers match to a single event. Also, async emit doesn't return the responses of the matched subscriber functions.
Users can supply their own emit function and use it to call subscribers directly.
Examples:
//within the source "MySource"
const Strat = require('strat').getResolver();
const emit = Strat('this.emit');
module.exports = rawEvent => {
/*
Using stdEmit and stdMatch, subscribers with the following patterns
will be called:
MySource { foo: any } ->
MySource { foo: "abc" } ->
MySource ->
MySource any ->
*/
return emit({
foo: "abc"
});
}
Match is a function that can tell if a subscriber's pattern matches the event. Like emit, match is injected into sources that do not provide their own, and can be implemented by source authors directly. The standard match function does some basic structural type matching based on the value of the event and pattern. Standard match returns a map that indicates if a match occurred:
{
matched: true|false,
event: event
}
Every source and service gets its own reflect function injected by stratc that has information about its declaration, and in the case of sources, its subscribers. Standard emit uses this reflect function to determine who to do matching against. The reflect function returns a good bit of information, and it can be referenced by Strat('this.reflect'). Here's a sample reflect response:
{
isAsync: true|false,
name: "serviceOrSourceName",
declaredFile: "the absolute file path this was declared in",
subscribers: [
pattern: {},
reference: 'Other.fn'
],
functions: [
//every function on the source or service
{
"name": "the function name",
"line": 10,
"media": ".js",
"isResource": true|false
}
]
}
Scope for sources behaves differently from services--sources get access to every function that subscribes to them, even if they are not included. This is because sources call subscribers directly, so they need permissions to do so.


Refer Someone Apply to this Job
Role: {{ referral.listing.role }} Location {{ referral.listing.location }} Fee: ${{ referral.listing.referralFee }}
Parent Referral Id: {{ referral._id }}


| << About this Version | Table of Contents | Notes >> |
Game Constants
Max Ships In System 64 Max Stellar Objects 2048 Max Systems 2048 Max Shïp Classes 768 Max Stellar Classes 256 Jump Distance 1000 pixels Max Weapon Types 256 Max Outfit Item Types 512 Max Beams On Screen 64 Max Düde Types 512 Max Ships Per Düde 16 Max Govts 256 Max Explosions On Screen 32 Max Explosion Types 64 Max Missions 1000 Num Mission Bits 10000 Max Cargo Types 256 Max Person Types 1024 Max Shots On Screen 128 Max Asteroids 16 Max Asteroid Types 16 Max Nebulae 32 Max Images Per Nebula 7 Max Simultaneous Missions 16 Max Disasters 256 Max Fleets 256 Max Jünk Types 128
| << About this Version | Table of Contents | Notes >> |
(©) 2000-2002 by Matt Burch and Ambrosia Software, Inc.


Data Property: accuracy
http://www.dcs.shef.ac.uk/~gregoire/ontologies/instead#accuracy
Annotations (3)
-
comment "A value between 0 and 1 defining the accuracy of the relation. Or, more precisely the accuracy of the linked information." (en)
-
comment "accuracy" (en)
-
comment "testing" ()
Domains (1)
Ranges (1)
Usage (1)


Wananda Schools
SCHOOLS
DETAILS
BLOG
MORE
Search by Country, Education System, School Level
Country
Choose
Uganda
Wakiso
Kampala
Level
Choose
Kindergarten
Primary
Secondary
University
Type
Choose
Type1
Type2
Type3
Type4
Gender
Choose
Male
Female
Curriculum
Choose
Kampala
Kampala
Kampala
Kampala
Search
Clear form
Search Results Found 6 School(s)
The Demo School
The Demo School
The Demo School
The Demo School
The Demo School
The Demo School


home
about us
page
shop
blog
contact us
Affordable Paris Tours
city tours/tours tickets/tour guides
new collection
add to cart
blue tshirt
$26
add to cart
woman shirt
$31
add to cart
yellow tshirt
$21
add to cart
cool lingarie
$56


| dependencies {renv} | R Documentation |
Find R packages used within a project.
dependencies( path = getwd(), root = NULL, ..., progress = TRUE, errors = c("reported", "fatal", "ignored"), dev = FALSE )
path |
The path to a (possibly multi-mode) R file, or a directory containing such files. By default, all files within the current working directory are checked, recursively. |
root |
The root directory to be used for dependency discovery.
Defaults to the active project directory. You may need to set this
explicitly to ensure that your project's |
... |
Unused arguments, reserved for future expansion. If any arguments
are matched to |
progress |
Boolean; report progress output while enumerating dependencies? |
errors |
How should errors that occur during dependency enumeration be handled? See Errors for more details. |
dev |
Boolean; include 'development' dependencies as well? That is, packages which may be required during development but are unlikely to be required during runtime for your project. By default, only runtime dependencies are returned. |
dependencies()
will crawl files within your project, looking for R files
and the packages used within those R files. This is done primarily by
parsing the code and looking for calls of the form:
library(package)
require(package)
requireNamespace("package")
package::method()
For R package projects, dependencies expressed in the DESCRIPTION
file
will also be discovered. Note that the rmarkdown
package is required in
order to crawl dependencies in R Markdown files.
An R data.frame
of discovered dependencies, mapping inferred
package names to the files in which they were discovered.
By default, renv
will read your project's .gitignore
s (if any) to
determine whether certain files or folders should be included when traversing
directories. If preferred, you can also create a .renvignore
file (with
entries of the same format as a standard .gitignore
file) to tell renv
which files to ignore within a directory. If both .renvignore
and
.gitignore
exist within a folder, the .renvignore
will be used in lieu of
the .gitignore
.
See https://git-scm.com/docs/gitignore for documentation on the
.gitignore
format. Some simple examples here:
# ignore all R Markdown files *.Rmd # ignore all data folders data/ # ignore only data folders from the root of the project /data/
renv
's attempts to enumerate package dependencies in your project can fail
– most commonly, because of parse errors in your R code. The errors
parameter can be used to control how renv
responds to errors that occur.
| Name | Action |
"reported" | Errors are reported to the user, but are otherwise ignored. |
"fatal" | Errors are fatal and stop execution. |
"ignored" | Errors are ignored and not reported to the user. |
Depending on the structure of your project, you may want renv
to ignore
errors that occur when attempting to enumerate dependencies. However, a more
robust solution would be to use an .renvignore
file to tell renv
not to
scan such files for dependencies, or to configure the project to require
explicit dependency management (renv::settings$snapshot.type("explicit")
)
and enumerate your dependencies in a project DESCRIPTION
file.
renv
attempts to distinguish between 'development' dependencies and
'runtime' dependencies. For example, you might rely on e.g.
devtools and
roxygen2 during development
for a project, but may not actually require these packages at runtime.
## Not run: # find R package dependencies in the current directory renv::dependencies() ## End(Not run)


Saving Lives | Protecting People | Sharing Knowledge
Register With the World of MedicInfo and Enjoy Benefits like Symptom Checker and Online Quiz... It is simple, we need basic information only!!


dotnet build
Builds a .NET application and its dependencies.
More information: home page
- Compile the project or solution in the current directory:
dotnet build
- Compile a .NET project or solution in debug mode:
dotnet build path/to/project_or_solution
- Compile in release mode:
dotnet build --configuration Release
- Compile without restoring dependencies:
dotnet build --no-restore
- Compile with a specific verbosity level:
dotnet build --verbosity quiet|minimal|normal|detailed|diagnostic
- Compile for a specific runtime:
dotnet build --runtime runtime_identifier
- Specify the output directory:
dotnet build --output path/to/directory


--- layout: default title: Home nav_order: 1 description: Find how to setup your email client for your email address permalink: / ---


--- layout: post title: Use Your Cast Iron Pan and a Tortilla for Extra-Crispy Pizza in Just 12 Minutes date: type: post parent_id: '0' published: false image: assets/images/post-img/ status: draft categories: - Etc. tags: [] meta: {} author: login: mkelley email<EMAIL_ADDRESS>display_name: Mike first_name: Mike last_name: Kelley ---
In the catalog of easy, cheaty pizza recipes that start with some form of pre-baked bread base, flour tortilla–based pizzas have historically ranked pretty low on my list. But all that has changed, and I'm now going to take the position that, given the proper technique, a couple of tricks, and the aid of a cast iron skillet, flour tortillas are actually the best way to make quick thin-and-crisp, bar-style pizza at home.
Source: Use Your Cast Iron Pan and a Tortilla for Extra-Crispy Pizza in Just 12 Minutes


kmeans¶
SLIC¶
author: Richard Bonye (github Boyne272) Last updated on Wed Aug 28 08:28:20 2019
-
class
TSA.kmeans.SLIC.
SLIC
(img, bin_grid, dist_metric=None, dist_metric_args=None)¶ Implements Kmeans clustering on an image in 5d color position space using localised bins on a regular grid to enforce locality.
SLIC(img, bin_grid, dist_metric=None, dist_metric_args=[1.,])
Parameters: - img (3d numpy array) – Image to be segmented by kmeans, expected in shape [x_dim, y_dim, rgb] with all values in the interval [0, 1], not 255.
- bin_grid (tuple length 2) – The number of initial partitions in x and y respectivly, therefore the number of segments is the product of these. Both must be a factor of the x, y dimensions for the whole image. This intial segmentation restrains the kmeans centers in space, forcing locality of segments and speeding up the algorithm.
- dist_metric (function, optional) – The method of calculating distance between vectors and cluster centers. This must have form f(vecs, clusts, *args) where vecs and clusts are rank 2 tensors with samples on the first axis. This should return a rank 2 tensor of distances with shape (clusters, vectors) such that taking the argmin along dim=1 gives an array of closest cluster centroids for each vector.
- dist_metric_args (tuple, optional) – arguments to passed into dist_metric function. By defualt this is a single parameter for the bia to color over distance.
-
get_segmentation
()¶ Returns the current segmentation mask as a numpy array
-
iterate
(n_iter)¶ loop for n_iter iterations with progress bar
-
plot
(option='default', ax=None)¶ - Plot a one fo the following options on an axis if specified:
- ‘default’ image and the segement outlines
- ‘setup’ image, bin edges and cluster centers
- ‘segments’ the sedment mask
- ‘edges’ just the segment outlines in a transparent manner
- ‘img’ just the orinal image
- ‘centers’ each kmean centroid
- ‘bin_edges’ the bin mesh used
- ‘bins’ both ‘img’ and ‘bin_edges’
- ‘time’ the iterations vs time
If path is given the image will be saved on that path.
If no axis is given one will be made.
-
class
TSA.kmeans.SLIC.
bin_base
(bin_grid, dim_x, dim_y)¶ Class to hold methods for binning vectors into a regular grid.
bin_base(bin_grid, dim_x, dim_y)
Parameters: - bin_grid (tuple) – The number of grid cordinates in the x and y directions. Must be length 2.
- dim_y (dim_x,) – The dimensions of the whole grid
MSLIC¶
author: Richard Bonye (github Boyne272) Last updated on Wed Aug 28 08:27:33 2019
-
class
TSA.kmeans.MSLIC.
MSLIC_wrapper
(imgs, bin_grid, combo_metric='max', combo_metric_args=None, dist_metric=None, dist_metric_args=[1.0])¶ Wrapper around SLIC to run multiple instances at once, using a the combined of each instance to assign clusters in every iteration
- MSLIC_wrapper(imgs, bin_grid, combo_metric=’max’, combo_metric_args=[],
- dist_metric=None, dist_metric_args=[1.,])
Parameters: - imgs (list of 3d numpy arrays) – The imgs on which the SLIC algorithm is to be run in parallel. Each must have the same shape and have a
- bin_grid (tuple length 2 (same as SLIC)) – The number of initial partitions in x and y respectivly, therefore the number of segments is the product of these. Both must be a factor of the x, y dimensions for the whole image. This intial segmentation restrains the kmeans centers in space, forcing locality of segments and speeding up the algorithm.
- combo_metric (string or callable, optional) –
The metric by which the distances between vectors and centroids in each image are to be combined. Allowed string options are: - ‘max’ maximum of the distances in each image - ‘min’ minimum of the distances in each image - ‘mean’ average of the distances in each image - ‘sum’ total of the distances in each image
Alternatively a callable function can be used, this function must have form f(t, *args) where t is a rank 3 tensor of distances with shape (img, vectors, clusters) and return a rank 2 tensor of distances with shape (vectors, clusters).
- combo_metric_args (tuple, optional) – arguments to passed into combo_metric function if given
- dist_metric (function, optional) – Passed into SLIC objects. The method of calculating distance between vectors and cluster centers. This must have form f(vecs, clusts, *args) where vecs and clusts are rank 2 tensors with samples on the first axis. This should return a rank 2 tensor of distances with shape (clusters, vectors) such that taking the argmin along dim=1 gives an array of closest cluster centroids for each vector
- dist_metric_args (tuple, optional) – Passed into SLIC objects. arguments to passed into dist_metric function if given
-
get_segmentation
()¶ Returns the current segmentation mask as a numpy array
-
iterate
(n_iter)¶ loop for n_iter iterations with progress bar
-
plot
(objs=[], option='default', axs=[None], path='')¶ Calls obj.plot() on each of the SLIC objects specified with option given
Parameters: - obj_indexs (list of ints, optional) – which of the SLIC objects to call plot on. If left empty this will plot all SLIC objects.
- option (string, optional) – the plot option to be passed to obj.plot, refer to the docstrings there for available options
- axs (tuple of matplotlib axis, optional) – the axis to be plotted on, if not given a subplot for each of the SLIC objs is used.
- path (string, optional) – the path to save the figure on if wanted


To start,
After you sign in, the application gets an access token with permission to Read user mail. Finally, it uses the access token to get a subscription with the following characteristics.


Helpers are collections of related functions that do specific tasks, like formatting, filtering, etc.
Store Helpers in your app/helpers
directory.
Helpers must be loaded manually. You can load helpers using the core_load_helper()
function:
core_load_helper('my_helper_name'); // leave off the .php core_load_helper('format', TRUE); // load a core helper
Core52 includes an array of useful helpers that you can use in your application:
See the Core52 Helpers section in the documentation for more details.


conditional is {{#boolean}}true{{/boolean}}
None is "{{none}}"
conditional is {{^false}}false{{/false}}
nested value is {{nested.value}}
nested value is {{#nested}}{{value}}{{/nested}}
missing value is {{^missing}}missing{{/missing}}
empty list
{{/empty}}


An exercise in skeuomorphic excess. ✭ more ↬ home ↬
Mixtape demo includes "Render Your Heart" by SonReal.


this is the example of color
this is the example of background color
this is the example of HEX color


Review: Bee Simulator
Interview with Chris Berrow & Leigh Milner, Naked Gaming Podcast
Part of the show Simulator Special 2
Chris Berrow and Leigh Milner review Bee Simulator.
Leigh - This could have been really good. This could have been an amazing thing. And if you did give me money to make this it would be the best b experience. What would you do right.  You expect to be a right in a very busy park or you know in the middle of New York London which you are. Okay. And you've got to try and avoid the rain drops and people getting cups of coffee down and avoid the cars. I flew into a car.  And the graphics when really not very good. The graphics were poor. You literally can't fly the bee. You found the control and I found the controls really jerky really difficult you can't look and fly at the same time. If they should be able to give them the controls that they or you do in this game is your a bee and you have to collect honey.


Before proceeding, it is worth studying the default scrollbar stylesheet, finbars.css, which is instructive for whichever approach you decide to take.
From finbars.css
, we can see that CSS styles for scrollbars can control the following (defaults in bold):
Go to the next page for the next scrollbar Activity, in which we’ll make a minor modification to the scrollbar styles to bring the scrollbars up to date.
| 1 | Size refers to the width of the vertical scrollbar and its thumb; or to the height of the horizontal scrollbar and its thumb. Important note: Never attempt to set the size of the other axis as this is programmatically determined and set by the code, based on the size of the logical grid within its currently sized viewport. |
| 2 | The box-shadow style with offsets of 0px can be used as a subtler alternative to a border. You should use either border or shadow, or neither, but not both. If you prefer to use border , you will need to fiddle with margin and/or box-sizing to keep the thumb positioned properly within the gutter. |


Classes
- Poloniex
Members
apiCallRate :Object
Call rate for resource-intensive and non-resource-intensive private and public API calls
Type:
- Source:
apiCallRateLimits :Object
API call rate limits for endpoints sets
Type:
- Source:
Methods
accountsTransfer(requestParameters)
Transfer amount of currency from an account to another account for a user.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
|
|
currency to transfer |
amount |
String
|
|
|
amount to transfer |
fromAccount |
String
|
|
|
account from which the currency is transferred |
toAccount |
String
|
|
|
account to which the currency is transferred |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
cancelAllOrders(requestParametersopt)
Cancel all orders in an account.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbols |
Array.<String>
|
<optional>
|
|
if specified, only orders with those symbols are canceled |
accountTypes |
Array.<"SPOT">
|
<optional>
|
|
SPOT is the default and only supported one |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
cancelAllSmartOrders(requestParametersopt)
Batch cancel all smart orders in an account.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbols |
Array.<String>
|
<optional>
|
|
if specified, only orders with those symbols are canceled |
accountTypes |
Array.<"SPOT">
|
<optional>
|
|
SPOT is the default and only supported one |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
cancelBatchOrders(requestParameters)
Batch cancel one or many active orders in an account by IDs.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
orderIds |
Array.<String>
|
<optional>
|
|
array of order ids. Required if clientOrderIds is null or empty |
clientOrderIds |
Array.<String>
|
<optional>
|
|
array of order clientOrderIds. Required if orderIds is null or empty |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
cancelBatchSmartOrders(requestParameters)
Batch cancel one or many smart orders in an account by IDs.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
orderIds |
Array.<String>
|
<optional>
|
|
array of order ids. Required if clientOrderIds is null or empty |
clientOrderIds |
Array.<String>
|
<optional>
|
|
array of order clientOrderIds. Required if orderIds is null or empty |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
cancelOrder(requestParameters)
Cancel an active order.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
order's id or its clientOrderId (prefix with cid: ) |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
cancelSmartOrder(requestParameters)
Cancel a smart order.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
order's id or its clientOrderId (prefix with cid: ) |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
createBatchOrders(requestParameters)
Create multiple orders via a single request.
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
requestParameters |
Object
|
|
|
|
|
|
|
|
|
requestParameters.getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
- Source:
Returns:
createNewCurrencyAddress(requestParameters)
Create a new address for a currency.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
|
|
the currency to use for the deposit address |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
createOrder(requestParameters)
Create an order for an account.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
symbol to trade |
side |
"BUY"
|
"SELL"
|
|
|
BUY, SELL |
timeInForce |
"GTC"
|
"IOC"
|
"FOK"
|
<optional>
|
|
GTC, IOC, FOK |
type |
"MARKET"
|
"LIMIT"
|
"LIMIT_MAKER"
|
<optional>
|
|
MARKET, LIMIT, LIMIT_MAKER (for placing post only orders) |
accountType |
"SPOT"
|
<optional>
|
|
SPOT is the default and only supported one |
price |
String
|
<optional>
|
|
price is required for non-market orders |
quantity |
String
|
<optional>
|
|
base units for the order. Quantity is required for MARKET SELL or any LIMIT orders |
amount |
String
|
<optional>
|
|
quote units for the order. Amount is required for MARKET BUY order |
clientOrderId |
String
|
<optional>
|
|
maximum 64-character length |
allowBorrow |
Boolean
|
<optional>
|
|
allow order to be placed by borrowing funds |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
createSmartOrder(requestParameters)
Create a smart order for an account.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
symbol to trade |
side |
"BUY"
|
"SELL"
|
|
|
BUY, SELL |
timeInForce |
"GTC"
|
"IOC"
|
"FOK"
|
<optional>
|
|
GTC, IOC, FOK |
type |
"STOP"
|
"STOP_LIMIT"
|
<optional>
|
|
STOP, STOP_LIMIT |
accountType |
"SPOT"
|
<optional>
|
|
SPOT is the default and only supported one |
price |
String
|
<optional>
|
|
price is required for non-market orders |
stopPrice |
String
|
<optional>
|
|
price at which order is triggered |
quantity |
String
|
<optional>
|
|
base units for the order |
amount |
String
|
<optional>
|
|
quote units for the order |
clientOrderId |
String
|
<optional>
|
|
maximum 64-character length |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getAccountsActivity(requestParametersopt)
Get a list of activities such as airdrop, rebates, staking, credit/debit adjustments, and other (historical adjustments).
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
startTime |
Number
|
<optional>
|
|
trades filled before startTime will not be retrieved |
endTime |
Number
|
<optional>
|
|
trades filled after endTime will not be retrieved |
activityType |
Number
|
<optional>
|
|
type of activity |
limit |
Number
|
<optional>
|
|
max number of records |
from |
Number
|
<optional>
|
|
it is 'id'. The query begin at ‘from', and the default is 0 |
direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT, default is NEXT |
currency |
String
|
<optional>
|
|
transferred currency |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getAccountsBalances(requestParametersopt)
Get a list of accounts of a user with each account’s id, type and balances.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
<optional>
|
|
a single account |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getAccountsInfo(requestParametersopt)
Get a list of all accounts of a use.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getAccountsTransferRecords(requestParametersopt)
Get a list of transfer records of a user.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
<optional>
|
|
get a single transfer record corresponding to the transferId |
limit |
Number
|
<optional>
|
|
a single account |
from |
Number
|
<optional>
|
|
It is 'transferId'. The query begin at ‘from', and the default is 0 |
direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT, default is NEXT |
currency |
String
|
<optional>
|
|
transferred currency |
startTime |
Number
|
<optional>
|
|
transfers before start time will not be retrieved |
endTime |
Number
|
<optional>
|
|
transfers after end time will not be retrieved |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getBorrowRatesInfo(requestParametersopt)
Get borrow rates information for all tiers and currencies.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getCandles(requestParameters)
Returns OHLC for a symbol at given timeframe (interval).
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
a single symbol |
interval |
"MINUTE_1"
|
"MINUTE_5"
|
"MINUTE_10"
|
"MINUTE_15"
|
"MINUTE_30"
|
"HOUR_1"
|
"HOUR_2"
|
"HOUR_4"
|
"HOUR_6"
|
"HOUR_12"
|
"DAY_1"
|
"DAY_3"
|
"WEEK_1"
|
"MONTH_1"
|
|
|
the unit of time to aggregate data by |
limit |
Number
|
<optional>
|
|
maximum number of records returned |
startTime |
Number
|
<optional>
|
|
filters by time |
endTime |
Number
|
<optional>
|
|
filters by time |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getCollateralInfo(requestParametersopt)
Get collateral information for currencies.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
<optional>
|
|
a single currency |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getCurrencies(requestParametersopt)
Get supported currencies.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
<optional>
|
|
a single currency |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getDepositAddresses(requestParametersopt)
Get deposit addresses for a user.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
<optional>
|
|
for a single the currency |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getFeeInfo(requestParametersopt)
Get fee rate.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getKillSwitchStatus(requestParameters)
Get status of kill switch.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getMarginAccountInfo(requestParametersopt)
Get account margin information.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
accountType |
"SPOT"
|
<optional>
|
|
account type. Currently only SPOT is supported |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getMarginBorrowStatus(requestParametersopt)
Get borrow status of currencies.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
<optional>
|
|
currency name |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getMarginMaxSize(requestParameters)
Get maximum and available buy/sell amount for a given symbol.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
symbol name |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getMarkPrice(requestParametersopt)
Get the latest mark price for cross margin symbols.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
<optional>
|
|
a single symbol |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getMarkPriceComponents(requestParameters)
Get components of the mark price for a given symbol.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
a single symbol |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getOpenOrders(requestParametersopt)
Get a list of active orders for an account.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
<optional>
|
|
symbol to trade |
side |
"BUY"
|
"SELL"
|
<optional>
|
|
BUY, SELL |
from |
String
|
<optional>
|
|
it is 'orderId'. The query begin at ‘from', and it is 0 when you first query |
direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT |
limit |
Number
|
<optional>
|
|
max number of records to return |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getOrderBook(requestParameters)
Get the order book for a given symbol.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
a single symbol |
scale |
String
|
<optional>
|
|
controls aggregation by price |
limit |
Number
|
<optional>
|
|
controls aggregation by price |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getOrderDetails(requestParameters)
Get an order’s status.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
either orderId or clientOrderId (prefix with cid: ) |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getOrderTrades(requestParameters)
Get a list of all trades for an order specified by its orderId
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
the associated order's id (order's clientOrderId is not supported) |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getOrdersHistory(requestParametersopt)
Get a list of historical orders in an account.
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
requestParameters |
Object
|
<optional>
|
|
Properties
| Name |
Type |
Description |
accountType |
"SPOT"
|
SPOT is the default and only supported one |
|
|
|
|
|
|
requestParameters.side |
"BUY"
|
"SELL"
|
|
|
BUY, SELL |
requestParameters.symbol |
String
|
|
|
any supported symbol |
requestParameters.from |
"Number"
|
<optional>
|
|
an 'orderId'. The query begins at ‘from' |
requestParameters.direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT The direction before or after ‘from' |
requestParameters.states |
"String"
|
<optional>
|
|
FAILED, FILLED, CANCELED, PARTIALLY_CANCELED. Multiple states can be specified and separated with comma |
requestParameters.limit |
"Number"
|
<optional>
|
|
max number of orders to return |
requestParameters.hideCancel |
"Boolean"
|
<optional>
|
|
whether canceled orders should not be retrieved |
requestParameters.startTime |
"Number"
|
<optional>
|
|
orders updated before startTime will not be retrieved |
requestParameters.endTime |
"Number"
|
<optional>
|
|
orders updated after endTime will not be retrieved |
requestParameters.getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
- Source:
Returns:
getPrices(requestParametersopt)
Get the latest trade price for symbols.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
<optional>
|
|
a single symbol |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSmartOpenOrders(requestParametersopt)
Get a list of (pending) smart orders for an account.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
limit |
Number
|
<optional>
|
|
max number of records to return |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSmartOrderDetails(requestParameters)
Get a smart order’s status.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
smart order's id or its clientOrderId (prefix with cid: ) |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSmartOrdersHistory(requestParametersopt)
Get a list of historical smart orders in an account.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
accountType |
"SPOT"
|
|
|
SPOT is the default and only supported one |
type |
"STOP"
|
"STOP_LIMIT"
|
<optional>
|
|
STOP, STOP_LIMIT |
side |
"BUY"
|
"SELL"
|
|
|
BUY, SELL |
symbol |
String
|
|
|
any supported symbol |
from |
"Number"
|
<optional>
|
|
an 'smart orderId'. The query begins at ‘from'. |
direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT The direction before or after ‘from' |
states |
"String"
|
<optional>
|
|
FAILED, FILLED, CANCELED, PARTIALLY_CANCELED. Multiple states can be specified and separated with comma |
limit |
"Number"
|
<optional>
|
|
max number of orders to return |
hideCancel |
"Boolean"
|
<optional>
|
|
whether canceled smart orders should not be retrieved |
startTime |
"Number"
|
<optional>
|
|
orders updated before startTime will not be retrieved |
endTime |
"Number"
|
<optional>
|
|
orders updated after endTime will not be retrieved |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSubaccountsBalances(requestParametersopt)
Get balances information by currency and account type.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
<optional>
|
|
a single account |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSubaccountsInfo(requestParametersopt)
Get a list of all the accounts within an Account Group for a user.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSubaccountsTransferRecords(requestParametersopt)
Get a list of transfer records of a user.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
<optional>
|
|
get a single transfer record corresponding to the transferId |
limit |
Number
|
<optional>
|
|
max number of records |
from |
Number
|
<optional>
|
|
it is 'transferId'. The query begin at ‘from', and the default is 0 |
direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT, default is NEXT |
currency |
String
|
<optional>
|
|
transferred currency |
fromAccountId |
String
|
<optional>
|
|
external UID of the from account |
fromAccountType |
"SPOT"
|
"FUTURES"
|
<optional>
|
|
from account type |
toAccountId |
String
|
<optional>
|
|
external UID of the to account |
toAccountType |
"SPOT"
|
"FUTURES"
|
<optional>
|
|
to account type |
startTime |
Number
|
<optional>
|
|
transfers before start time will not be retrieved |
endTime |
Number
|
<optional>
|
|
transfers after end time will not be retrieved |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getSymbols(requestParametersopt)
Get symbols and their trade info.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
<optional>
|
|
a single symbol name |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getTicker(requestParametersopt)
Returns ticker in last 24 hours for all symbols.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
<optional>
|
|
a single symbol |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getTimestamp(requestParametersopt)
Get current server time.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getTrades(requestParameters)
Returns a list of recent trades.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
symbol |
String
|
|
|
a single symbol |
limit |
Number
|
<optional>
|
|
maximum number of records returned |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getTradesHistory(requestParametersopt)
Get a list of all trades for an account.
Parameters:
| Name |
Type |
Attributes |
Description |
requestParameters |
Object
|
<optional>
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
limit |
"Number"
|
<optional>
|
|
max number of orders to return |
startTime |
"Number"
|
<optional>
|
|
trades filled before startTime will not be retrieved |
endTime |
"Number"
|
<optional>
|
|
trades filled after endTime will not be retrieved |
from |
"Number"
|
<optional>
|
|
globally unique tradeid (use pageId value from response) |
direction |
"PRE"
|
"NEXT"
|
<optional>
|
|
PRE, NEXT The direction before or after ‘from' |
symbols |
String
|
<optional>
|
|
one or multiple symbols separated by comma |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
getWalletsActivityRecords(requestParameters)
Get deposit and withdrawal activity history.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
start |
Number
|
|
|
records before start time will not be retrieved |
end |
Number
|
|
|
records after end time will not be retrieved |
activityType |
"deposits"
|
"withdrawals"
|
<optional>
|
|
type of activity |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
replaceOrder(requestParameters)
Cancel an existing active order, new or partially filled, and place a new order.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
specify the existing order id. If id is a clientOrderId, prefix with cid: e.g. cid:myId-1 |
clientOrderId |
String
|
<optional>
|
|
clientOrderId of the new order |
price |
String
|
<optional>
|
|
amended price |
quantity |
String
|
<optional>
|
|
amended quantity |
amount |
String
|
<optional>
|
|
amended amount (needed for MARKET buy) |
type |
"MARKET"
|
"LIMIT"
|
"LIMIT_MAKER"
|
<optional>
|
|
MARKET, LIMIT, LIMIT_MAKER (for placing post only orders) |
timeInForce |
"GTC"
|
"IOC"
|
"FOK"
|
<optional>
|
|
GTC, IOC, FOK |
allowBorrow |
Boolean
|
<optional>
|
|
allow order to be placed by borrowing funds |
proceedOnFailure |
Boolean
|
<optional>
|
|
new order should be placed if cancellation of the existing order fails |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
replaceSmartOrder(requestParameters)
Cancel an existing untriggered smart order and place a new smart order.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
id |
String
|
|
|
specify the existing order id. If id is a clientOrderId, prefix with cid: e.g. cid:myId-1 |
clientOrderId |
String
|
<optional>
|
|
clientOrderId of the new order |
price |
String
|
<optional>
|
|
amended price |
stopPrice |
String
|
<optional>
|
|
amended price at which order is triggered |
quantity |
String
|
<optional>
|
|
amended quantity |
amount |
String
|
<optional>
|
|
amended amount (needed for MARKET buy) |
type |
"STOP"
|
"STOP_LIMIT"
|
<optional>
|
|
amended type; STOP, STOP_LIMIT |
timeInForce |
"GTC"
|
"IOC"
|
"FOK"
|
<optional>
|
|
amended timeInForce; GTC, IOC, FOK |
proceedOnFailure |
Boolean
|
<optional>
|
|
new order should be placed if cancellation of the existing order fails |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
setKillSwitch(requestParameters)
Set a timer that cancels all regular and smartorders after the timeout has expired.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
timeout |
String
|
|
|
timer value in seconds |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
subaccountsTransfer(requestParameters)
Transfer amount of currency from an account and account type to another account and account type among the accounts in the account group.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
|
|
currency to transfer |
amount |
String
|
|
|
amount to transfer |
fromAccountId |
String
|
|
|
external UID of the from account |
fromAccountType |
"SPOT"
|
"FUTURES"
|
|
|
from account type |
toAccountId |
String
|
|
|
external UID of the to account |
toAccountType |
"SPOT"
|
"FUTURES"
|
|
|
to account type |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:
withdrawCurrency(requestParameters)
Immediately places a withdrawal for a given currency.
Parameters:
| Name |
Type |
Description |
requestParameters |
Object
|
Properties
| Name |
Type |
Attributes |
Default |
Description |
currency |
String
|
|
|
currency name |
amount |
String
|
|
|
withdrawal amount |
address |
String
|
|
|
withdrawal address |
paymentId |
String
|
<optional>
|
|
paymentId for currencies that use a command deposit address |
allowBorrow |
String
|
<optional>
|
|
allow to transfer borrowed funds |
getApiCallRateInfo |
Boolean
|
<optional>
|
false
|
if api call rate info should be returned, instead of executing the API call |
|
- Source:
Returns:


--- layout: conf title: RubyConf ID 2017 ---
We are still preparing for the first Ruby Conference in Indonesia.
Let us know if you are interested to become a speaker by submitting your proposal.


[gecode-users] gecode autoconf setting
Martin Mann
mmann at informatik.uni-freiburg.de
Tue Oct 23 10:21:51 CEST 2007
Hi Christian,
thanks a lot! :)
Martin
Christian Schulte schrieb:
> Hi Martin,
>
> Yes that shouldn't be hard (actually the hard part is packing a binary
> distribution). Should be there in Gecode 2.0.0.
>
> Christian
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
> Of Martin Mann
> Sent: Monday, October 22, 2007 3:22 PM
> To: gecode user list
> Subject: [gecode-users] gecode autoconf setting
>
> Hi,
>
> I am currently preparing an autoconf based package including
> gecode-1.3.0 as subpackage (subdir) in the source distribution using the
> standard autoconf macro
>
> AC_CONFIG_SUBDIRS([gecode-1.3.0])
>
> Everything works fine including compilation:
> - my configure enters the subdir and calls the gecode configure
> - my makefile enters the gecode subdir and compiles the library
> - my code compiles using the previously compiled local gecode version in
> the subdir
> - my resulting program works and can be installed in the system using
> the standard "make install" target generated by autoconf
>
> so far everything fine!
>
> the problem occurs, when i want to create a source distribution of my
> package (include gecode of course)
>
> calling the standard "make dist" results in
>
> ...
> make[1]: Entering directory `/home/..../gecode-1.3.0'
> make[1]: *** No rule to make target `distdir'. Stop.
> make[1]: Leaving directory `/home/..../gecode-1.3.0'
> make: *** [distdir] Error 1
>
> a closer look at the 'gecode-1.3.0/Makefile' shows, that there are only
> make targets to generate a distribution of the include-headers and
> compiled library - the binary distribution. This is nice to install the
> precompiled library but doesnt help source sub-supplier as I am.. ;)
>
> Think this is also usefull for other people that want to integrate a
> certain gecode version as a bundle into their source project and to
> distribute it.
>
> Is there a reason for the non-standard Makefile not providing a source
> distribution generation? If not is it possible to enable this in the
> comming gecode-2.0.0 version?
>
> Would be glad about! ;)
>
> Meanwhile I will try to write a dist make target to enable the support
> locally. Do you ve got this already or are you interested to get it if I
> can manage?
>
> So far, hope to help,
>
> Martin
>
>
>
--
Martin Mann, Dipl. Bioinf.
Bioinformatics - Inst. of Computer Science
Albert-Ludwigs-University Freiburg
Tel: ++49-761-203-8259
Fax: ++49-761-203-7462
http://www.bioinf.uni-freiburg.de/~mmann/
More information about the gecode-users
mailing list


A resource is a program object that provides connections to such systems as database servers and messaging systems. Java EE components can access a wide variety of resources, including databases, mail sessions, Java Message Service objects, and URLs. The Java EE 7 platform provides mechanisms that allow you to access all these resources in a similar manner. This chapter examines several types of resources and explains how to create them.
The following topics are addressed here:
In a distributed application, components need to access other components and resources, such as databases. For example, a servlet might invoke remote methods on an enterprise bean that retrieves information from a database. In the Java EE platform, the Java Naming and Directory Interface (JNDI) naming service enables components to locate other components and resources.
A resource is a program object that provides connections to systems, such as database servers and messaging systems. (A Java Database Connectivity resource is sometimes referred to as a data source.) Each resource object is identified by a unique, people-friendly name, called the JNDI name. For example, the JNDI name of the preconfigured JDBC resource for the Java DB database that is shipped with GlassFish Server is java:comp/DefaultDataSource
.
An administrator creates resources in a JNDI namespace. In GlassFish Server, you can use either the Administration Console or the asadmin
command to create resources. Applications then use annotations to inject the resources. If an application uses resource injection, GlassFish Server invokes the JNDI API, and the application is not required to do so. However, it is also possible for an application to locate resources by making direct calls to the JNDI API.
A resource object and its JNDI name are bound together by the naming and directory service. To create a new resource, a new name/object binding is entered into the JNDI namespace. You inject resources by using the @Resource
annotation in an application.
You can use a deployment descriptor to override the resource mapping that you specify in an annotation. Using a deployment descriptor allows you to change an application by repackaging it rather than by both recompiling the source files and repackaging. However, for most applications a deployment descriptor is not necessary.
To store, organize, and retrieve data, most applications use a relational database. Java EE 7 components may access relational databases through the JDBC API. For information on this API, see http://docs.oracle.com/javase/7/docs/technotes/guides/jdbc/
.
In the JDBC API, databases are accessed by using DataSource
objects. A DataSource
has a set of properties that identify and describe the real-world data source that it represents. These properties include such information as the location of the database server, the name of the database, the network protocol to use to communicate with the server, and so on. In GlassFish Server, a data source is called a JDBC resource.
Applications access a data source by using a connection, and a DataSource
object can be thought of as a factory for connections to the particular data source that the DataSource
instance represents. In a basic DataSource
implementation, a call to the getConnection
method returns a connection object that is a physical connection to the data source.
A DataSource
object may be registered with a JNDI naming service. If so, an application can use the JNDI API to access that DataSource
object, which can then be used to connect to the data source it represents.
DataSource
objects that implement connection pooling also produce a connection to the particular data source that the DataSource
class represents. The connection object that the getConnection
method returns is a handle to a PooledConnection
object rather than a physical connection. An application uses the connection object in the same way that it uses a connection. Connection pooling has no effect on application code except that a pooled connection, like all connections, should always be explicitly closed. When an application closes a connection that is pooled, the connection is returned to a pool of reusable connections. The next time getConnection
is called, a handle to one of these pooled connections will be returned if one is available. Because connection pooling avoids creating a new physical connection every time one is requested, applications can run significantly faster.
A JDBC connection pool is a group of reusable connections for a particular database. Because creating each new physical connection is time consuming, the server maintains a pool of available connections to increase performance. When it requests a connection, an application obtains one from the pool. When an application closes a connection, the connection is returned to the pool.
Applications that use the Persistence API specify the DataSource
object they are using in the jta-data-source
element of the persistence.xml
file:
<jta-data-source>jdbc/MyOrderDB</jta-data-source>
This is typically the only reference to a JDBC object for a persistence unit. The application code does not refer to any JDBC objects.
Before you deploy or run many applications, you may need to create resources for them. An application can include a glassfish-resources.xml
file that can be used to define resources for that application and others. You can then use the asadmin
command, specifying as the argument a file named glassfish-resources.xml
, to create the resources administratively, as shown.
asadmin add-resources glassfish-resources.xml
The glassfish-resources.xml
file can be created in any project using NetBeans IDE or by hand. Some of the JMS examples use this approach to resource creation. A file for creating the resources needed for the JMS simple producer example can be found in the jms/simple/producer/src/main/setup
directory.
You could also use the asadmin create-jms-resource
command to create the resources for this example. When you are done using the resources, you would use the asadmin list-jms-resources
command to display their names, and the asadmin delete-jms-resource
command to remove them, regardless of the way you created the resources.