Skip to content

Commit 981c922

Browse files
committed
updating indentation
1 parent 8425992 commit 981c922

21 files changed

Lines changed: 75 additions & 53 deletions

examples/alchemy_data_news_v1.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
results = alchemy_data_news.get_news_documents(start='now-7d', end='now', time_slice='12h')
77
print(json.dumps(results, indent=2))
88

9-
results = alchemy_data_news.get_news_documents(start='1453334400', end='1454022000',
10-
return_fields=['enriched.url.title',
11-
'enriched.url.url',
12-
'enriched.url.author',
13-
'enriched.url.publicationDate'],
14-
query_fields={'q.enriched.url.enrichedTitle.entities.entity':
15-
'|text=IBM,type=company|'})
9+
results = alchemy_data_news.get_news_documents(
10+
start='1453334400',
11+
end='1454022000',
12+
return_fields=['enriched.url.title',
13+
'enriched.url.url',
14+
'enriched.url.author',
15+
'enriched.url.publicationDate'],
16+
query_fields={'q.enriched.url.enrichedTitle.entities.entity': '|text=IBM,type=company|'})
1617
print(json.dumps(results, indent=2))

examples/authorization_v1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
from watson_developer_cloud import AuthorizationV1
33
from watson_developer_cloud import SpeechToTextV1
44

5-
authorization = AuthorizationV1(username='YOUR SERVICE USERNAME',
6-
password='YOUR SERVICE PASSWORD')
5+
authorization = AuthorizationV1(
6+
username='YOUR SERVICE USERNAME',
7+
password='YOUR SERVICE PASSWORD')
78

89
print(json.dumps(authorization.get_token(url=SpeechToTextV1.default_url), indent=2))

examples/concept_expansion_v1.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
from watson_developer_cloud import ConceptExpansionV1Beta
55

66

7-
concept_expansion = ConceptExpansionV1Beta(username='YOUR SERVICE USERNAME',
8-
password='YOUR SERVICE PASSWORD')
7+
concept_expansion = ConceptExpansionV1Beta(
8+
username='YOUR SERVICE USERNAME',
9+
password='YOUR SERVICE PASSWORD')
910

10-
job_id = concept_expansion.create_job(dataset='mtsamples', seeds=[
11-
'motrin', 'tylenol', 'aspirin'], label='medications')
11+
job_id = concept_expansion.create_job(
12+
dataset='mtsamples', seeds=['motrin', 'tylenol', 'aspirin'], label='medications')
1213
print(json.dumps(job_id, indent=2))
1314

1415
time.sleep(5) # sleep for 5 seconds

examples/concept_insights_v2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from watson_developer_cloud import ConceptInsightsV2
44

55

6-
concept_insights = ConceptInsightsV2(username='YOUR SERVICE USERNAME',
7-
password='YOUR SERVICE PASSWORD')
6+
concept_insights = ConceptInsightsV2(
7+
username='YOUR SERVICE USERNAME',
8+
password='YOUR SERVICE PASSWORD')
89

910
accounts = concept_insights.get_accounts_info()
1011
print(json.dumps(accounts, indent=2))

examples/dialog_v1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
from watson_developer_cloud import DialogV1
55

66

7-
dialog = DialogV1(username='YOUR SERVICE USERNAME',
8-
password='YOUR SERVICE PASSWORD')
7+
dialog = DialogV1(
8+
username='YOUR SERVICE USERNAME',
9+
password='YOUR SERVICE PASSWORD')
910

1011
print(json.dumps(dialog.get_dialogs(), indent=2))
1112

examples/document_conversion_v1.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
from watson_developer_cloud import DocumentConversionV1
55

66

7-
document_conversion = DocumentConversionV1(username='YOUR SERVICE USERNAME',
8-
password='YOUR SERVICE PASSWORD',
9-
version='2016-02-09')
7+
document_conversion = DocumentConversionV1(
8+
username='YOUR SERVICE USERNAME',
9+
password='YOUR SERVICE PASSWORD',
10+
version='2016-02-09')
1011

1112
# Example of retrieving html or plain text
1213
with open(join(dirname(__file__), '../resources/example.html'), 'r') as document:

examples/document_conversion_v1_experimental.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
from watson_developer_cloud import DocumentConversionV1Experimental
55

66

7-
document_conversion = DocumentConversionV1Experimental(username='YOUR SERVICE USERNAME',
8-
password='YOUR SERVICE PASSWORD')
7+
document_conversion = DocumentConversionV1Experimental(
8+
username='YOUR SERVICE USERNAME',
9+
password='YOUR SERVICE PASSWORD')
910

1011
# print(json.dumps(document_conversion.get_jobs(), indent=2))
1112

examples/language_translation_v2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from watson_developer_cloud import LanguageTranslationV2
44

55

6-
language_translation = LanguageTranslationV2(username='YOUR SERVICE USERNAME',
7-
password='YOUR SERVICE PASSWORD')
6+
language_translation = LanguageTranslationV2(
7+
username='YOUR SERVICE USERNAME',
8+
password='YOUR SERVICE PASSWORD')
89

910
# create new custom model
1011
# with open('../resources/language_translation_model.tmx', 'rb') as custom_model:

examples/natural_language_classifier_v1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from watson_developer_cloud import NaturalLanguageClassifierV1
44

55

6-
natural_language_classifier = NaturalLanguageClassifierV1(username='YOUR SERVICE USERNAME',
7-
password='YOUR SERVICE PASSWORD')
6+
natural_language_classifier = NaturalLanguageClassifierV1(
7+
username='YOUR SERVICE USERNAME',
8+
password='YOUR SERVICE PASSWORD')
89

910
classifiers = natural_language_classifier.list()
1011
print(json.dumps(classifiers, indent=2))

examples/personality_insights_v2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from watson_developer_cloud import PersonalityInsightsV2
44

55

6-
personality_insights = PersonalityInsightsV2(username='YOUR SERVICE USERNAME',
7-
password='YOUR SERVICE PASSWORD')
6+
personality_insights = PersonalityInsightsV2(
7+
username='YOUR SERVICE USERNAME',
8+
password='YOUR SERVICE PASSWORD')
89

910
with open(join(dirname(__file__), '../resources/personality.txt')) as personality_text:
1011
print(json.dumps(personality_insights.profile(

0 commit comments

Comments
 (0)