Skip to content

Commit d9f952d

Browse files
committed
Remove duplicate cells
1 parent bb8ff34 commit d9f952d

File tree

1 file changed

+12
-91
lines changed

1 file changed

+12
-91
lines changed

TitaniumCloud/sample_management.ipynb

Lines changed: 12 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
{
4343
"cell_type": "code",
44-
"execution_count": 1,
44+
"execution_count": null,
4545
"metadata": {},
4646
"outputs": [],
4747
"source": [
@@ -62,7 +62,7 @@
6262
},
6363
{
6464
"cell_type": "code",
65-
"execution_count": 1,
65+
"execution_count": null,
6666
"metadata": {},
6767
"outputs": [],
6868
"source": [
@@ -90,7 +90,7 @@
9090
},
9191
{
9292
"cell_type": "code",
93-
"execution_count": 1,
93+
"execution_count": null,
9494
"metadata": {},
9595
"outputs": [],
9696
"source": [
@@ -138,7 +138,7 @@
138138
},
139139
{
140140
"cell_type": "code",
141-
"execution_count": 1,
141+
"execution_count": null,
142142
"metadata": {},
143143
"outputs": [],
144144
"source": [
@@ -176,7 +176,7 @@
176176
},
177177
{
178178
"cell_type": "code",
179-
"execution_count": 1,
179+
"execution_count": null,
180180
"metadata": {},
181181
"outputs": [],
182182
"source": [
@@ -210,7 +210,7 @@
210210
},
211211
{
212212
"cell_type": "code",
213-
"execution_count": 1,
213+
"execution_count": null,
214214
"metadata": {},
215215
"outputs": [],
216216
"source": [
@@ -247,7 +247,7 @@
247247
"metadata": {
248248
"collapsed": false
249249
},
250-
"execution_count": 1
250+
"execution_count": null
251251
},
252252
{
253253
"cell_type": "markdown",
@@ -277,7 +277,7 @@
277277
"metadata": {
278278
"collapsed": false
279279
},
280-
"execution_count": 1
280+
"execution_count": null
281281
},
282282
{
283283
"cell_type": "markdown",
@@ -305,7 +305,7 @@
305305
"metadata": {
306306
"collapsed": false
307307
},
308-
"execution_count": 1
308+
"execution_count": null
309309
},
310310
{
311311
"cell_type": "markdown",
@@ -333,7 +333,7 @@
333333
"metadata": {
334334
"collapsed": false
335335
},
336-
"execution_count": 1
336+
"execution_count": null
337337
},
338338
{
339339
"cell_type": "markdown",
@@ -364,7 +364,8 @@
364364
],
365365
"metadata": {
366366
"collapsed": false
367-
}
367+
},
368+
"execution_count": null
368369
},
369370
{
370371
"cell_type": "raw",
@@ -374,86 +375,6 @@
374375
"metadata": {
375376
"collapsed": false
376377
}
377-
},
378-
{
379-
"cell_type": "code",
380-
"execution_count": 1,
381-
"metadata": {},
382-
"outputs": [],
383-
"source": [
384-
"file_override_response = file_reputation_override.list_active_overrides(\"sha256\")\n",
385-
"print(file_override_response.text)\n",
386-
"is_in = \"in\" if file_override_response.text.find(sample_sha256) != -1 else \"not in\"\n",
387-
"print(\"\")\n",
388-
"print(f\"Sample is {is_in} the returned response page\")"
389-
]
390-
},
391-
{
392-
"cell_type": "markdown",
393-
"metadata": {
394-
"collapsed": false
395-
},
396-
"source": [
397-
"Cleaning up the override classification is easy. We do it using the same method as before."
398-
]
399-
},
400-
{
401-
"cell_type": "code",
402-
"execution_count": 1,
403-
"metadata": {},
404-
"outputs": [],
405-
"source": [
406-
"cleanup_response = file_reputation_override.override_classification(\n",
407-
" remove_override=[\n",
408-
" {\n",
409-
" \"md5\": sample_md5,\n",
410-
" \"sha1\": sample_sha1,\n",
411-
" \"sha256\": sample_sha256\n",
412-
" }\n",
413-
" ]\n",
414-
")\n",
415-
"print(cleanup_response.status_code)\n",
416-
"print(cleanup_response.text)"
417-
]
418-
},
419-
{
420-
"cell_type": "markdown",
421-
"metadata": {
422-
"collapsed": false
423-
},
424-
"source": [
425-
"### 7. Delete file\n",
426-
"In case we no longer want a file to be present in the cloud and available for analysis or download, we can delete it.\n",
427-
"To delete a file from the TitaniumCloud, we will use the `DeleteFile` class."
428-
]
429-
},
430-
{
431-
"cell_type": "code",
432-
"execution_count": 1,
433-
"metadata": {},
434-
"outputs": [],
435-
"source": [
436-
"delete_file = DeleteFile(\n",
437-
" host=\"https://data.reversinglabs.com\",\n",
438-
" username=USERNAME,\n",
439-
" password=PASSWORD,\n",
440-
" user_agent=USER_AGENT\n",
441-
")\n",
442-
"\n",
443-
"delete_response = delete_file.delete_samples(sample_hashes=FILE_HASH)\n",
444-
"\n",
445-
"response_text = delete_response.text\n",
446-
"print(response_text)"
447-
]
448-
},
449-
{
450-
"cell_type": "raw",
451-
"metadata": {
452-
"collapsed": false
453-
},
454-
"source": [
455-
"Again, we used the same file hash. If our file deletion request was successful, the response text will have a non-empty list called `deleted_hashes`. This list carries the hashes of files that have successfully been deleted with this request."
456-
]
457378
}
458379
],
459380
"metadata": {

0 commit comments

Comments
 (0)