Skip to content

Commit

Permalink
Merge pull request #231 from Sharon-iguazio/master
Browse files Browse the repository at this point in the history
MERGE demos/slots-stream/real-time-user-segmentation.ipynb changes from `development` to `master`
  • Loading branch information
Sharon-iguazio authored Apr 12, 2020
2 parents 8dd7536 + a93254f commit d74c6d2
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions demos/slots-stream/real-time-user-segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,23 +221,7 @@
"# Delete the stream if it exists\n",
"client.delete(backend=\"stream\", table=TABLE, if_missing=fpb.IGNORE)\n",
"# Create a new stream\n",
"client.create(backend=\"stream\", table=TABLE, shards=SHARDS_COUNT, retention_hours=DURATION_HOURS)\n",
"\n",
"url = 'http://v3io-webapi:8081/users/' + os.getenv('V3IO_USERNAME') + '/examples/' + STREAM + '/'\n",
"headers = {\n",
" \"Content-Type\": \"application/json\",\n",
" \"X-v3io-function\": \"PutRecords\",\n",
" \"X-v3io-session-key\": os.getenv('V3IO_ACCESS_KEY')\n",
" }\n",
"\n",
"records = []\n",
"\n",
"def send_payload(records):\n",
" if (len(records) > 0):\n",
" payload = {\n",
" \"Records\": records\n",
" }\n",
" requests.post(url, json=payload, headers=headers, verify=False)"
"client.create(backend=\"stream\", table=TABLE, shards=SHARDS_COUNT, retention_hours=DURATION_HOURS)"
]
},
{
Expand Down

0 comments on commit d74c6d2

Please sign in to comment.