Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit e697e80

Browse files
sanjeevghimiremarkstur
authored andcommitted
removed output and creds from nb (#19)
* removed output and creds from nb
1 parent 3772272 commit e697e80

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

notebooks/WML DB2.ipynb

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"metadata": {},
2727
"outputs": [],
2828
"source": [
29+
"!pip install --upgrade ibmos2spark\n",
2930
"!pip install --upgrade watson-machine-learning-client\n",
3031
"\n",
3132
"import numpy as np\n",
@@ -47,26 +48,7 @@
4748
"metadata": {},
4849
"outputs": [],
4950
"source": [
50-
"\n",
51-
"#PLEASE ENTER YOU OWN CREDENTIALS TO GET DATA FROM DATABASE. \n",
52-
"#CLICK THE 'FILE AND DATA' BUTTON THE TOP RIGHT SIDE OF THE MENU BAR\n",
53-
"\n",
54-
"\n",
55-
"#from ibmdbpy import IdaDataBase, IdaDataFrame\n",
56-
"\n",
57-
"# @hidden_cell\n",
58-
"# This connection object is used to access your data and contains your credentials.\n",
59-
"# You might want to remove those credentials before you share your notebook.\n",
60-
"#idadb_fe06e3df5eef4ac0b1c246b40ed3db6e = IdaDataBase(dsn='DASHDB;Database=BLUDB;Hostname=dashdb-txn-sbox-yp-dal09-03.services.dal.bluemix.net;Port=50000;PROTOCOL=TCPIP;UID=pcl47325;PWD=mwhpp-qlc4wf54s4')\n",
61-
"\n",
62-
"#pd_df = IdaDataFrame(idadb_fe06e3df5eef4ac0b1c246b40ed3db6e, 'PCL47325.HOME_SALES').as_dataframe()\n",
63-
"#pd_df.head()\n",
64-
"\n",
65-
"# You can close the database connection with the following code. Please keep the comment line with the @hidden_cell tag,\n",
66-
"# because the close function displays parts of the credentials.\n",
67-
"# @hidden_cell\n",
68-
"# idadb_fe06e3df5eef4ac0b1c246b40ed3db6e.close()\n",
69-
"# To learn more about the ibmdby package, please read the documentation: http://pythonhosted.org/ibmdbpy/\n"
51+
"# Connect to datasource\n"
7052
]
7153
},
7254
{
@@ -523,11 +505,12 @@
523505
"metadata": {},
524506
"outputs": [],
525507
"source": [
508+
"# Replace the credentials that you got from Watson Machine Learning service\n",
526509
"from watson_machine_learning_client import WatsonMachineLearningAPIClient\n",
527-
"wml_credentials = {\n",
528-
" \"apikey\": \"<API KEY>\",\n",
529-
" \"instance_id\": '<INSTANCE ID>',\n",
530-
" \"url\": \"<URL>\"\n",
510+
"wml_credentials = { \n",
511+
" \"apikey\": \"<api key>\",\n",
512+
" \"instance_id\": \"<instance id>\",\n",
513+
" \"url\": \"<URL>\"\n",
531514
"}\n",
532515
"client = WatsonMachineLearningAPIClient(wml_credentials)"
533516
]

0 commit comments

Comments
 (0)