Skip to content

Instantly share code, notes, and snippets.

@azarnyx
Last active June 30, 2019 12:04
Show Gist options
  • Save azarnyx/b2ef9786d83c375de49a5d9b9b70a148 to your computer and use it in GitHub Desktop.
Save azarnyx/b2ef9786d83c375de49a5d9b9b70a148 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "r-XNfLVrl0GC"
},
"outputs": [],
"source": [
"import os\n",
"import json\n",
"import pickle\n",
"\n",
"# this dictionary is a copy of a JSON file from step (1),\n",
"# insert your own credentials of your service account\n",
"dic = {'type': '',\n",
"'project_id': '',\n",
"'private_key_id': '',\n",
"'private_key': '',\n",
"'client_email': '',\n",
"'client_id': '',\n",
"'auth_uri': '',\n",
"'token_uri': '',\n",
"'auth_provider_x509_cert_url': '',\n",
"'client_x509_cert_url': ''}\n",
"\n",
"with open('gs_secrets.json', 'w') as json_file:\n",
" json.dump(dic, json_file)\n",
"os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'gs_secrets.json'\n",
"\n",
"sql_string = \"postgresql://<username>:<password>@<sql ip>/<name of table>\""
]
}
],
"metadata": {
"colab": {
"collapsed_sections": [],
"name": "Colab_MLflow_test.ipynb",
"provenance": [],
"version": "0.3.2"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment