This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (1) py27 | |
| (2) py35 | |
| Please select one of the above environment language (e.g. py27): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from authorizenet import apicontractsv1 | |
| from authorizenet.apicontrollers import* | |
| from decimal import* | |
| import credentials # importing our credentials from credentials.py | |
| # Authentication steps using Authorize.Net API credentials | |
| merchantAuth = apicontractsv1.merchantAuthenticationType() | |
| merchantAuth.name = credentials.api_login_name | |
| merchantAuth.transactionKey = credentials.transaction_key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto3 | |
| # instantiate local comprehend client | |
| comprehend_client = boto3.client('comprehend') | |
| text = "A classic love heart emoji, used for expressions of love. Displayed in various shades of red on most platforms. A similar emoji exists for the heart suit in a deck of playing cards. On Snapchat, this emoji displays next to a friend when you have been #1 BFs with each other for two consecutive weeks." | |
| # Invoke detect_key_phrases endopint and get response | |
| comprehend_response = comprehend_client.detect_key_phrases(Text=text, LanguageCode='en') |
OlderNewer