Skip to content

Commit 8dbf08c

Browse files
Use github username for telemetry (#59)
Use github username for telemetry
1 parent 1e6c210 commit 8dbf08c

File tree

5 files changed

+23
-46
lines changed

5 files changed

+23
-46
lines changed

examples/broadcasting/broadcasting.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
},
6161
"outputs": [],
6262
"source": [
63-
"%pip install nada-numpy --quiet"
63+
"%%capture\n",
64+
"!pip install nada-numpy"
6465
]
6566
},
6667
{
@@ -85,7 +86,7 @@
8586
"source": [
8687
"# Configure telemetry settings\n",
8788
"enable_telemetry = True #@param {type:\"boolean\"}\n",
88-
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
89+
"my_github_username = \"your-github-username\" #@param {type:\"string\"}"
8990
]
9091
},
9192
{
@@ -150,7 +151,7 @@
150151
"\n",
151152
"# Set telemetry if opted in\n",
152153
"if enable_telemetry:\n",
153-
" identifier = f\"nada-numpy-broadcasting-{str(uuid.uuid4())}-{my_identifier}\"\n",
154+
" identifier = f\"nada-numpy-broadcasting-{str(uuid.uuid4())}-{my_github_username}\"\n",
154155
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
155156
"\n",
156157
"# Install the lastest SDK and initialise it\n",

examples/dot_product/dot_product.ipynb

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,26 +62,10 @@
6262
"id": "o4PXBlE2v_7K",
6363
"outputId": "57adf7cd-0d00-4463-b993-45b2d0f3f904"
6464
},
65-
"outputs": [
66-
{
67-
"name": "stdout",
68-
"output_type": "stream",
69-
"text": [
70-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m54.8/54.8 kB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
71-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m18.2/18.2 MB\u001b[0m \u001b[31m30.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
72-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.6/12.6 MB\u001b[0m \u001b[31m22.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
73-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m413.1/413.1 kB\u001b[0m \u001b[31m17.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
74-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m294.6/294.6 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
75-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m149.3/149.3 kB\u001b[0m \u001b[31m1.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
76-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m28.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
77-
"\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
78-
"tensorflow-metadata 1.15.0 requires protobuf<4.21,>=3.20.3; python_version < \"3.11\", but you have protobuf 4.25.3 which is incompatible.\u001b[0m\u001b[31m\n",
79-
"\u001b[0m"
80-
]
81-
}
82-
],
65+
"outputs": [],
8366
"source": [
84-
"%pip install nada-numpy --quiet"
67+
"%%capture\n",
68+
"!pip install nada-numpy"
8569
]
8670
},
8771
{
@@ -106,7 +90,7 @@
10690
"source": [
10791
"# Configure telemetry settings\n",
10892
"enable_telemetry = True #@param {type:\"boolean\"}\n",
109-
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
93+
"my_github_username = \"your-github-username\" #@param {type:\"string\"}"
11094
]
11195
},
11296
{
@@ -169,7 +153,7 @@
169153
"\n",
170154
"# Set telemetry if opted in\n",
171155
"if enable_telemetry:\n",
172-
" identifier = f\"nada-numpy-dot-product-{str(uuid.uuid4())}-{my_identifier}\"\n",
156+
" identifier = f\"nada-numpy-dot-product-{str(uuid.uuid4())}-{my_github_username}\"\n",
173157
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
174158
"\n",
175159
"# Install the lastest SDK and initialise it\n",

examples/linear_regression/linear_regression.ipynb

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,10 @@
6262
"id": "o4PXBlE2v_7K",
6363
"outputId": "57adf7cd-0d00-4463-b993-45b2d0f3f904"
6464
},
65-
"outputs": [
66-
{
67-
"name": "stdout",
68-
"output_type": "stream",
69-
"text": [
70-
"\n",
71-
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.0.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.2\u001b[0m\n",
72-
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",
73-
"Note: you may need to restart the kernel to use updated packages.\n"
74-
]
75-
}
76-
],
65+
"outputs": [],
7766
"source": [
78-
"%pip install nada-numpy --quiet"
67+
"%%capture\n",
68+
"!pip install nada-numpy"
7969
]
8070
},
8171
{
@@ -100,7 +90,7 @@
10090
"source": [
10191
"# Configure telemetry settings\n",
10292
"enable_telemetry = True #@param {type:\"boolean\"}\n",
103-
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
93+
"my_github_username = \"your-github-username\" #@param {type:\"string\"}"
10494
]
10595
},
10696
{
@@ -165,7 +155,7 @@
165155
"\n",
166156
"# Set telemetry if opted in\n",
167157
"if enable_telemetry:\n",
168-
" identifier = f\"nada-numpy-linear-regression-cf-{str(uuid.uuid4())}-{my_identifier}\"\n",
158+
" identifier = f\"nada-numpy-linear-regression-cf-{str(uuid.uuid4())}-{my_github_username}\"\n",
169159
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
170160
"\n",
171161
"# Install the lastest SDK and initialise it\n",
@@ -512,7 +502,7 @@
512502
"name": "python",
513503
"nbconvert_exporter": "python",
514504
"pygments_lexer": "ipython3",
515-
"version": "3.10.14"
505+
"version": "3.12.2"
516506
}
517507
},
518508
"nbformat": 4,

examples/matrix_multiplication/matrix_multiplication.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
},
6161
"outputs": [],
6262
"source": [
63-
"%pip install nada-numpy~=0.3.0 --quiet"
63+
"%%capture\n",
64+
"!pip install nada-numpy~=0.3.0"
6465
]
6566
},
6667
{
@@ -85,7 +86,7 @@
8586
"source": [
8687
"# Configure telemetry settings\n",
8788
"enable_telemetry = True #@param {type:\"boolean\"}\n",
88-
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
89+
"my_github_username = \"your-github-username\" #@param {type:\"string\"}"
8990
]
9091
},
9192
{
@@ -150,7 +151,7 @@
150151
"\n",
151152
"# Set telemetry if opted in\n",
152153
"if enable_telemetry:\n",
153-
" identifier = f\"nada-numpy-matrix-multiplication-{str(uuid.uuid4())}-{my_identifier}\"\n",
154+
" identifier = f\"nada-numpy-matrix-multiplication-{str(uuid.uuid4())}-{my_github_username}\"\n",
154155
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
155156
"\n",
156157
"# Install the lastest SDK and initialise it\n",

examples/rational_numbers/rational_numbers.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
},
6161
"outputs": [],
6262
"source": [
63-
"%pip install nada-numpy~=0.3.0 --quiet"
63+
"%%capture\n",
64+
"!pip install nada-numpy~=0.3.0"
6465
]
6566
},
6667
{
@@ -85,7 +86,7 @@
8586
"source": [
8687
"# Configure telemetry settings\n",
8788
"enable_telemetry = True #@param {type:\"boolean\"}\n",
88-
"my_identifier = \"your-telemetry-identifier\" #@param {type:\"string\"}"
89+
"my_github_username = \"your-github-username\" #@param {type:\"string\"}"
8990
]
9091
},
9192
{
@@ -150,7 +151,7 @@
150151
"\n",
151152
"# Set telemetry if opted in\n",
152153
"if enable_telemetry:\n",
153-
" identifier = f\"nada-numpy-rational-numbers-{str(uuid.uuid4())}-{my_identifier}\"\n",
154+
" identifier = f\"nada-numpy-rational-numbers-{str(uuid.uuid4())}-{my_github_username}\"\n",
154155
" !echo 'yes' | nilup instrumentation enable --wallet {identifier}\n",
155156
"\n",
156157
"# Install the lastest SDK and initialise it\n",

0 commit comments

Comments
 (0)