watson_ws_test June 5, 2017 In [1]: #test websocket connection to watson

Size: px
Start display at page:

Download "watson_ws_test June 5, 2017 In [1]: #test websocket connection to watson"

Transcription

1 watson_ws_test June 5, 2017 In [1]: #test websocket connection to watson In [2]: import websocket import thread import time import os import requests import certifi In [3]: from os.path import join, dirname from dotenv import load_dotenv Out[3]: True dotenv_path = join(dirname(" file "), '.env') load_dotenv(dotenv_path) In [4]: class def getauthenticationtoken(hostname, servicename, username, password): uri = hostname + "/authorization/api/v1/token?url=" + hostname + '/' \ + servicename + "/api" uri = uri.replace("wss://", " uri = uri.replace("ws://", " print (uri) resp = requests.get(uri, auth=(username, password), verify=certifi.where(), headers={'accept': 'application/json', timeout=(30, 30)) print (resp.text) jsonobject = resp.json() return jsonobject['token'] In [5]: hostname=" servicename='speech-to-text' username=os.environ['watson_username'] password=os.environ['watson_password'] url=os.environ['watson_url'] 1

2 In [15]: token = Utils.getAuthenticationToken(hostname, servicename, username, password) url = 'wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize?watson-token=' + token + '&model=en-us_broadbandmodel' {"token":"ovni009okr%2btfk2cpxige5zmpyafqvd%2f6i%2fbpkqvvccrmenc3xtszvu2pfi7iy2xs7ugdkox798d3t09 In [9]: def read_in_chunks(file_object, chunk_size=1024): """Lazy function (generator) to read a file piece by piece. Default chunk size: 1k.""" while True: data = file_object.read(chunk_size) if not data: break yield data In [10]: def get_audio_filepath(): filepath = 'projects/sausalito_nov2016_5min_conv/audio-segments/ flac' return filepath In [11]: def get_json_filepath(): filepath = 'projects/sausalito_nov2016_5min_conv/transcripts/ _ws.json' return filepath In [12]: os.path.getsize(get_audio_filepath()) Out[12]: In [13]: # def on_message(ws, message): listenmessage = 0 print(u"text message received: {0".format(message)) jsonobject = json.loads(message) # if uninitialized, receive the initialization response # from the server if 'state' in jsonobject: listenmessage += 1 if (listenmessage == 2): print ("Sending results...") # if in streaming elif 'results' in jsonobject: jsonobject = json.loads(message) hypothesis = "" # empty hypothesis if (len(jsonobject['results']) == 0): print ("empty hypothesis!") 2

3 # regular hypothesis else: # dump the message to the output directory jsonobject = json.loads(message) json_file = get_json_filepath() with open(json_file, 'w') as f: json.dump(jsonobject, indent=4, sort_keys=true) print('transcript received {0:'. format(json_file)) #close the connection ws.close() def on_error(ws, error): print (error) def on_close(ws): print ("### closed ###") def on_open(ws): message = { 'action': 'start', 'content-type': 'audio/flac', 'inactivity_timeout': -1 ws.send(json.dumps(message).encode('utf8')) audio_file = get_audio_filepath() #file = open(get_audio_filepath(), 'rb') #for chunk in read_in_chunks(file): # ws.send(chunk) with open (audio_file, "rb") as file: data = file.read() ws.send(data) print("sending file...") file_sent = {'action': 'stop' ws.send (json.dumps(file_sent).encode('utf8')) In [14]: websocket.enabletrace(true) ws = websocket.websocketapp(url, on_message = on_message, on_error = on_error, on_close = on_close) ws.on_open = on_open ws.run_forever() error from callback <function on_open at 0x108622ae8>: [Errno 32] Broken pipe Text message received: { "state": "listening" 3

4 [SSL: BAD_LENGTH] bad length (_ssl.c:1844) ### closed ### In [16]: #from websocket import create_connection ws = websocket.create_connection("ws://echo.websocket.org/") print ("Sending 'Hello, World'...") ws.send("hello, World") print ("Sent") print ("Receiving...") result = ws.recv() print ("Received '%s'" % result) ws.close() Sending 'Hello, World'... Sent Receiving... Received 'Hello, World' In [14]: #from websocket import create_connection ws = websocket.create_connection(url) message = { 'action': 'start', 'content-type': 'audio/flac;rate=16000' ws.send(json.dumps(message).encode('utf8')) print("opening connection") result = ws.recv() print("result: {0".format(result)) f = open(get_audio_filepath(), encoding = 'latin-1', buffering = 3) try: data = f.read() ws.send(data) Print("Data sent...") except Exception as e: print("goddamnit. Closing connection: {0".format(e)) result = ws.recv() opening connection Result: { "state": "listening" Goddamnit. Closing connection: [Errno 32] Broken pipe

5 SSLError Traceback (most recent call last) <ipython-input-14-0aedab596ca2> in <module>() 16 except Exception as e: 17 print("goddamnit. Closing connection: {0".format(e)) ---> 18 result = ws.recv() /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in re 291 return value: string(byte array) value. 292 """ --> 293 opcode, data = self.recv_data() 294 if six.py3 and opcode == ABNF.OPCODE_TEXT: 295 return data.decode("utf-8") /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in re 308 return value: tuple of operation code and string(byte array) value. 309 """ --> 310 opcode, frame = self.recv_data_frame(control_frame) 311 return opcode, frame.data 312 /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in re elif frame.opcode == ABNF.OPCODE_CLOSE: --> 337 self.send_close() 338 return frame.opcode, frame 339 elif frame.opcode == ABNF.OPCODE_PING: /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in se 368 raise ValueError("code is invalid range") 369 self.connected = False --> 370 self.send(struct.pack('!h', status) + reason, ABNF.OPCODE_CLOSE) def close(self, status=status_normal, reason=six.b(""), timeout=3): /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in se frame = ABNF.create_frame(payload, opcode) --> 234 return self.send_frame(frame) def send_frame(self, frame): 5

6 /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in se 257 with self.lock: 258 while data: --> 259 l = self._send(data) 260 data = data[l:] 261 /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_core.py in _s def _send(self, data): --> 423 return send(self.sock, data) def _recv(self, bufsize): /Users/kate/dev/pblc_dev/venv3_pblc/lib/python3.5/site-packages/websocket/_socket.py in try: --> 116 return sock.send(data) 117 except socket.timeout as e: 118 message = extract_err_message(e) /usr/local/cellar/python3/3.5.2_2/frameworks/python.framework/versions/3.5/lib/python "non-zero flags not allowed in calls to send() on %s" % 860 self. class ) --> 861 return self._sslobj.write(data) 862 else: 863 return socket.send(self, data, flags) /usr/local/cellar/python3/3.5.2_2/frameworks/python.framework/versions/3.5/lib/python The 'data' argument must support the buffer interface. 585 """ --> 586 return self._sslobj.write(data) def getpeercert(self, binary_form=false): SSLError: [SSL: BAD_LENGTH] bad length (_ssl.c:1844) In [16]: def on_message(ws, message): print (message) def on_error(ws, error): 6

7 print (error) def on_close(ws): print ("### closed ###") def on_open(ws): def run(*args): for i in range(3): time.sleep(1) ws.send("hello %d" % i) time.sleep(1) ws.close() print ("thread terminating...") thread.start_new_thread(run, ()) if name == " main ": websocket.enabletrace(true) ws = websocket.websocketapp("ws://echo.websocket.org/", on_message = on_message, on_error = on_error, on_close = on_close) ws.on_open = on_open ws.run_forever() [Errno 61] Connection refused ### closed ### In [ ]: 7

Requests Mock Documentation

Requests Mock Documentation Requests Mock Documentation Release 1.5.1.dev4 Jamie Lennox Jun 16, 2018 Contents 1 Overview 3 2 Using the Mocker 5 2.1 Activation................................................ 5 2.2 Class Decorator.............................................

More information

Enabling Full-Duplex Communications in APEX

Enabling Full-Duplex Communications in APEX Enabling Full-Duplex Communications in APEX Me Curt Workman - workmancw@ldschurch.org Education University of Utah Work Micron Electronics Evans&Sutherland The Church of Jesus Christ of Latter-Day Saints

More information

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios Simone Bordet sbordet@intalio.com 1 Agenda What are Comet web applications? Impacts of Comet web applications WebSocket

More information

iqoptionapi Release Jan 13, 2018

iqoptionapi Release Jan 13, 2018 iqoptionapi Release Jan 13, 2018 Contents 1 iqoptionapi 3 1.1 iqoptionapi package........................................... 3 1.1.1 Subpackages.......................................... 3 1.1.1.1 iqoptionapi.http

More information

sockjs-tornado documentation

sockjs-tornado documentation sockjs-tornado documentation Release 0.2 Serge S. Koval April 02, 2015 Contents 1 Topics 3 1.1 Statistics................................................. 3 1.2 Frequently Asked Questions.......................................

More information

Plumeria Documentation

Plumeria Documentation Plumeria Documentation Release 0.1 sk89q Aug 20, 2017 Contents 1 Considerations 3 2 Installation 5 2.1 Windows................................................. 5 2.2 Debian/Ubuntu..............................................

More information

SOCKET. Valerio Di Valerio

SOCKET. Valerio Di Valerio SOCKET Valerio Di Valerio The Problem! Communication between computers connected to a network Network Network applications! A set of processes distributed over a network that communicate via messages!

More information

A set of processes distributed over a network that communicate via messages. Processes communicate via services offered by the operating system

A set of processes distributed over a network that communicate via messages. Processes communicate via services offered by the operating system SOCKET Network applications A set of processes distributed over a network that communicate via messages Ex: Browser Web, BitTorrent, ecc Processes communicate via services offered by the operating system

More information

Using the Bluemix CLI IBM Corporation

Using the Bluemix CLI IBM Corporation Using the Bluemix CLI After you complete this section, you should understand: How to use the bx Bluemix command-line interface (CLI) to manage applications bx commands help you do tasks such as: Log in

More information

flask-jwt Documentation

flask-jwt Documentation flask-jwt Documentation Release 0.3.2 Dan Jacob Nov 16, 2017 Contents 1 Links 3 2 Installation 5 3 Quickstart 7 4 Configuration Options 9 5 API 11 6 Changelog 13 6.1 Flask-JWT Changelog..........................................

More information

Error num: 1 Meaning: Not owner Error num: 2 Meaning: No such file or directory Error num: 3 Meaning: No such process Error num: 4 Meaning:

Error num: 1 Meaning: Not owner Error num: 2 Meaning: No such file or directory Error num: 3 Meaning: No such process Error num: 4 Meaning: Error num: 1 Meaning: Not owner Error num: 2 Meaning: No such file or directory Error num: 3 Meaning: No such process Error num: 4 Meaning: Interrupted system call Error num: 5 Meaning: I/O error Error

More information

MEIN 50010: Python Flow Control

MEIN 50010: Python Flow Control : Python Fabian Sievers Higgins Lab, Conway Institute University College Dublin Wednesday, 2017-10-11 Program Overview Program Code Block Statements Expressions Expressions & Statements An expression has

More information

Introduction to python

Introduction to python Introduction to python 13 Files Rossano Venturini rossano.venturini@unipi.it File System A computer s file system consists of a tree-like structured organization of directories and files directory file

More information

Canonical Identity Provider Documentation

Canonical Identity Provider Documentation Canonical Identity Provider Documentation Release Canonical Ltd. December 14, 2018 Contents 1 API 3 1.1 General considerations.......................................... 3 1.2 Rate limiting...............................................

More information

CS Programming Languages: Python

CS Programming Languages: Python CS 3101-1 - Programming Languages: Python Lecture 5: Exceptions / Daniel Bauer (bauer@cs.columbia.edu) October 08 2014 Daniel Bauer CS3101-1 Python - 05 - Exceptions / 1/35 Contents Exceptions Daniel Bauer

More information

Python Essential Reference, Second Edition - Chapter 5: Control Flow Page 1 of 8

Python Essential Reference, Second Edition - Chapter 5: Control Flow Page 1 of 8 Python Essential Reference, Second Edition - Chapter 5: Control Flow Page 1 of 8 Chapter 5: Control Flow This chapter describes related to the control flow of a program. Topics include conditionals, loops,

More information

Batches and Commands. Overview CHAPTER

Batches and Commands. Overview CHAPTER CHAPTER 4 This chapter provides an overview of batches and the commands contained in the batch. This chapter has the following sections: Overview, page 4-1 Batch Rules, page 4-2 Identifying a Batch, page

More information

Integrating Entuity Network Management with BMC TrueSight Operations Management. For use with Entuity 16.5 downwards June 2017

Integrating Entuity Network Management with BMC TrueSight Operations Management. For use with Entuity 16.5 downwards June 2017 Integrating Entuity Network Management with BMC TrueSight Operations Management For use with Entuity 16.5 downwards June 2017 1 Document Overview 3 Installing the Entuity Network Component 3 Example 4

More information

L1/L2 NETWORK PROTOCOL TESTING

L1/L2 NETWORK PROTOCOL TESTING L1/L2 NETWORK PROTOCOL TESTING MODULE 1 : BASIC OF NETWORKING OSI Model TCP/IP Layers Service data unit & protocol data unit Protocols and standards Network What is network & Internet Network core circuit

More information

Introduction to programming using Python

Introduction to programming using Python Introduction to programming using Python Matthieu Choplin matthieu.choplin@city.ac.uk http://moodle.city.ac.uk/ Session 6-2 1 Objectives To open a file, read/write data from/to a file To use file dialogs

More information

What we already know. more of what we know. results, searching for "This" 6/21/2017. chapter 14

What we already know. more of what we know. results, searching for This 6/21/2017. chapter 14 What we already know chapter 14 Files and Exceptions II Files are bytes on disk. Two types, text and binary (we are working with text) open creates a connection between the disk contents and the program

More information

Django Synctool Documentation

Django Synctool Documentation Django Synctool Documentation Release 1.0.0 Preston Timmons November 01, 2014 Contents 1 Basic usage 3 1.1 How it works............................................... 4 2 Installation 5 3 Contents 7 3.1

More information

Composer Help. Web Request Common Block

Composer Help. Web Request Common Block Composer Help Web Request Common Block 7/4/2018 Web Request Common Block Contents 1 Web Request Common Block 1.1 Name Property 1.2 Block Notes Property 1.3 Exceptions Property 1.4 Request Method Property

More information

The Future of the Web: HTML 5, WebSockets, Comet and Server Sent Events

The Future of the Web: HTML 5, WebSockets, Comet and Server Sent Events The Future of the Web: HTML 5, WebSockets, Comet and Server Sent Events Sidda Eraiah Director of Management Services Kaazing Corporation Agenda Web Applications, where are they going? Real time data for

More information

Table of Contents EVALUATION COPY

Table of Contents EVALUATION COPY Table of Contents Introduction... 1-2 A Brief History of Python... 1-3 Python Versions... 1-4 Installing Python... 1-5 Environment Variables... 1-6 Executing Python from the Command Line... 1-7 IDLE...

More information

python-unrar Documentation

python-unrar Documentation python-unrar Documentation Release 0.3 Matias Bordese August 18, 2016 Contents 1 rarfile Work with RAR archives 3 1.1 RarFile Objects.............................................. 3 1.2 RarInfo Objects.............................................

More information

Pemrograman Jaringan Web Client Access PTIIK

Pemrograman Jaringan Web Client Access PTIIK Pemrograman Jaringan Web Client Access PTIIK - 2012 In This Chapter You'll learn how to : Download web pages Authenticate to a remote HTTP server Submit form data Handle errors Communicate with protocols

More information

Betamax Documentation

Betamax Documentation Betamax Documentation Release 0.8.1 Ian Stapleton Cordasco Apr 06, 2018 Narrative Documentation 1 Example Use 3 2 What does it even do? 5 3 VCR Cassette Compatibility 7 4 Contributing 9 5 Contents of

More information

Python scripting for Dell Command Monitor to Manage Windows & Linux Platforms

Python scripting for Dell Command Monitor to Manage Windows & Linux Platforms Python scripting for Dell Command Monitor to Manage Windows & Linux Platforms Dell Engineering July 2017 A Dell Technical White Paper Revisions Date June 2017 Description Initial release The information

More information

Programming WebSockets. Sean Sullivan OSCON July 22, 2010

Programming WebSockets. Sean Sullivan OSCON July 22, 2010 Programming WebSockets Sean Sullivan OSCON July 22, 2010 About me Web application developers HTML 5! improved JavaScript implementations! WebSockets! WebSockets? WebSockets a technology that enables

More information

Web Sockets and SignalR Building the Real Time Web

Web Sockets and SignalR Building the Real Time Web Web Sockets and SignalR Building the Real Time Web DDD South West Saturday 26th May 2012 Chris Alcock Agenda Introduction What is Real Time? Interactive? Web Sockets Who What When How? Examples (Client

More information

Speed up Your Web Applications with HTML5 WebSockets. Yakov Fain, Farata Systems, USA

Speed up Your Web Applications with HTML5 WebSockets. Yakov Fain, Farata Systems, USA Speed up Your Web Applications with HTML5 WebSockets Yakov Fain, Farata Systems, USA The Plan - HTTP request-response - Demo - Server-Sent Events - Demo - WebSocket - Demo What Do You See? HTTP Hacks

More information

CSC443: Web Programming 2

CSC443: Web Programming 2 CSC443: Web Programming Lecture 20: Web Sockets Haidar M. Harmanani HTML5 WebSocket Standardized by IETF in 2011. Supported by most major browsers including Google Chrome, Internet Explorer, Firefox, Safari

More information

Contents at a Glance

Contents at a Glance www.allitebooks.com For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them. www.allitebooks.com

More information

Java 9 New features 8/11/2017 Iason Dimitrios Rodis

Java 9 New features 8/11/2017 Iason Dimitrios Rodis Java 9 New features 8/11/2017 Iason Dimitrios Rodis 2 Java 9 - New features Release date: September 21st 2017 Features: Java 9 REPL (JShell) Factory Methods for Immutable List, Set, Map and Map.Entry Private

More information

Control Structures 1 / 17

Control Structures 1 / 17 Control Structures 1 / 17 Structured Programming Any algorithm can be expressed by: Sequence - one statement after another Selection - conditional execution (not conditional jumping) Repetition - loops

More information

All requests must be authenticated using the login and password you use to access your account.

All requests must be authenticated using the login and password you use to access your account. The REST API expects all text to be encoded as UTF-8, it is best to test by sending a message with a pound sign ( ) to confirm it is working as expected. If you are having issues sending as plain text,

More information

AlarmDecoder Documentation

AlarmDecoder Documentation AlarmDecoder Documentation Release Nu Tech Software Solutions, Inc. September 22, 2015 Contents 1 alarmdecoder Package 3 1.1 decoder Module............................................ 3 1.2 devices Module............................................

More information

com.walmartlabs/lacinia-pedestal Documentation

com.walmartlabs/lacinia-pedestal Documentation com.walmartlabs/lacinia-pedestal Documentation Release 0.10.1 Walmartlabs Sep 14, 2018 Contents 1 Overview 3 2 Request Format 5 2.1 GET................................................... 5 2.2 POST (application/json).........................................

More information

Asema IoT Central Notification API 1.0. English

Asema IoT Central Notification API 1.0. English Asema IoT Central Notification API 1.0 English Table of Contents 1. Introduction... 1 1.1. HTTP Push... 1 1.2. WebSockets... 1 1.3. MQTT... 2 2. Using HTTP Push... 3 2.1. Subscribing... 3 2.2. Parsing

More information

Error Code Called Name Not Present

Error Code Called Name Not Present Error Code Called Name Not Present How to fix this error: Ensure the function name is correct. With this error No 'Access-Control- Allow-Origin' header is present on the requested resource Means the code

More information

porcelain Documentation

porcelain Documentation porcelain Documentation Release August 20, 2014 Contents 1 Overview 3 2 Installation 5 3 Usage 7 3.1 Launching one-off programs....................................... 7 3.2 Passing input and

More information

API ONE-TIME PASSWORD

API ONE-TIME PASSWORD Mobile Marketing and Messaging Solutions WEB-BASED SMS SENDING PLATFORM Guide du débutant API ONE-TIME PASSWORD UTILISER LA PLATEFORME SMSMODE DOCUMENTATION WHAT OTP API? Our OTP (One Time Password) solution

More information

Large-Scale Networks

Large-Scale Networks Large-Scale Networks 3b Python for large-scale networks Dr Vincent Gramoli Senior lecturer School of Information Technologies The University of Sydney Page 1 Introduction Why Python? What to do with Python?

More information

API Documentation Downloads FAQ Forum. The phone number for Caller ID on callback. Delay in seconds before callback happens once contact is accepted

API Documentation Downloads FAQ Forum. The phone number for Caller ID on callback. Delay in seconds before callback happens once contact is accepted Sign In API Documentation Downloads FAQ Forum Home» API» Patron API PATRON API - V8.0 The Patron Services API is a collection of API calls that can be used to create patron-facing applications. A few examples

More information

STSCI Python Introduction. Class URL

STSCI Python Introduction. Class URL STSCI Python Introduction Class 2 Jim Hare Class URL www.pst.stsci.edu/~hare Each Class Presentation Homework suggestions Example files to download Links to sites by each class and in general I will try

More information

CLC Server Command Line Tools USER MANUAL

CLC Server Command Line Tools USER MANUAL CLC Server Command Line Tools USER MANUAL Manual for CLC Server Command Line Tools 2.2 Windows, Mac OS X and Linux August 29, 2014 This software is for research purposes only. CLC bio, a QIAGEN Company

More information

flask-jwt-simple Documentation

flask-jwt-simple Documentation flask-jwt-simple Documentation Release 0.0.3 vimalloc rlam3 Nov 17, 2018 Contents 1 Installation 3 2 Basic Usage 5 3 Changing JWT Claims 7 4 Changing Default Behaviors 9 5 Configuration Options 11 6 API

More information

System Workers. 1 of 11

System Workers. 1 of 11 System Workers System workers allow JavaScript code to call any external process (a shell command, PHP, etc.) on the same machine. By using callbacks, Wakanda makes it possible to communicate both ways.

More information

ObjectRiver. Metadata Compilers. WebSockets. JavaOne 2014 Steven Lemmo

ObjectRiver. Metadata Compilers. WebSockets. JavaOne 2014 Steven Lemmo ObjectRiver Metadata Compilers Programmatic WebSockets JavaOne 2014 Steven Lemmo 1 Sockets for the Web Finally! Before the Web ( Internal applications behind the firewall. Sockets RPC ( Sun ONC/RPC ) DCE

More information

Key Differences Between Python and Java

Key Differences Between Python and Java Python Python supports many (but not all) aspects of object-oriented programming; but it is possible to write a Python program without making any use of OO concepts. Python is designed to be used interpretively.

More information

1 (5) APPLICATION NOTE SCA11H HTTP API SAMPLE CODE. Murata Electronics Oy SCA11H Doc.No Rev. 1

1 (5) APPLICATION NOTE SCA11H HTTP API SAMPLE CODE. Murata Electronics Oy SCA11H Doc.No Rev. 1 1 (5) APPLICATION NOTE SCA11H HTTP API SAMPLE CODE 2 (5) General Description This document describes a simple method for interfacing with the SCA11H BCG sensor node through HTTP API. The method is described

More information

Task 2: TCP Communication

Task 2: TCP Communication UNIVERSITY OF TARTU, INSTITUTE OF COMPUTER SCIENCE Task 2: TCP Communication Hadachi&Lind October 12, 2017 Must Read: The task 2 should be done individually! You can submit your solution for task using

More information

Trigger SMS API. API Documentation SPLIO - SPRING Contact and Campaign Trigger SMS API - EN v4.0.docx

Trigger SMS API. API Documentation SPLIO - SPRING Contact and Campaign Trigger SMS API - EN v4.0.docx API Documentation 2017-09-08 Summary Introduction... 3 Access... 3 Base URL... 3 Europe hosting... 3 Asia hosting... 3 Authentication... 3 Request format... 4 Response format... 4 Error Codes & Responses...

More information

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython.

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython. INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython * bpython Getting started with. Setting up the IDE and various IDEs. Setting up

More information

IBM Security Access Manager Version January Federation Administration topics IBM

IBM Security Access Manager Version January Federation Administration topics IBM IBM Security Access Manager Version 9.0.2.1 January 2017 Federation Administration topics IBM IBM Security Access Manager Version 9.0.2.1 January 2017 Federation Administration topics IBM ii IBM Security

More information

IUID Registry Application Programming Interface (API) Version 5.6. Software User s Manual (SUM)

IUID Registry Application Programming Interface (API) Version 5.6. Software User s Manual (SUM) IUID Registry Application Programming Interface (API) Version 5.6 Software User s Manual (SUM) Document Version 1.0 May 28, 2014 Prepared by: CACI 50 N Laura Street Jacksonville FL 32202 Prepared for:

More information

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu)

There are two ways to use the python interpreter: interactive mode and script mode. (a) open a terminal shell (terminal emulator in Applications Menu) I. INTERACTIVE MODE VERSUS SCRIPT MODE There are two ways to use the python interpreter: interactive mode and script mode. 1. Interactive Mode (a) open a terminal shell (terminal emulator in Applications

More information

SystemWorker.exec( )

SystemWorker.exec( ) 1 28/06/2012 11:18 System workers allow JavaScript code to call any external process (a shell command, PHP, etc.) on the same machine. By using callbacks, Wakanda makes it possible to communicate both

More information

WEB API. Nuki Home Solutions GmbH. Münzgrabenstraße 92/ Graz Austria F

WEB API. Nuki Home Solutions GmbH. Münzgrabenstraße 92/ Graz Austria F WEB API v 1. 1 0 8. 0 5. 2 0 1 8 1. Introduction 2. Calling URL 3. Swagger Interface Example API call through Swagger 4. Authentication API Tokens OAuth 2 Code Flow OAuth2 Authentication Example 1. Authorization

More information

1999 Stackless Python 2004 Greenlet 2006 Eventlet 2009 Gevent 0.x (libevent) 2011 Gevent 1.0dev (libev, c-ares)

1999 Stackless Python 2004 Greenlet 2006 Eventlet 2009 Gevent 0.x (libevent) 2011 Gevent 1.0dev (libev, c-ares) Denis Bilenko 1999 Stackless Python 2004 Greenlet 2006 Eventlet 2009 Gevent 0.x (libevent) 2011 Gevent 1.0dev (libev, c-ares) Replaced libevent with libev Replaced libevent-dns with c-ares Event loop is

More information

Chapter 2 Writing Simple Programs

Chapter 2 Writing Simple Programs Chapter 2 Writing Simple Programs Charles Severance Textbook: Python Programming: An Introduction to Computer Science, John Zelle (www.si182.com) Software Development Process Figure out the problem - for

More information

FILE HANDLING AND EXCEPTIONS

FILE HANDLING AND EXCEPTIONS FILE HANDLING AND EXCEPTIONS INPUT We ve already seen how to use the input function for grabbing input from a user: input() >>> print(input('what is your name? ')) What is your name? Spongebob Spongebob

More information

django-oauth2-provider Documentation

django-oauth2-provider Documentation django-oauth2-provider Documentation Release 0.2.7-dev Alen Mujezinovic Aug 16, 2017 Contents 1 Getting started 3 1.1 Getting started.............................................. 3 2 API 5 2.1 provider.................................................

More information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D 1/60 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.

More information

LECTURE 10. Networking

LECTURE 10. Networking LECTURE 10 Networking NETWORKING IN PYTHON Many Python applications include networking the ability to communicate between multiple machines. We are going to turn our attention now to the many methods of

More information

Python 3 Quick Reference Card

Python 3 Quick Reference Card Python 3 Quick Reference Card Data types Strings: s = "foo bar" s = 'foo bar' s = r"c:\dir\new" # raw (== 'c:\\dir\\new') s = """Hello world""" s.join(" baz") n = len(s) "Ala ma {} psy i {} koty".format(2,3)

More information

APIs and API Design with Python

APIs and API Design with Python APIs and API Design with Python Lecture and Lab 5 Day Course Course Overview Application Programming Interfaces (APIs) have become increasingly important as they provide developers with connectivity to

More information

Pemrograman Jaringan Network Client

Pemrograman Jaringan Network Client Pemrograman Jaringan Network Client PTIIK - 2012 In This Chapter How to implement an application protocol on the client side. Course Contents 1 Understanding Socket 2 Creating Socket 3 Communicationg With

More information

Node.js. Node.js Overview. CS144: Web Applications

Node.js. Node.js Overview. CS144: Web Applications Node.js Node.js Overview JavaScript runtime environment based on Chrome V8 JavaScript engine Allows JavaScript to run on any computer JavaScript everywhere! On browsers and servers! Intended to run directly

More information

Essential Import Service

Essential Import Service Essential Import Service Interface Specification Version 2.0 March 2017 Contents Operation of the service Default callback listener Importing Microsoft Excel and CSV documents Operation of the service

More information

Dogeon Documentation. Release Lin Ju

Dogeon Documentation. Release Lin Ju Dogeon Documentation Release 1.0.0 Lin Ju June 07, 2014 Contents 1 Indices and tables 7 Python Module Index 9 i ii DSON (Doge Serialized Object Notation) is a data-interchange format,

More information

DCLI User's Guide. Data Center Command-Line Interface 2.9.1

DCLI User's Guide. Data Center Command-Line Interface 2.9.1 Data Center Command-Line Interface 2.9.1 You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ If you have comments about this documentation, submit

More information

API Wrapper Documentation

API Wrapper Documentation API Wrapper Documentation Release 0.1.7 Ardy Dedase February 09, 2017 Contents 1 API Wrapper 3 1.1 Overview................................................. 3 1.2 Installation................................................

More information

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes GIS 4653/5653: Spatial Programming and GIS More Python: Statements, Types, Functions, Modules, Classes Statement Syntax The if-elif-else statement Indentation and and colons are important Parentheses and

More information

Oracle Coherence and WebLogic 12c Delivering Real Time Push at Scale Steve Millidge

Oracle Coherence and WebLogic 12c Delivering Real Time Push at Scale Steve Millidge Oracle Coherence and WebLogic 12c Delivering Real Time Push at Scale Steve Millidge About Me Founder of C2B2 Leading Independent Middleware Experts Non-functional Experts Vendor Neutral Red Hat (JBoss),

More information

DCLI User's Guide. Data Center Command-Line Interface 2.7.0

DCLI User's Guide. Data Center Command-Line Interface 2.7.0 Data Center Command-Line Interface 2.7.0 You can find the most up-to-date technical documentation on the VMware Web site at: https://docs.vmware.com/ The VMware Web site also provides the latest product

More information

Keep Learning with Oracle University

Keep Learning with Oracle University Keep Learning with Oracle University Classroom Training Learning SubscripFon Live Virtual Class Training On Demand Cloud Technology ApplicaFons Industries educa7on.oracle.com 3 Session Surveys Help us

More information

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13 1 To Building WebSocket Apps in Java using JSR 356 Arun Gupta blogs.oracle.com/arungupta, @arungupta 2 The preceding is intended to outline our general product direction. It is intended for information

More information

Begin to code with Python Obtaining MTA qualification expanded notes

Begin to code with Python Obtaining MTA qualification expanded notes Begin to code with Python Obtaining MTA qualification expanded notes The Microsoft Certified Professional program lets you obtain recognition for your skills. Passing the exam 98-381, "Introduction to

More information

State of the real-time web with Django

State of the real-time web with Django State of the real-time web with Django Aymeric Augustin - @aymericaugustin DjangoCon US - September 5th, 2013 1 What are we talking about? 2 Real-time 1. Systems responding within deadlines 2. Simulations

More information

IBM Security Access Manager Version June Development topics IBM

IBM Security Access Manager Version June Development topics IBM IBM Security Access Manager Version 9.0.5 June 2018 Development topics IBM IBM Security Access Manager Version 9.0.5 June 2018 Development topics IBM ii IBM Security Access Manager Version 9.0.5 June

More information

Note : The Newtonsoft.Json.dll is open source. See home page at : Json.NET

Note : The Newtonsoft.Json.dll is open source. See home page at : Json.NET Description This package contains a tool that notifies a Dollar Universe node upon a mail reception on a Exchange mailbox. This allows you to start a new Dollar Universe workflow based on a mail. The main

More information

hdfs Documentation Release Author

hdfs Documentation Release Author hdfs Documentation Release 2.0.0 Author August 20, 2015 Contents 1 Installation 3 2 User guide 5 2.1 Quickstart................................................ 5 2.2 Advanced usage.............................................

More information

NODE.JS MOCK TEST NODE.JS MOCK TEST II

NODE.JS MOCK TEST NODE.JS MOCK TEST II http://www.tutorialspoint.com NODE.JS MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Node.js Framework. You can download these sample mock tests at

More information

How to Set Up External CA VPN Certificates

How to Set Up External CA VPN Certificates To configure a client-to-site, or site-to-site VPN using s created by External CA, you must create the following VPN s for the VPN service to be able to authenticate Before you begin Use an external CA

More information

Troubleshooting Single Sign-On

Troubleshooting Single Sign-On Security Trust Error Message, on page 1 "Invalid Profile Credentials" Message, on page 2 "Module Name Is Invalid" Message, on page 2 "Invalid OpenAM Access Manager (Openam) Server URL" Message, on page

More information

Nbconvert Refactor Final 1.0

Nbconvert Refactor Final 1.0 Nbconvert Refactor Final 1.0 Jonathan Frederic June 20, 2013 Part I Introduction IPython is an interactive Python computing environment[1]. It provides an enhanced interactive Python shell. The IPython

More information

Introduction to Python Network Programming for Network Architects and Engineers

Introduction to Python Network Programming for Network Architects and Engineers Introduction to Python Network Programming for Network Architects and Engineers Vince Kelly TSA Session ID: DEVNET-1040 Agenda Python Basics The Python Socket Module Security Higher Layer Protocols & APIs:

More information

IBM Security Access Manager for Mobile Version Developer topics

IBM Security Access Manager for Mobile Version Developer topics IBM Security Access Manager for Mobile Version 8.0.0.5 Developer topics IBM Security Access Manager for Mobile Version 8.0.0.5 Developer topics ii IBM Security Access Manager for Mobile Version 8.0.0.5:

More information

Troubleshooting Single Sign-On

Troubleshooting Single Sign-On Security Trust Error Message, page 1 "Invalid Profile Credentials" Message, page 2 "Module Name Is Invalid" Message, page 2 "Invalid OpenAM Access Manager (Openam) Server URL" Message, page 2 Web Browser

More information

MyGeotab Python SDK Documentation

MyGeotab Python SDK Documentation MyGeotab Python SDK Documentation Release 0.8.0 Aaron Toth Dec 13, 2018 Contents 1 Features 3 2 Usage 5 3 Installation 7 4 Documentation 9 5 Changes 11 5.1 0.8.0 (2018-06-18)............................................

More information

Beyond Blocks: Python Session #1

Beyond Blocks: Python Session #1 Beyond Blocks: Session #1 CS10 Spring 2013 Thursday, April 30, 2013 Michael Ball Beyond Blocks : : Session #1 by Michael Ball adapted from Glenn Sugden is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike

More information

JADE TCP/IP Connection and Worker Framework

JADE TCP/IP Connection and Worker Framework JADE TCP/IP Connection and Worker Framework Jade Software Corporation Limited cannot accept any financial or other responsibilities that may be the result of your use of this information or software material,

More information

code://rubinius/technical

code://rubinius/technical code://rubinius/technical /GC, /cpu, /organization, /compiler weeee!! Rubinius New, custom VM for running ruby code Small VM written in not ruby Kernel and everything else in ruby http://rubini.us git://rubini.us/code

More information

DCLI User's Guide. Modified on 20 SEP 2018 Data Center Command-Line Interface

DCLI User's Guide. Modified on 20 SEP 2018 Data Center Command-Line Interface Modified on 20 SEP 2018 Data Center Command-Line Interface 2.10.0 You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ If you have comments about

More information

DCLI User's Guide. Data Center Command-Line Interface

DCLI User's Guide. Data Center Command-Line Interface Data Center Command-Line Interface 2.10.2 You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ If you have comments about this documentation, submit

More information

PTN-102 Python programming

PTN-102 Python programming PTN-102 Python programming COURSE DESCRIPTION Prerequisite: basic Linux/UNIX and programming skills. Delivery Method Instructor-led training (ILT) Duration Four days Course outline Chapter 1: Introduction

More information

DEBUGGING TIPS. 1 Introduction COMPUTER SCIENCE 61A

DEBUGGING TIPS. 1 Introduction COMPUTER SCIENCE 61A DEBUGGING TIPS COMPUTER SCIENCE 61A 1 Introduction Every time a function is called, Python creates what is called a stack frame for that specific function to hold local variables and other information.

More information

Files on disk are organized hierarchically in directories (folders). We will first review some basics about working with them.

Files on disk are organized hierarchically in directories (folders). We will first review some basics about working with them. 1 z 9 Files Petr Pošík Department of Cybernetics, FEE CTU in Prague EECS, BE5B33PRG: Programming Essentials, 2015 Requirements: Loops Intro Information on a computer is stored in named chunks of data called

More information