Skip to content

Commit

Permalink
Fixed notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mykolamelnykml committed May 14, 2020
1 parent 28ca8de commit fc857fc
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 80 deletions.
14 changes: 8 additions & 6 deletions jupyter/SparkOCRS3AccesExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"SparkConf Configured, Starting to listen on port: 50980\n",
"SparkConf Configured, Starting to listen on port: 50635\n",
"JAR PATH:/usr/local/lib/python3.7/site-packages/sparkmonitor/listener.jar\n"
]
},
Expand All @@ -89,7 +89,7 @@
" <div>\n",
" <p><b>SparkContext</b></p>\n",
"\n",
" <p><a href=\"http://melnyks-mbp:4040\">Spark UI</a></p>\n",
" <p><a href=\"http://melnyks-mbp.dlink:4040\">Spark UI</a></p>\n",
"\n",
" <dl>\n",
" <dt>Version</dt>\n",
Expand All @@ -105,7 +105,7 @@
" "
],
"text/plain": [
"<pyspark.sql.session.SparkSession at 0x122268d10>"
"<pyspark.sql.session.SparkSession at 0x126ecc610>"
]
},
"execution_count": 4,
Expand All @@ -124,6 +124,8 @@
"# you can set AWS API Keys to env variables \n",
"# os.environ['AWS_ACCESS_KEY_ID'] = \"your key\"\n",
"# os.environ['AWS_SECRET_ACCESS_KEY'] = \"your secret\"\n",
"os.environ['AWS_ACCESS_KEY_ID'] = \"AKIASRWSDKBGBUGEZJ3G\"\n",
"os.environ['AWS_SECRET_ACCESS_KEY'] = \"BEJUdxKC9H/Zn/qgDUV6ScAyGhPay68lMX9m096P\"\n",
"\n",
"# set additinal dependensies for read data from S3\n",
"conf = SparkConf() \\\n",
Expand Down Expand Up @@ -208,7 +210,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -238,7 +240,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -904,4 +906,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion jupyter/SparkOCRWritePdfToS3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@
}
],
"source": [
"results.write\n",
"results.write \\\n",
" .format(\"binaryFormat\") \\\n",
" .option(\"type\", \"pdf\") \\\n",
" .option(\"field\", \"pdf\") \\\n",
Expand Down
Loading

0 comments on commit fc857fc

Please sign in to comment.