From 2b0b69df87a483f2ff1d3b761b8cc391594039c9 Mon Sep 17 00:00:00 2001 From: Hans Henseler Date: Tue, 16 May 2023 21:20:06 +0200 Subject: [PATCH] Renamed file to exercise 01 --- query_word_cloud.py => 01 query_word_cloud.py | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) rename query_word_cloud.py => 01 query_word_cloud.py (55%) diff --git a/query_word_cloud.py b/01 query_word_cloud.py similarity index 55% rename from query_word_cloud.py rename to 01 query_word_cloud.py index 651d0cb..f197df8 100644 --- a/query_word_cloud.py +++ b/01 query_word_cloud.py @@ -8,16 +8,21 @@ import matplotlib.pyplot as plt from hansken.connect import connect_project # setup hansken connection -in_browser = 'js' in sys.modules -hansken_host = '' -context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', - project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', - keystore=f'http://{hansken_host}:9091/keystore/', - # Authentication is faked if we run in the browser, - # because an authenticated session should already be present - auth=SimpleNamespace() if in_browser else None, - interactive=True) +# in_browser = 'js' in sys.modules +# hansken_host = '' +# context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', +# project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', +# keystore=f'http://{hansken_host}:9091/keystore/', +# # Authentication is faked if we run in the browser, +# # because an authenticated session should already be present +# auth=SimpleNamespace() if in_browser else None, +# interactive=True) +# Hansken SDK running on localhost + +context = connect_project(endpoint='http://localhost:9091/gatekeeper/', + project='d42bd9c3-63db-474c-a36f-b87e1eb9e2d3', + keystore='http://localhost:9090/keystore/') # %% [markdown] ### Collect words # The cell below searches for all `chatMessage` traces in the current project. The `chatMessage.message` property contains the actual message. All found messages are concatenated in a single long string. @@ -39,3 +44,5 @@ plt.figure(figsize=(20, 6)) plt.imshow(wc, interpolation="bilinear") plt.axis("off") plt.show() + +# %%