Skip to content

Commit 1e6c210

Browse files
Add UUIDs to notebook telemetry (#58)
1 parent fab0fed commit 1e6c210

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

examples/broadcasting/broadcasting.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
"source": [
7272
"import os\n",
7373
"import time\n",
74-
"import sys"
74+
"import sys\n",
75+
"import uuid"
7576
]
7677
},
7778
{
@@ -149,7 +150,7 @@
149150
"\n",
150151
"# Set telemetry if opted in\n",
151152
"if enable_telemetry:\n",
152-
" identifier = \"nada-numpy-broadcasting\" + my_identifier\n",
153+
" identifier = f\"nada-numpy-broadcasting-{str(uuid.uuid4())}-{my_identifier}\"\n",
153154
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
154155
"\n",
155156
"# Install the lastest SDK and initialise it\n",

examples/dot_product/dot_product.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@
9494
"source": [
9595
"import os\n",
9696
"import time\n",
97-
"import sys"
97+
"import sys\n",
98+
"import uuid"
9899
]
99100
},
100101
{
@@ -168,7 +169,7 @@
168169
"\n",
169170
"# Set telemetry if opted in\n",
170171
"if enable_telemetry:\n",
171-
" identifier = \"nada-numpy-dot-product\" + my_identifier\n",
172+
" identifier = f\"nada-numpy-dot-product-{str(uuid.uuid4())}-{my_identifier}\"\n",
172173
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
173174
"\n",
174175
"# Install the lastest SDK and initialise it\n",

examples/linear_regression/linear_regression.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
"source": [
8989
"import os\n",
9090
"import time\n",
91-
"import sys"
91+
"import sys\n",
92+
"import uuid"
9293
]
9394
},
9495
{
@@ -164,7 +165,7 @@
164165
"\n",
165166
"# Set telemetry if opted in\n",
166167
"if enable_telemetry:\n",
167-
" identifier = \"nada-numpy-linear-regression-cf\" + my_identifier\n",
168+
" identifier = f\"nada-numpy-linear-regression-cf-{str(uuid.uuid4())}-{my_identifier}\"\n",
168169
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
169170
"\n",
170171
"# Install the lastest SDK and initialise it\n",

examples/matrix_multiplication/matrix_multiplication.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
"source": [
7474
"import os\n",
7575
"import time\n",
76-
"import sys"
76+
"import sys\n",
77+
"import uuid"
7778
]
7879
},
7980
{
@@ -149,7 +150,7 @@
149150
"\n",
150151
"# Set telemetry if opted in\n",
151152
"if enable_telemetry:\n",
152-
" identifier = \"nada-numpy-matrix-multiplication\" + my_identifier\n",
153+
" identifier = f\"nada-numpy-matrix-multiplication-{str(uuid.uuid4())}-{my_identifier}\"\n",
153154
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
154155
"\n",
155156
"# Install the lastest SDK and initialise it\n",

examples/rational_numbers/rational_numbers.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
"source": [
7474
"import os\n",
7575
"import time\n",
76-
"import sys"
76+
"import sys\n",
77+
"import uuid"
7778
]
7879
},
7980
{
@@ -149,7 +150,7 @@
149150
"\n",
150151
"# Set telemetry if opted in\n",
151152
"if enable_telemetry:\n",
152-
" identifier = \"nada-numpy-rational-numbers\" + my_identifier\n",
153+
" identifier = f\"nada-numpy-rational-numbers-{str(uuid.uuid4())}-{my_identifier}\"\n",
153154
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
154155
"\n",
155156
"# Install the lastest SDK and initialise it\n",

0 commit comments

Comments
 (0)