How to use start_time method in wpt

Best JavaScript code snippet using wpt

index.js

Source:index.js Github

copy

Full Screen

1const moment = require('moment');2const swapLetters = (t) => {3 return {4 t,5 t1: t[1]+t[0]+t[2],6 t2: t[0]+t[2]+t[1],7 }8}9const countNumberOfCandidates = (T, cand) => {10 let count = 0;11 for (let t of T) {12 if (Object.values(swapLetters(t)).includes(cand))13 count++;14 }15 return count;16}17const Solution = (T) => {18 let output = 019 for (let t of T) {20 for (let cand of Object.values(swapLetters(t))) {21 let sum = countNumberOfCandidates(T, cand);22 output = Math.max(output, sum);23 }24 }25 return output;26}27// console.log(Solution(["aab", "cab", "baa", "baa"]))28const obj = [29 {30 "node": {31 "id": "804a334b-94da-45a6-8709-5d1b328b735f",32 "relationship_type": "related-to",33 "start_time": "2022-06-13T11:04:11.000Z",34 "stop_time": "2022-06-13T11:04:11.000Z"35 }36 },37 {38 "node": {39 "id": "00a4b6a1-4603-4666-ba23-e4c8caef7917",40 "relationship_type": "related-to",41 "start_time": "2022-06-13T11:03:39.000Z",42 "stop_time": "2022-06-13T11:03:39.000Z"43 }44 },45 {46 "node": {47 "id": "7e3a6192-5b9e-4205-80ac-f37ecbf5f0f5",48 "relationship_type": "related-to",49 "start_time": "2022-06-13T11:03:37.000Z",50 "stop_time": "2022-06-13T11:03:37.000Z"51 }52 },53 {54 "node": {55 "id": "d71a04c7-1be6-45b1-b2c7-10a78de1a241",56 "relationship_type": "related-to",57 "start_time": "2022-06-13T11:02:16.000Z",58 "stop_time": "2022-06-13T11:02:16.000Z"59 }60 },61 {62 "node": {63 "id": "036e4b7f-16e9-431d-9f79-26fe6ffae6a5",64 "relationship_type": "related-to",65 "start_time": "2022-06-13T11:02:15.000Z",66 "stop_time": "2022-06-13T11:02:15.000Z"67 }68 },69 {70 "node": {71 "id": "fd79a148-a6f0-43b4-93c0-c68b724087ee",72 "relationship_type": "related-to",73 "start_time": "2022-06-13T11:02:14.000Z",74 "stop_time": "2022-06-13T11:02:14.000Z"75 }76 },77 {78 "node": {79 "id": "25c20ab1-5356-4b9e-88ec-576a2f802f9a",80 "relationship_type": "related-to",81 "start_time": "2022-06-13T11:02:13.000Z",82 "stop_time": "2022-06-13T11:02:13.000Z"83 }84 },85 {86 "node": {87 "id": "757edd8a-be31-40ca-be36-3b88e0bdc91c",88 "relationship_type": "related-to",89 "start_time": "2022-06-13T11:02:08.000Z",90 "stop_time": "2022-06-13T11:02:08.000Z"91 }92 },93 {94 "node": {95 "id": "7708ffb2-9891-4202-8d3a-8ac0f32a72cd",96 "relationship_type": "related-to",97 "start_time": "2022-06-13T11:02:07.000Z",98 "stop_time": "2022-06-13T11:02:07.000Z"99 }100 },101 {102 "node": {103 "id": "d73c87d7-4fb2-434d-aa1f-ee9e8c110544",104 "relationship_type": "related-to",105 "start_time": "2022-06-13T11:02:05.000Z",106 "stop_time": "2022-06-13T11:02:05.000Z"107 }108 },109 {110 "node": {111 "id": "535ae076-ea69-402d-b53f-91bbbefbbf11",112 "relationship_type": "related-to",113 "start_time": "2022-06-13T11:01:57.000Z",114 "stop_time": "2022-06-13T11:01:57.000Z"115 }116 },117 {118 "node": {119 "id": "c5aecbe3-3b3d-4224-90a0-0caa99341a8c",120 "relationship_type": "related-to",121 "start_time": "2022-06-13T11:01:56.000Z",122 "stop_time": "2022-06-13T11:01:56.000Z"123 }124 },125 {126 "node": {127 "id": "9d4a2f00-b07f-49a3-844c-32c6d305cbb3",128 "relationship_type": "related-to",129 "start_time": "2022-06-13T11:01:55.000Z",130 "stop_time": "2022-06-13T11:01:55.000Z"131 }132 },133 {134 "node": {135 "id": "e94c2b0d-ae60-41b9-942c-9db9f6233d3b",136 "relationship_type": "related-to",137 "start_time": "2022-06-13T11:01:54.000Z",138 "stop_time": "2022-06-13T11:01:54.000Z"139 }140 },141 {142 "node": {143 "id": "b112cb77-07e7-4dc2-8540-83d68654a60b",144 "relationship_type": "related-to",145 "start_time": "2022-06-13T11:01:53.000Z",146 "stop_time": "2022-06-13T11:01:53.000Z"147 }148 },149 {150 "node": {151 "id": "2b255fa2-dd90-47f0-a550-ca38d44d3437",152 "relationship_type": "related-to",153 "start_time": "2022-06-13T11:01:52.000Z",154 "stop_time": "2022-06-13T11:01:52.000Z"155 }156 },157 {158 "node": {159 "id": "72b8279f-fa4f-4d35-adbf-5decf20a8427",160 "relationship_type": "related-to",161 "start_time": "2022-06-13T11:01:50.000Z",162 "stop_time": "2022-06-13T11:01:50.000Z"163 }164 },165 {166 "node": {167 "id": "16d892e0-c167-45da-bed1-8885340cbc37",168 "relationship_type": "related-to",169 "start_time": "2022-06-13T11:01:47.000Z",170 "stop_time": "2022-06-13T11:01:47.000Z"171 }172 },173 {174 "node": {175 "id": "31c9ec9a-d953-4a8c-990d-d5cb395b2761",176 "relationship_type": "related-to",177 "start_time": "2022-06-13T11:01:46.000Z",178 "stop_time": "2022-06-13T11:01:46.000Z"179 }180 },181 {182 "node": {183 "id": "dd4d3a72-6e76-4fac-a90e-2b260a9921b4",184 "relationship_type": "indicates",185 "start_time": "2022-06-13T10:47:56.000Z",186 "stop_time": "2022-06-13T10:47:56.000Z"187 }188 },189 {190 "node": {191 "id": "ff6a923e-db28-4393-ac09-2a759fe82b3d",192 "relationship_type": "related-to",193 "start_time": "2022-06-13T10:47:56.000Z",194 "stop_time": "2022-06-13T10:47:56.000Z"195 }196 },197 {198 "node": {199 "id": "f456f0b1-c305-4072-989d-a7c5a468ef82",200 "relationship_type": "related-to",201 "start_time": "2022-06-13T10:33:33.000Z",202 "stop_time": "2022-06-13T10:33:33.000Z"203 }204 },205 {206 "node": {207 "id": "c673a986-2b32-4bf8-a37e-98ee073ac436",208 "relationship_type": "related-to",209 "start_time": "2022-06-13T10:33:32.000Z",210 "stop_time": "2022-06-13T10:33:32.000Z"211 }212 },213 {214 "node": {215 "id": "c98c16ef-9e93-4ad7-858f-f339a0efbb84",216 "relationship_type": "related-to",217 "start_time": "2022-06-13T10:33:28.000Z",218 "stop_time": "2022-06-13T10:33:28.000Z"219 }220 },221 {222 "node": {223 "id": "4c4cca2c-98cb-4c77-8fe0-fefc58a4e49f",224 "relationship_type": "related-to",225 "start_time": "2022-06-13T10:33:26.000Z",226 "stop_time": "2022-06-13T10:33:26.000Z"227 }228 },229 {230 "node": {231 "id": "e0034f66-3a72-4030-bf09-ae800b422022",232 "relationship_type": "related-to",233 "start_time": "2022-06-13T10:33:25.000Z",234 "stop_time": "2022-06-13T10:33:25.000Z"235 }236 },237 {238 "node": {239 "id": "3406075f-8422-4c85-9752-4d1eca875042",240 "relationship_type": "related-to",241 "start_time": "2022-06-13T10:33:24.000Z",242 "stop_time": "2022-06-13T10:33:24.000Z"243 }244 },245 {246 "node": {247 "id": "aa858b81-ae86-4e5b-9ae9-61f6f9710c86",248 "relationship_type": "related-to",249 "start_time": "2022-06-13T10:33:21.000Z",250 "stop_time": "2022-06-13T10:33:21.000Z"251 }252 },253 {254 "node": {255 "id": "a0994a76-094e-4185-a77a-5d15168653b2",256 "relationship_type": "related-to",257 "start_time": "2022-06-13T10:33:07.000Z",258 "stop_time": "2022-06-13T10:33:07.000Z"259 }260 },261 {262 "node": {263 "id": "e9cec189-1a82-4153-ae1e-4f01d5afcfe7",264 "relationship_type": "related-to",265 "start_time": "2022-06-13T10:33:06.000Z",266 "stop_time": "2022-06-13T10:33:06.000Z"267 }268 },269 {270 "node": {271 "id": "fa95855f-94df-4a60-b88a-0b26017e0fb6",272 "relationship_type": "related-to",273 "start_time": "2022-06-13T10:33:05.000Z",274 "stop_time": "2022-06-13T10:33:05.000Z"275 }276 },277 {278 "node": {279 "id": "79086d88-9497-400b-ab9b-ddc20317d711",280 "relationship_type": "related-to",281 "start_time": "2022-06-13T10:32:59.000Z",282 "stop_time": "2022-06-13T10:32:59.000Z"283 }284 },285 {286 "node": {287 "id": "650e1676-753b-4c9b-97e3-0863a2e13ab0",288 "relationship_type": "related-to",289 "start_time": "2022-06-13T10:32:55.000Z",290 "stop_time": "2022-06-13T10:32:55.000Z"291 }292 },293 {294 "node": {295 "id": "f7e37f21-396c-44df-a678-33b0de76a081",296 "relationship_type": "related-to",297 "start_time": "2022-06-13T10:32:54.000Z",298 "stop_time": "2022-06-13T10:32:54.000Z"299 }300 },301 {302 "node": {303 "id": "f35ab64c-c788-4ef9-afe0-b36b6dac0428",304 "relationship_type": "related-to",305 "start_time": "2022-06-13T10:32:51.000Z",306 "stop_time": "2022-06-13T10:32:51.000Z"307 }308 },309 {310 "node": {311 "id": "a05684da-0d9d-4032-b8c3-f1f0bf04dea6",312 "relationship_type": "related-to",313 "start_time": "2022-06-13T10:32:48.000Z",314 "stop_time": "2022-06-13T10:32:48.000Z"315 }316 },317 {318 "node": {319 "id": "7d738a56-51b0-4baa-93d3-125885d59015",320 "relationship_type": "related-to",321 "start_time": "2022-06-13T10:32:47.000Z",322 "stop_time": "2022-06-13T10:32:47.000Z"323 }324 },325 {326 "node": {327 "id": "04213222-e355-468f-96f2-e6be27a21b92",328 "relationship_type": "related-to",329 "start_time": "2022-06-13T10:32:45.000Z",330 "stop_time": "2022-06-13T10:32:45.000Z"331 }332 },333 {334 "node": {335 "id": "41fb144a-ea8e-4037-bc46-c365d4950443",336 "relationship_type": "indicates",337 "start_time": "2022-06-13T10:32:45.000Z",338 "stop_time": "2022-06-13T10:32:45.000Z"339 }340 },341 {342 "node": {343 "id": "318bed1e-5233-4fe9-aba3-55a6099cab54",344 "relationship_type": "indicates",345 "start_time": "2022-06-13T10:32:45.000Z",346 "stop_time": "2022-06-13T10:32:45.000Z"347 }348 },349 {350 "node": {351 "id": "ecbb0717-60b2-4b17-aafb-58c82eae976e",352 "relationship_type": "uses",353 "start_time": "2022-06-13T10:32:45.000Z",354 "stop_time": "2022-06-13T10:32:45.000Z"355 }356 },357 {358 "node": {359 "id": "52da5a2e-692d-420f-9d9f-064e37a7bd42",360 "relationship_type": "related-to",361 "start_time": "2022-06-13T10:32:45.000Z",362 "stop_time": "2022-06-13T10:32:45.000Z"363 }364 },365 {366 "node": {367 "id": "34704f3b-1d0e-4c8c-9674-3b07c2c5b4e2",368 "relationship_type": "uses",369 "start_time": "2022-06-13T10:32:45.000Z",370 "stop_time": "2022-06-13T10:32:45.000Z"371 }372 },373 {374 "node": {375 "id": "6363b8a5-f3d4-47cf-92d7-1c61b39dce2d",376 "relationship_type": "related-to",377 "start_time": "2022-06-13T10:32:44.000Z",378 "stop_time": "2022-06-13T10:32:44.000Z"379 }380 },381 {382 "node": {383 "id": "31c759bc-5ca1-480c-ba1c-21bd1e660e37",384 "relationship_type": "related-to",385 "start_time": "2022-06-13T10:32:43.000Z",386 "stop_time": "2022-06-13T10:32:43.000Z"387 }388 },389 {390 "node": {391 "id": "876b9627-f791-415f-bcb1-34da94137eea",392 "relationship_type": "related-to",393 "start_time": "2022-06-13T10:32:42.000Z",394 "stop_time": "2022-06-13T10:32:42.000Z"395 }396 },397 {398 "node": {399 "id": "11656a9a-102d-4b01-a223-b9edc7029f0a",400 "relationship_type": "related-to",401 "start_time": "2022-06-13T10:30:02.000Z",402 "stop_time": "2022-06-13T10:30:02.000Z"403 }404 },405 {406 "node": {407 "id": "482d1f35-2900-4da2-a7c3-403f2b84ef30",408 "relationship_type": "related-to",409 "start_time": "2022-06-13T09:45:23.000Z",410 "stop_time": "2022-06-13T09:45:23.000Z"411 }412 },413 {414 "node": {415 "id": "5f8d896a-151a-4439-bfb5-9b46b9e21059",416 "relationship_type": "related-to",417 "start_time": "2022-06-13T09:45:21.000Z",418 "stop_time": "2022-06-13T09:45:21.000Z"419 }420 },421 {422 "node": {423 "id": "6bd047ef-a95e-4fac-90da-beabe9bff40c",424 "relationship_type": "related-to",425 "start_time": "2022-06-13T09:45:14.000Z",426 "stop_time": "2022-06-13T09:45:14.000Z"427 }428 },429 {430 "node": {431 "id": "a74dfd5b-8fca-4e22-805b-09874d25b648",432 "relationship_type": "related-to",433 "start_time": "2022-06-13T09:45:09.000Z",434 "stop_time": "2022-06-13T09:45:09.000Z"435 }436 },437 {438 "node": {439 "id": "0986accb-0b07-4a4e-bca9-650346b65ed8",440 "relationship_type": "related-to",441 "start_time": "2022-06-13T09:45:08.000Z",442 "stop_time": "2022-06-13T09:45:08.000Z"443 }444 },445 {446 "node": {447 "id": "23e74798-3aa5-4c94-aaaf-d8e5732bc30d",448 "relationship_type": "related-to",449 "start_time": "2022-06-13T09:44:58.000Z",450 "stop_time": "2022-06-13T09:44:58.000Z"451 }452 },453 {454 "node": {455 "id": "1b862f5b-9b2d-4ba9-80d5-cfa11c577e66",456 "relationship_type": "related-to",457 "start_time": "2022-06-13T09:44:53.000Z",458 "stop_time": "2022-06-13T09:44:53.000Z"459 }460 },461 {462 "node": {463 "id": "e4b5ffc3-44b6-4a3c-9b0a-69c4c515ce17",464 "relationship_type": "related-to",465 "start_time": "2022-06-13T09:44:44.000Z",466 "stop_time": "2022-06-13T09:44:44.000Z"467 }468 },469 {470 "node": {471 "id": "365dc29e-d866-4e1d-b849-b716f4648a45",472 "relationship_type": "related-to",473 "start_time": "2022-06-13T09:44:41.000Z",474 "stop_time": "2022-06-13T09:44:41.000Z"475 }476 },477 {478 "node": {479 "id": "c7da1946-efdd-4f7b-b7c2-3d0c7f4d70f0",480 "relationship_type": "related-to",481 "start_time": "2022-06-13T09:44:33.000Z",482 "stop_time": "2022-06-13T09:44:33.000Z"483 }484 },485 {486 "node": {487 "id": "3aa32c7c-099d-4875-b5fb-ac80a840d3a6",488 "relationship_type": "related-to",489 "start_time": "2022-06-13T09:44:28.000Z",490 "stop_time": "2022-06-13T09:44:28.000Z"491 }492 },493 {494 "node": {495 "id": "a5f7a596-c0db-4bd1-bb94-3ae4feacaaca",496 "relationship_type": "related-to",497 "start_time": "2022-06-13T09:44:25.000Z",498 "stop_time": "2022-06-13T09:44:25.000Z"499 }500 },501 {502 "node": {503 "id": "d58a5704-e31b-4d18-9b54-458c521ed8ea",504 "relationship_type": "related-to",505 "start_time": "2022-06-13T09:44:14.000Z",506 "stop_time": "2022-06-13T09:44:14.000Z"507 }508 },509 {510 "node": {511 "id": "89749972-9ad3-43a1-be98-0176397b8440",512 "relationship_type": "related-to",513 "start_time": "2022-06-13T09:44:13.000Z",514 "stop_time": "2022-06-13T09:44:13.000Z"515 }516 },517 {518 "node": {519 "id": "4abf50bc-9791-47bf-9f8d-51350703bade",520 "relationship_type": "related-to",521 "start_time": "2022-06-13T09:44:03.000Z",522 "stop_time": "2022-06-13T09:44:03.000Z"523 }524 },525 {526 "node": {527 "id": "dd946749-6e98-4d7b-8223-5acc3c31d5c4",528 "relationship_type": "related-to",529 "start_time": "2022-06-13T09:43:58.000Z",530 "stop_time": "2022-06-13T09:43:58.000Z"531 }532 },533 {534 "node": {535 "id": "01514a58-5243-4fde-b400-a18b6bf17e1c",536 "relationship_type": "related-to",537 "start_time": "2022-06-13T09:43:48.000Z",538 "stop_time": "2022-06-13T09:43:48.000Z"539 }540 },541 {542 "node": {543 "id": "804443da-85c6-4131-bea6-28dfe9b2b1ee",544 "relationship_type": "related-to",545 "start_time": "2022-06-13T09:43:47.000Z",546 "stop_time": "2022-06-13T09:43:47.000Z"547 }548 },549 {550 "node": {551 "id": "82e4c1af-df44-4bf2-a550-c17079f2d028",552 "relationship_type": "related-to",553 "start_time": "2022-06-13T09:43:38.000Z",554 "stop_time": "2022-06-13T09:43:38.000Z"555 }556 },557 {558 "node": {559 "id": "1ef650f7-ee61-48c2-8beb-520e856a3198",560 "relationship_type": "related-to",561 "start_time": "2022-06-13T09:43:33.000Z",562 "stop_time": "2022-06-13T09:43:33.000Z"563 }564 },565 {566 "node": {567 "id": "75ec1053-1823-44c5-b82f-eaaea6d2ea69",568 "relationship_type": "related-to",569 "start_time": "2022-06-13T09:43:24.000Z",570 "stop_time": "2022-06-13T09:43:24.000Z"571 }572 },573 {574 "node": {575 "id": "d408c540-55a7-4eda-a3a8-d8f53ee82a32",576 "relationship_type": "related-to",577 "start_time": "2022-06-13T09:43:21.000Z",578 "stop_time": "2022-06-13T09:43:21.000Z"579 }580 },581 {582 "node": {583 "id": "33fcd6dc-3179-49a2-abb4-6be020216e9f",584 "relationship_type": "related-to",585 "start_time": "2022-06-13T09:43:14.000Z",586 "stop_time": "2022-06-13T09:43:14.000Z"587 }588 },589 {590 "node": {591 "id": "d8740a11-a3ea-4bc5-9722-a65132707cae",592 "relationship_type": "related-to",593 "start_time": "2022-06-13T09:43:08.000Z",594 "stop_time": "2022-06-13T09:43:08.000Z"595 }596 },597 {598 "node": {599 "id": "4019e973-b60f-49e7-8242-ee7dbc1f8e8c",600 "relationship_type": "related-to",601 "start_time": "2022-06-13T09:43:07.000Z",602 "stop_time": "2022-06-13T09:43:07.000Z"603 }604 },605 {606 "node": {607 "id": "f2196bcb-4d9b-451f-a145-58e8c65156da",608 "relationship_type": "related-to",609 "start_time": "2022-06-13T09:42:58.000Z",610 "stop_time": "2022-06-13T09:42:58.000Z"611 }612 },613 {614 "node": {615 "id": "c36cfcdf-577d-48de-a537-7aeb2ed9706f",616 "relationship_type": "related-to",617 "start_time": "2022-06-13T09:42:56.000Z",618 "stop_time": "2022-06-13T09:42:56.000Z"619 }620 },621 {622 "node": {623 "id": "d3c65bdc-33c8-4ffb-a252-25c9f6b9ca80",624 "relationship_type": "related-to",625 "start_time": "2022-06-13T09:42:49.000Z",626 "stop_time": "2022-06-13T09:42:49.000Z"627 }628 },629 {630 "node": {631 "id": "35115f8e-c931-4b87-bf4a-2f63417ff4e2",632 "relationship_type": "related-to",633 "start_time": "2022-06-13T09:42:43.000Z",634 "stop_time": "2022-06-13T09:42:43.000Z"635 }636 },637 {638 "node": {639 "id": "cf6ec79e-cf99-4ac8-88d6-7d6d24ee0f3d",640 "relationship_type": "related-to",641 "start_time": "2022-06-13T09:42:41.000Z",642 "stop_time": "2022-06-13T09:42:41.000Z"643 }644 },645 {646 "node": {647 "id": "dc919ceb-abf2-444c-a610-ed09fbe959cb",648 "relationship_type": "related-to",649 "start_time": "2022-06-13T09:42:34.000Z",650 "stop_time": "2022-06-13T09:42:34.000Z"651 }652 },653 {654 "node": {655 "id": "c8e74689-df5b-46b9-a8f1-2eff3a5cde4d",656 "relationship_type": "related-to",657 "start_time": "2022-06-13T09:42:30.000Z",658 "stop_time": "2022-06-13T09:42:30.000Z"659 }660 },661 {662 "node": {663 "id": "cb05db66-0825-4d74-a869-f60bfc93004a",664 "relationship_type": "related-to",665 "start_time": "2022-06-13T09:42:29.000Z",666 "stop_time": "2022-06-13T09:42:29.000Z"667 }668 },669 {670 "node": {671 "id": "cdd7ca75-2431-499e-a259-1074ee98589b",672 "relationship_type": "related-to",673 "start_time": "2022-06-13T09:42:19.000Z",674 "stop_time": "2022-06-13T09:42:19.000Z"675 }676 },677 {678 "node": {679 "id": "8404f16a-6501-49cf-b09a-f813905590ca",680 "relationship_type": "related-to",681 "start_time": "2022-06-13T09:42:14.000Z",682 "stop_time": "2022-06-13T09:42:14.000Z"683 }684 },685 {686 "node": {687 "id": "bf97b376-4e81-48e7-9750-53654b41d222",688 "relationship_type": "related-to",689 "start_time": "2022-06-13T09:42:04.000Z",690 "stop_time": "2022-06-13T09:42:04.000Z"691 }692 },693 {694 "node": {695 "id": "f48db0b9-6916-4872-b05f-ed41a345b55a",696 "relationship_type": "related-to",697 "start_time": "2022-06-13T09:42:02.000Z",698 "stop_time": "2022-06-13T09:42:02.000Z"699 }700 },701 {702 "node": {703 "id": "f636cc91-428b-4623-b4e9-83c53174422a",704 "relationship_type": "related-to",705 "start_time": "2022-06-13T09:41:53.000Z",706 "stop_time": "2022-06-13T09:41:53.000Z"707 }708 },709 {710 "node": {711 "id": "ae129c37-d63c-455e-92ea-5c2a9e14e3b1",712 "relationship_type": "related-to",713 "start_time": "2022-06-13T09:41:48.000Z",714 "stop_time": "2022-06-13T09:41:48.000Z"715 }716 },717 {718 "node": {719 "id": "d9cbe8d7-926d-4d84-b47d-66fddea0b80e",720 "relationship_type": "related-to",721 "start_time": "2022-06-13T09:41:46.000Z",722 "stop_time": "2022-06-13T09:41:46.000Z"723 }724 },725 {726 "node": {727 "id": "0760f099-1178-4837-87d7-dc88561831c3",728 "relationship_type": "related-to",729 "start_time": "2022-06-13T09:41:16.000Z",730 "stop_time": "2022-06-13T09:41:16.000Z"731 }732 },733 {734 "node": {735 "id": "84483e2f-e839-484e-9ba2-a2ce8b0b5a39",736 "relationship_type": "related-to",737 "start_time": "2022-06-13T09:41:08.000Z",738 "stop_time": "2022-06-13T09:41:08.000Z"739 }740 },741 {742 "node": {743 "id": "4b5bf506-88ec-47bf-bbaa-c45b322f5323",744 "relationship_type": "related-to",745 "start_time": "2022-06-13T09:41:03.000Z",746 "stop_time": "2022-06-13T09:41:03.000Z"747 }748 },749 {750 "node": {751 "id": "b9446033-19f8-4909-aa6a-22cd0e71e617",752 "relationship_type": "related-to",753 "start_time": "2022-06-13T09:40:59.000Z",754 "stop_time": "2022-06-13T09:40:59.000Z"755 }756 },757 {758 "node": {759 "id": "31ffb2dc-b536-4bc9-8b53-61db95385c77",760 "relationship_type": "related-to",761 "start_time": "2022-06-13T09:40:54.000Z",762 "stop_time": "2022-06-13T09:40:54.000Z"763 }764 },765 {766 "node": {767 "id": "c8398a50-342f-4fb6-9f52-a2f305d45163",768 "relationship_type": "related-to",769 "start_time": "2022-06-13T09:40:48.000Z",770 "stop_time": "2022-06-13T09:40:48.000Z"771 }772 },773 {774 "node": {775 "id": "78f0bbdb-2893-415b-8ca9-0dab381796e4",776 "relationship_type": "related-to",777 "start_time": "2022-06-13T09:40:43.000Z",778 "stop_time": "2022-06-13T09:40:43.000Z"779 }780 },781 {782 "node": {783 "id": "84abd040-3fd3-4cab-806d-987e646edd9e",784 "relationship_type": "related-to",785 "start_time": "2022-06-13T09:40:38.000Z",786 "stop_time": "2022-06-13T09:40:38.000Z"787 }788 },789 {790 "node": {791 "id": "a535da8f-ec7a-443d-bcc6-5b275b75d140",792 "relationship_type": "related-to",793 "start_time": "2022-06-13T09:40:33.000Z",794 "stop_time": "2022-06-13T09:40:33.000Z"795 }796 },797 {798 "node": {799 "id": "5dbb24c7-de60-4a55-8e7b-f747ba152024",800 "relationship_type": "related-to",801 "start_time": "2022-06-13T09:40:28.000Z",802 "stop_time": "2022-06-13T09:40:28.000Z"803 }804 },805 {806 "node": {807 "id": "d79c0d3c-9425-4f26-971f-5cbf8b4cca7e",808 "relationship_type": "related-to",809 "start_time": "2022-06-13T09:40:23.000Z",810 "stop_time": "2022-06-13T09:40:23.000Z"811 }812 },813 {814 "node": {815 "id": "3c5b6129-206d-4895-a0b9-d47e9b79fe4d",816 "relationship_type": "related-to",817 "start_time": "2022-06-13T09:40:18.000Z",818 "stop_time": "2022-06-13T09:40:18.000Z"819 }820 },821 {822 "node": {823 "id": "cf6f7bb8-8509-4fe7-a5c6-8e9da197cd0e",824 "relationship_type": "related-to",825 "start_time": "2022-06-13T09:40:17.000Z",826 "stop_time": "2022-06-13T09:40:17.000Z"827 }828 },829 {830 "node": {831 "id": "b57c6b0d-197a-40b1-bfec-0602e6e46d76",832 "relationship_type": "related-to",833 "start_time": "2022-06-13T09:40:16.000Z",834 "stop_time": "2022-06-13T09:40:16.000Z"835 }836 },837 {838 "node": {839 "id": "d9fc1d79-31fa-4ed7-a467-349a4717a5e9",840 "relationship_type": "related-to",841 "start_time": "2022-06-13T09:34:27.000Z",842 "stop_time": "2022-06-13T09:34:27.000Z"843 }844 },845 {846 "node": {847 "id": "2ab0e35f-eb51-4bf4-9620-c8913339e6db",848 "relationship_type": "related-to",849 "start_time": "2022-06-13T09:34:25.000Z",850 "stop_time": "2022-06-13T09:34:25.000Z"851 }852 },853 {854 "node": {855 "id": "3e378359-e888-4ed1-83a1-fa99ea5eaa4f",856 "relationship_type": "related-to",857 "start_time": "2022-06-13T09:34:24.000Z",858 "stop_time": "2022-06-13T09:34:24.000Z"859 }860 },861 {862 "node": {863 "id": "fc24e074-1a4a-44d4-a32e-0b024f5eb513",864 "relationship_type": "related-to",865 "start_time": "2022-06-13T09:34:23.000Z",866 "stop_time": "2022-06-13T09:34:23.000Z"867 }868 },869 {870 "node": {871 "id": "055e1085-eb5f-4141-9945-4cfd0ac3398e",872 "relationship_type": "related-to",873 "start_time": "2022-06-13T09:34:20.000Z",874 "stop_time": "2022-06-13T09:34:20.000Z"875 }876 },877 {878 "node": {879 "id": "a21bdc0b-e258-47fa-900c-0e9e109decca",880 "relationship_type": "related-to",881 "start_time": "2022-06-13T09:33:27.000Z",882 "stop_time": "2022-06-13T09:33:27.000Z"883 }884 },885 {886 "node": {887 "id": "2cde407f-f81d-45d1-946f-643edb482688",888 "relationship_type": "related-to",889 "start_time": "2022-06-13T09:33:25.000Z",890 "stop_time": "2022-06-13T09:33:25.000Z"891 }892 },893 {894 "node": {895 "id": "1ae6866f-996f-4ad8-905b-69d1bb000375",896 "relationship_type": "related-to",897 "start_time": "2022-06-13T09:33:24.000Z",898 "stop_time": "2022-06-13T09:33:24.000Z"899 }900 },901 {902 "node": {903 "id": "e61a13af-cbd5-4ca8-9cbd-95091c3c60a2",904 "relationship_type": "related-to",905 "start_time": "2022-06-13T09:33:14.000Z",906 "stop_time": "2022-06-13T09:33:14.000Z"907 }908 },909 {910 "node": {911 "id": "432d775f-024a-4dda-aefb-9e329f8bfc02",912 "relationship_type": "related-to",913 "start_time": "2022-06-13T09:33:12.000Z",914 "stop_time": "2022-06-13T09:33:12.000Z"915 }916 },917 {918 "node": {919 "id": "513ab74e-7454-4555-9b08-63a549b51cc3",920 "relationship_type": "related-to",921 "start_time": "2022-06-13T09:33:11.000Z",922 "stop_time": "2022-06-13T09:33:11.000Z"923 }924 },925 {926 "node": {927 "id": "6d200747-7043-4675-a4c5-f05b6c99ab91",928 "relationship_type": "related-to",929 "start_time": "2022-06-13T09:33:04.000Z",930 "stop_time": "2022-06-13T09:33:04.000Z"931 }932 },933 {934 "node": {935 "id": "5d23077c-ef95-4f28-9afb-9c8814656c02",936 "relationship_type": "related-to",937 "start_time": "2022-06-13T09:33:03.000Z",938 "stop_time": "2022-06-13T09:33:03.000Z"939 }940 },941 {942 "node": {943 "id": "92f6dab4-6a64-4c4b-93e6-6b393bb363e6",944 "relationship_type": "related-to",945 "start_time": "2022-06-13T09:27:32.000Z",946 "stop_time": "2022-06-13T09:27:32.000Z"947 }948 },949 {950 "node": {951 "id": "7353f529-e7f3-455c-a834-c9870c73680e",952 "relationship_type": "related-to",953 "start_time": "2022-06-13T09:27:29.000Z",954 "stop_time": "2022-06-13T09:27:29.000Z"955 }956 },957 {958 "node": {959 "id": "c35de78d-94fa-435e-8b21-0b85006f560c",960 "relationship_type": "related-to",961 "start_time": "2022-06-13T09:27:28.000Z",962 "stop_time": "2022-06-13T09:27:28.000Z"963 }964 },965 {966 "node": {967 "id": "68b8d8b9-8f8e-4995-bcd7-327311801c92",968 "relationship_type": "related-to",969 "start_time": "2022-06-13T09:27:26.000Z",970 "stop_time": "2022-06-13T09:27:26.000Z"971 }972 },973 {974 "node": {975 "id": "ed7a6583-f883-4828-bd38-0e3ab19ac132",976 "relationship_type": "related-to",977 "start_time": "2022-06-13T09:27:25.000Z",978 "stop_time": "2022-06-13T09:27:25.000Z"979 }980 },981 {982 "node": {983 "id": "4a5d4d21-24ea-4399-b374-da1988c96ad3",984 "relationship_type": "related-to",985 "start_time": "2022-06-13T09:27:23.000Z",986 "stop_time": "2022-06-13T09:27:23.000Z"987 }988 },989 {990 "node": {991 "id": "fbc93d58-3e59-4bd9-ac23-813f348eb8cd",992 "relationship_type": "related-to",993 "start_time": "2022-06-13T09:27:22.000Z",994 "stop_time": "2022-06-13T09:27:22.000Z"995 }996 },997 {998 "node": {999 "id": "084e3862-56e1-477a-a87f-77379f6144cc",1000 "relationship_type": "related-to",1001 "start_time": "2022-06-13T09:27:21.000Z",1002 "stop_time": "2022-06-13T09:27:21.000Z"1003 }1004 },1005 {1006 "node": {1007 "id": "30059978-aeb5-4e85-b943-bca82922958a",1008 "relationship_type": "related-to",1009 "start_time": "2022-06-13T09:27:09.000Z",1010 "stop_time": "2022-06-13T09:27:09.000Z"1011 }1012 },1013 {1014 "node": {1015 "id": "7e78e2a3-6a34-4cbb-a77c-1c3b2793d2d5",1016 "relationship_type": "related-to",1017 "start_time": "2022-06-13T09:27:07.000Z",1018 "stop_time": "2022-06-13T09:27:07.000Z"1019 }1020 },1021 {1022 "node": {1023 "id": "3c1a7554-15ad-4569-8d41-f8ac401d15e5",1024 "relationship_type": "related-to",1025 "start_time": "2022-06-13T09:27:04.000Z",1026 "stop_time": "2022-06-13T09:27:04.000Z"1027 }1028 },1029 {1030 "node": {1031 "id": "65cd0cdd-b9d4-46bd-be8f-87b8c5a2f649",1032 "relationship_type": "related-to",1033 "start_time": "2022-06-13T09:27:03.000Z",1034 "stop_time": "2022-06-13T09:27:03.000Z"1035 }1036 },1037 {1038 "node": {1039 "id": "c93e664b-67f2-4411-9b5a-9c716eb4ba7b",1040 "relationship_type": "related-to",1041 "start_time": "2022-06-13T09:27:02.000Z",1042 "stop_time": "2022-06-13T09:27:02.000Z"1043 }1044 },1045 {1046 "node": {1047 "id": "69af240a-1931-41cf-8e84-0cb0100f764f",1048 "relationship_type": "related-to",1049 "start_time": "2022-06-13T09:27:01.000Z",1050 "stop_time": "2022-06-13T09:27:01.000Z"1051 }1052 },1053 {1054 "node": {1055 "id": "e6dd5851-a48d-400e-9b95-fb5582deaf67",1056 "relationship_type": "related-to",1057 "start_time": "2022-06-13T09:27:00.000Z",1058 "stop_time": "2022-06-13T09:27:00.000Z"1059 }1060 },1061 {1062 "node": {1063 "id": "3af998a2-b5b2-4292-946f-27a5cdcb1664",1064 "relationship_type": "related-to",1065 "start_time": "2022-06-13T09:26:59.000Z",1066 "stop_time": "2022-06-13T09:26:59.000Z"1067 }1068 },1069 {1070 "node": {1071 "id": "6d46a6a8-8f74-4da6-8d3a-5e23d2915630",1072 "relationship_type": "related-to",1073 "start_time": "2022-06-13T09:26:58.000Z",1074 "stop_time": "2022-06-13T09:26:58.000Z"1075 }1076 },1077 {1078 "node": {1079 "id": "e70e1604-a295-45f2-8798-3f0465ce0db1",1080 "relationship_type": "related-to",1081 "start_time": "2022-06-13T09:12:09.000Z",1082 "stop_time": "2022-06-13T09:12:09.000Z"1083 }1084 },1085 {1086 "node": {1087 "id": "e8bdb5cd-5695-483d-b84c-fd5387decbc7",1088 "relationship_type": "related-to",1089 "start_time": "2022-06-13T09:12:00.000Z",1090 "stop_time": "2022-06-13T09:12:00.000Z"1091 }1092 },1093 {1094 "node": {1095 "id": "cc89bceb-b372-4cf0-be62-1ee775518a36",1096 "relationship_type": "related-to",1097 "start_time": "2022-06-13T09:11:59.000Z",1098 "stop_time": "2022-06-13T09:11:59.000Z"1099 }1100 },1101 {1102 "node": {1103 "id": "eae99f21-f5b0-4069-9c66-8444b570e628",1104 "relationship_type": "related-to",1105 "start_time": "2022-06-13T09:11:58.000Z",1106 "stop_time": "2022-06-13T09:11:58.000Z"1107 }1108 },1109 {1110 "node": {1111 "id": "4c42e685-fa28-4f9c-a106-21ecbcc0d346",1112 "relationship_type": "related-to",1113 "start_time": "2022-06-13T09:11:56.000Z",1114 "stop_time": "2022-06-13T09:11:56.000Z"1115 }1116 },1117 {1118 "node": {1119 "id": "b748c0bf-61f9-48ab-aa1a-e74c4875cfd8",1120 "relationship_type": "related-to",1121 "start_time": "2022-06-13T09:11:55.000Z",1122 "stop_time": "2022-06-13T09:11:55.000Z"1123 }1124 },1125 {1126 "node": {1127 "id": "274ef954-5eac-4279-be03-8c9922625e11",1128 "relationship_type": "related-to",1129 "start_time": "2022-06-13T09:11:53.000Z",1130 "stop_time": "2022-06-13T09:11:53.000Z"1131 }1132 },1133 {1134 "node": {1135 "id": "cc4f682b-688a-40f5-b35c-c3a8d229cb87",1136 "relationship_type": "related-to",1137 "start_time": "2022-06-13T09:11:52.000Z",1138 "stop_time": "2022-06-13T09:11:52.000Z"1139 }1140 },1141 {1142 "node": {1143 "id": "7df2cf4a-1a75-4568-bc5c-efab4944eef6",1144 "relationship_type": "related-to",1145 "start_time": "2022-06-13T09:11:51.000Z",1146 "stop_time": "2022-06-13T09:11:51.000Z"1147 }1148 },1149 {1150 "node": {1151 "id": "02bfc4d4-4caf-4af8-84c3-a13d672e4f49",1152 "relationship_type": "related-to",1153 "start_time": "2022-06-13T09:11:50.000Z",1154 "stop_time": "2022-06-13T09:11:50.000Z"1155 }1156 },1157 {1158 "node": {1159 "id": "9eb87825-216f-467a-ae71-0da8d494a492",1160 "relationship_type": "related-to",1161 "start_time": "2022-06-13T09:10:02.000Z",1162 "stop_time": "2022-06-13T09:10:02.000Z"1163 }1164 },1165 {1166 "node": {1167 "id": "3495a5d8-42fd-4624-9c94-f7ea0cb8ce0f",1168 "relationship_type": "related-to",1169 "start_time": "2022-06-13T09:09:50.000Z",1170 "stop_time": "2022-06-13T09:09:50.000Z"1171 }1172 },1173 {1174 "node": {1175 "id": "b4dfb742-773c-4a83-ab0f-9d56fbeb9953",1176 "relationship_type": "related-to",1177 "start_time": "2022-06-13T09:09:47.000Z",1178 "stop_time": "2022-06-13T09:09:47.000Z"1179 }1180 },1181 {1182 "node": {1183 "id": "08185296-043a-494b-a4b2-ac834aa831a9",1184 "relationship_type": "related-to",1185 "start_time": "2022-06-13T09:09:46.000Z",1186 "stop_time": "2022-06-13T09:09:46.000Z"1187 }1188 },1189 {1190 "node": {1191 "id": "869b1a9e-87c9-40c1-bd6e-b02d1659dc62",1192 "relationship_type": "related-to",1193 "start_time": "2022-06-13T09:09:45.000Z",1194 "stop_time": "2022-06-13T09:09:45.000Z"1195 }1196 },1197 {1198 "node": {1199 "id": "ce930cf5-d52f-445f-965b-4984a4aae82b",1200 "relationship_type": "related-to",1201 "start_time": "2022-06-13T09:09:44.000Z",1202 "stop_time": "2022-06-13T09:09:44.000Z"1203 }1204 },1205 {1206 "node": {1207 "id": "a37a0d5a-c05b-4bba-a8d6-5c3fedb3ecf8",1208 "relationship_type": "related-to",1209 "start_time": "2022-06-13T09:09:43.000Z",1210 "stop_time": "2022-06-13T09:09:43.000Z"1211 }1212 },1213 {1214 "node": {1215 "id": "13161619-41e8-40cd-a162-c3360f876064",1216 "relationship_type": "related-to",1217 "start_time": "2022-06-13T09:09:42.000Z",1218 "stop_time": "2022-06-13T09:09:42.000Z"1219 }1220 },1221 {1222 "node": {1223 "id": "4fab5b7b-553e-41fc-a795-5f70f50ec212",1224 "relationship_type": "related-to",1225 "start_time": "2022-06-13T09:09:31.000Z",1226 "stop_time": "2022-06-13T09:09:31.000Z"1227 }1228 },1229 {1230 "node": {1231 "id": "ebd45769-14fb-4bc7-ba76-9ca2ca1229e0",1232 "relationship_type": "related-to",1233 "start_time": "2022-06-13T09:09:28.000Z",1234 "stop_time": "2022-06-13T09:09:28.000Z"1235 }1236 },1237 {1238 "node": {1239 "id": "2baae90c-9ad3-4810-9173-de95bcd2c39f",1240 "relationship_type": "related-to",1241 "start_time": "2022-06-13T09:09:27.000Z",1242 "stop_time": "2022-06-13T09:09:27.000Z"1243 }1244 },1245 {1246 "node": {1247 "id": "298696e1-813f-4e99-bce0-270776557b78",1248 "relationship_type": "related-to",1249 "start_time": "2022-06-13T09:09:23.000Z",1250 "stop_time": "2022-06-13T09:09:23.000Z"1251 }1252 },1253 {1254 "node": {1255 "id": "b4e22c39-69ff-47bf-9617-6b67e25be7e2",1256 "relationship_type": "related-to",1257 "start_time": "2022-06-13T09:09:07.000Z",1258 "stop_time": "2022-06-13T09:09:07.000Z"1259 }1260 },1261 {1262 "node": {1263 "id": "db8f8441-a025-4378-a446-db0816b9d8e4",1264 "relationship_type": "related-to",1265 "start_time": "2022-06-13T09:08:50.000Z",1266 "stop_time": "2022-06-13T09:08:50.000Z"1267 }1268 },1269 {1270 "node": {1271 "id": "91056013-cf4b-4d59-b49a-c29c38d2775b",1272 "relationship_type": "related-to",1273 "start_time": "2022-06-13T09:08:45.000Z",1274 "stop_time": "2022-06-13T09:08:45.000Z"1275 }1276 },1277 {1278 "node": {1279 "id": "5c5c05b6-7c15-44e0-8d74-63c11ead60e5",1280 "relationship_type": "related-to",1281 "start_time": "2022-06-13T09:08:40.000Z",1282 "stop_time": "2022-06-13T09:08:40.000Z"1283 }1284 },1285 {1286 "node": {1287 "id": "6d9e796c-31f6-471e-b115-5ca89f2590e3",1288 "relationship_type": "related-to",1289 "start_time": "2022-06-13T09:07:22.000Z",1290 "stop_time": "2022-06-13T09:07:22.000Z"1291 }1292 },1293 {1294 "node": {1295 "id": "8d176901-d2d1-4dbc-b066-853070b4ec32",1296 "relationship_type": "related-to",1297 "start_time": "2022-06-13T09:07:21.000Z",1298 "stop_time": "2022-06-13T09:07:21.000Z"1299 }1300 },1301 {1302 "node": {1303 "id": "70977a82-8533-449f-9f02-d132c4a6c811",1304 "relationship_type": "related-to",1305 "start_time": "2022-06-13T09:07:19.000Z",1306 "stop_time": "2022-06-13T09:07:19.000Z"1307 }1308 },1309 {1310 "node": {1311 "id": "9fb1aaf9-5bbd-4944-8bae-8fb4684af732",1312 "relationship_type": "related-to",1313 "start_time": "2022-06-13T09:06:46.000Z",1314 "stop_time": "2022-06-13T09:06:46.000Z"1315 }1316 },1317 {1318 "node": {1319 "id": "afa9aa16-789c-4ea7-8dfa-d4dc654796da",1320 "relationship_type": "related-to",1321 "start_time": "2022-06-13T09:06:41.000Z",1322 "stop_time": "2022-06-13T09:06:41.000Z"1323 }1324 },1325 {1326 "node": {1327 "id": "5414ae96-043a-4de8-a921-a132c47aa92c",1328 "relationship_type": "related-to",1329 "start_time": "2022-06-13T09:06:40.000Z",1330 "stop_time": "2022-06-13T09:06:40.000Z"1331 }1332 },1333 {1334 "node": {1335 "id": "bdf734a6-1312-4df1-9aa8-05fd45abcabe",1336 "relationship_type": "related-to",1337 "start_time": "2022-06-13T09:06:38.000Z",1338 "stop_time": "2022-06-13T09:06:38.000Z"1339 }1340 },1341 {1342 "node": {1343 "id": "8e2ed6ba-6322-4ff1-9a78-037199d6e5f9",1344 "relationship_type": "related-to",1345 "start_time": "2022-06-13T09:06:37.000Z",1346 "stop_time": "2022-06-13T09:06:37.000Z"1347 }1348 },1349 {1350 "node": {1351 "id": "1fb5daee-9e7f-481d-95f6-0feb8eefc47e",1352 "relationship_type": "related-to",1353 "start_time": "2022-06-13T09:06:29.000Z",1354 "stop_time": "2022-06-13T09:06:29.000Z"1355 }1356 },1357 {1358 "node": {1359 "id": "a9ad3fb9-5814-4900-afa5-30a867badbe0",1360 "relationship_type": "related-to",1361 "start_time": "2022-06-13T09:06:27.000Z",1362 "stop_time": "2022-06-13T09:06:27.000Z"1363 }1364 },1365 {1366 "node": {1367 "id": "2ba054b2-0367-48cd-b262-cb6049b3bd3b",1368 "relationship_type": "related-to",1369 "start_time": "2022-06-13T09:06:22.000Z",1370 "stop_time": "2022-06-13T09:06:22.000Z"1371 }1372 },1373 {1374 "node": {1375 "id": "26bae666-889c-4d3f-a6c6-ad782c32903f",1376 "relationship_type": "related-to",1377 "start_time": "2022-06-13T09:06:21.000Z",1378 "stop_time": "2022-06-13T09:06:21.000Z"1379 }1380 },1381 {1382 "node": {1383 "id": "8e5fb040-b382-4260-8832-2613fdb94403",1384 "relationship_type": "related-to",1385 "start_time": "2022-06-13T09:06:20.000Z",1386 "stop_time": "2022-06-13T09:06:20.000Z"1387 }1388 },1389 {1390 "node": {1391 "id": "9778c993-fdab-4a60-b64f-f8c0fc812f02",1392 "relationship_type": "related-to",1393 "start_time": "2022-06-13T09:06:18.000Z",1394 "stop_time": "2022-06-13T09:06:18.000Z"1395 }1396 },1397 {1398 "node": {1399 "id": "f8640c79-3462-4e39-a964-b7cf46daaae8",1400 "relationship_type": "related-to",1401 "start_time": "2022-06-13T09:06:15.000Z",1402 "stop_time": "2022-06-13T09:06:15.000Z"1403 }1404 },1405 {1406 "node": {1407 "id": "074a1b63-b343-4deb-bf35-610c178d86f2",1408 "relationship_type": "related-to",1409 "start_time": "2022-06-13T09:06:09.000Z",1410 "stop_time": "2022-06-13T09:06:09.000Z"1411 }1412 },1413 {1414 "node": {1415 "id": "b0221482-6509-43da-af74-9cca39467e92",1416 "relationship_type": "related-to",1417 "start_time": "2022-06-13T09:06:08.000Z",1418 "stop_time": "2022-06-13T09:06:08.000Z"1419 }1420 },1421 {1422 "node": {1423 "id": "0fa64b20-ca44-4e4e-9f4b-94b1a2b5a194",1424 "relationship_type": "related-to",1425 "start_time": "2022-06-13T09:06:05.000Z",1426 "stop_time": "2022-06-13T09:06:05.000Z"1427 }1428 },1429 {1430 "node": {1431 "id": "d115ea4c-eeaa-4385-8cea-a27676ddc8cb",1432 "relationship_type": "related-to",1433 "start_time": "2022-06-13T09:06:04.000Z",1434 "stop_time": "2022-06-13T09:06:04.000Z"1435 }1436 },1437 {1438 "node": {1439 "id": "13cdb8eb-7cdf-4675-a982-c696412934d7",1440 "relationship_type": "related-to",1441 "start_time": "2022-06-13T09:06:03.000Z",1442 "stop_time": "2022-06-13T09:06:03.000Z"1443 }1444 },1445 {1446 "node": {1447 "id": "6eda389f-1a58-4b91-ab26-5f93c0758424",1448 "relationship_type": "related-to",1449 "start_time": "2022-06-13T09:05:55.000Z",1450 "stop_time": "2022-06-13T09:05:55.000Z"1451 }1452 },1453 {1454 "node": {1455 "id": "18c6ee45-aa86-468f-bed9-e8e748f03e3e",1456 "relationship_type": "related-to",1457 "start_time": "2022-06-13T09:05:53.000Z",1458 "stop_time": "2022-06-13T09:05:53.000Z"1459 }1460 },1461 {1462 "node": {1463 "id": "52b68cae-8ead-4abe-bd84-c824364987e0",1464 "relationship_type": "related-to",1465 "start_time": "2022-06-13T09:05:52.000Z",1466 "stop_time": "2022-06-13T09:05:52.000Z"1467 }1468 },1469 {1470 "node": {1471 "id": "215a72eb-c9c9-49b1-8299-11962653edfc",1472 "relationship_type": "related-to",1473 "start_time": "2022-06-13T09:05:51.000Z",1474 "stop_time": "2022-06-13T09:05:51.000Z"1475 }1476 },1477 {1478 "node": {1479 "id": "b5532414-b08a-470a-823a-1f5ac29450c9",1480 "relationship_type": "related-to",1481 "start_time": "2022-06-13T09:04:51.000Z",1482 "stop_time": "2022-06-13T09:04:51.000Z"1483 }1484 },1485 {1486 "node": {1487 "id": "82fb0cc9-6243-4905-9243-2a3c8980e808",1488 "relationship_type": "related-to",1489 "start_time": "2022-06-13T09:04:50.000Z",1490 "stop_time": "2022-06-13T09:04:50.000Z"1491 }1492 },1493 {1494 "node": {1495 "id": "20110a36-3a85-4a26-bc30-2b28aa02c0cb",1496 "relationship_type": "related-to",1497 "start_time": "2022-06-13T09:04:49.000Z",1498 "stop_time": "2022-06-13T09:04:49.000Z"1499 }1500 },1501 {1502 "node": {1503 "id": "46244b01-7963-4626-91b2-9740cab0be2b",1504 "relationship_type": "related-to",1505 "start_time": "2022-06-13T09:04:47.000Z",1506 "stop_time": "2022-06-13T09:04:47.000Z"1507 }1508 },1509 {1510 "node": {1511 "id": "efc92ec9-c40a-40eb-a4e2-1016a74d5a7d",1512 "relationship_type": "related-to",1513 "start_time": "2022-06-13T09:04:42.000Z",1514 "stop_time": "2022-06-13T09:04:42.000Z"1515 }1516 },1517 {1518 "node": {1519 "id": "13c3ab8e-5a59-4720-99a4-5c2452196b6a",1520 "relationship_type": "related-to",1521 "start_time": "2022-06-13T09:04:38.000Z",1522 "stop_time": "2022-06-13T09:04:38.000Z"1523 }1524 },1525 {1526 "node": {1527 "id": "2a1fc726-6611-4d63-9c88-9b8a36a5bc13",1528 "relationship_type": "related-to",1529 "start_time": "2022-06-13T09:04:37.000Z",1530 "stop_time": "2022-06-13T09:04:37.000Z"1531 }1532 },1533 {1534 "node": {1535 "id": "4d90cf5e-c4e7-47fc-ab4c-280aac402c07",1536 "relationship_type": "related-to",1537 "start_time": "2022-06-13T08:38:56.000Z",1538 "stop_time": "2022-06-13T08:38:56.000Z"1539 }1540 },1541 {1542 "node": {1543 "id": "d3aefeb2-de2a-4a65-ba75-217a2e8b9aa9",1544 "relationship_type": "related-to",1545 "start_time": "2022-06-13T07:55:30.000Z",1546 "stop_time": "2022-06-13T07:55:30.000Z"1547 }1548 },1549 {1550 "node": {1551 "id": "dafdc1fd-8f02-4524-ac3f-a4b377e58f3e",1552 "relationship_type": "related-to",1553 "start_time": "2022-06-13T07:55:28.000Z",1554 "stop_time": "2022-06-13T07:55:28.000Z"1555 }1556 },1557 {1558 "node": {1559 "id": "1db0e017-6638-4085-9e96-fe93fedbd0e1",1560 "relationship_type": "related-to",1561 "start_time": "2022-06-13T07:39:59.000Z",1562 "stop_time": "2022-06-13T07:39:59.000Z"1563 }1564 },1565 {1566 "node": {1567 "id": "40eaa382-28c9-4050-8244-6ba0cb0eeb05",1568 "relationship_type": "related-to",1569 "start_time": "2022-06-13T07:39:59.000Z",1570 "stop_time": "2022-06-13T07:39:59.000Z"1571 }1572 },1573 {1574 "node": {1575 "id": "3d09b6f9-e526-4e7d-ba36-b5e2e87275ce",1576 "relationship_type": "indicates",1577 "start_time": "2022-06-13T07:39:59.000Z",1578 "stop_time": "2022-06-13T07:39:59.000Z"1579 }1580 },1581 {1582 "node": {1583 "id": "c199af82-035b-49ca-b324-efaeea008a0d",1584 "relationship_type": "related-to",1585 "start_time": "2022-06-13T07:39:59.000Z",1586 "stop_time": "2022-06-13T07:39:59.000Z"1587 }1588 },1589 {1590 "node": {1591 "id": "90ad8957-8e15-41bc-87f9-07177d555e63",1592 "relationship_type": "related-to",1593 "start_time": "2022-06-13T07:36:02.000Z",1594 "stop_time": "2022-06-13T07:36:02.000Z"1595 }1596 },1597 {1598 "node": {1599 "id": "7cceb1c6-da69-4a8f-baf8-30cebef7d673",1600 "relationship_type": "related-to",1601 "start_time": "2022-06-13T07:36:00.000Z",1602 "stop_time": "2022-06-13T07:36:00.000Z"1603 }1604 },1605 {1606 "node": {1607 "id": "e83086d7-c63f-4065-83c8-5a076654e65b",1608 "relationship_type": "related-to",1609 "start_time": "2022-06-13T07:35:22.000Z",1610 "stop_time": "2022-06-13T07:35:22.000Z"1611 }1612 },1613 {1614 "node": {1615 "id": "03981894-96de-4c1a-9968-ccf75e87b0d1",1616 "relationship_type": "related-to",1617 "start_time": "2022-06-13T07:35:21.000Z",1618 "stop_time": "2022-06-13T07:35:21.000Z"1619 }1620 },1621 {1622 "node": {1623 "id": "7e8712d5-cd51-4331-9c03-1ffc3c136a5e",1624 "relationship_type": "related-to",1625 "start_time": "2022-06-13T07:35:20.000Z",1626 "stop_time": "2022-06-13T07:35:20.000Z"1627 }1628 }1629]1630// if (obj[199]) {1631// console.log('done')1632// }1633let dateTimeArray = obj.map((o,i) => {1634 if (obj[i+1]) {1635 return {1636 x: o['node'].start_time,1637 y: moment.utc(moment(o['node'].start_time)1638 .diff(moment(obj[i+1]['node'].start_time)))1639 .format("HH:mm:ss")1640 }1641 }1642})1643// console.log(dateTimeArray);1644const DATE_FORMATTER = 'DD/MM/YYYY';1645const DATE_TIME_FORMATTER = 'DD/MM/YYYY HH:mm:ss';1646function dateFormater(str) {1647 if (!str) {1648 return null;1649 }1650 /* eslint-disable */1651 const [dd, mm, yyyy] = str.split(/(\-|\/)/g).filter((a) => {1652 // @ts-ignore1653 return !isNaN(a);1654 });1655 return `${+dd < 10 ? `0${+dd}` : dd}/${+mm < 10 ? `0${+mm}` : mm}/${yyyy}`;1656 /* eslint-enable */1657}1658function dateTimeFormatter(str) {1659 if (!str) {1660 return null;1661 }1662 const [dd, mm, yyyy, HH, MM, SS] = str.split(/(\-|\/|\s|\:)/g).filter((a) => {1663 a = a.trim();1664 return a && !isNaN(a);1665 });1666 return `${+dd < 10 ? `0${+dd}` : dd}/${+mm < 10 ? `0${+mm}` : mm}/${yyyy} ${+HH < 10 ? `0${+HH}` : HH}:${+MM < 10 ? `0${+MM}` : MM}:${+SS < 10 ? `0${+SS}` : SS}`;1667 /* eslint-enable */1668}1669// console.log(dateTimeFormatter('01/01/2020 00-00-00'));1670// console.log(moment(dateTimeFormatter('12/07/2021 21/36/45'), DATE_TIME_FORMATTER, true).isValid());1671// console.log(moment('12/07/2021 21/36/45', DATE_TIME_FORMATTER, true).isValid());1672// console.log(moment('02/31/2021', DATE_FORMATTER, true).isValid())1673// console.log(moment('15/01/2021', DATE_FORMATTER, true).isValid())1674// console.log(moment().format('DD/MM/YYYY HH:mm:ss'));1675// console.log(moment('23/08/2022 13:26:15', 'DD/MM/YYYY HH:mm:ss', true).isValid());1676// console.log(moment('15/01/2021 13:21:46', 'YYYY-MM-DD HH:mm:ss', true).format('YYYY-MM-DD HH:mm:ss'));1677// const startFrom = moment('15/07/202', DATE_FORMATTER, true) > moment('15/07/2022', DATE_FORMATTER, true);1678// const isValid = moment(dateTimeFormatter('12/08/2022 16:25:41'), DATE_TIME_FORMATTER, true) >1679// moment(dateTimeFormatter('12/08/2022 13:25:41'), DATE_TIME_FORMATTER, true);1680// console.log(isValid);1681const convertSiteToUtcToday = (date) => {1682 if (date) {1683 return moment(date)1684 // .startOf('day')1685 .utc()1686 .format('YYYY-MM-DDTHH:mm:ss');1687 }1688 // return moment()1689 // .startOf('day')1690 // .utc()1691 // .format('YYYY-MM-DDTHH:mm:ss');1692};1693const convertUtcTodayToSite = (date) => {1694 return moment(date);1695};1696const createDateWithDateFormatter = (date) => {1697 return moment(date)1698 .startOf('day')1699 .utc()1700 .format('YYYY-MM-DDTHH:mm:ss');1701};1702// console.log(convertUtcTodayToSite('12/08/2022 18:25:41'));1703console.log(convertSiteToUtcToday('12/08/2022 12:25:41'));1704console.log(convertSiteToUtcToday('12/08/2022 13:56:24'));1705console.log(moment('2022-12-08T07:25:41'))1706console.log(moment.utc().format())1707console.log(moment().format())...

Full Screen

Full Screen

transcript_1.js

Source:transcript_1.js Github

copy

Full Screen

1var transcript = {2 "results": [3 {4 "word_alternatives": [5 {6 "start_time": 0.8,7 "alternatives": [8 {9 "confidence": 1,10 "word": "my"11 }12 ],13 "end_time": 0.9614 },15 {16 "start_time": 0.96,17 "alternatives": [18 {19 "confidence": 1,20 "word": "family"21 }22 ],23 "end_time": 1.824 },25 {26 "start_time": 1.95,27 "alternatives": [28 {29 "confidence": 0.6107,30 "word": "absolute"31 },32 {33 "confidence": 0.1671,34 "word": "Apsley"35 },36 {37 "confidence": 0.069,38 "word": "outliers"39 },40 {41 "confidence": 0.0535,42 "word": "obsolete"43 },44 {45 "confidence": 0.0377,46 "word": "absolutes"47 },48 {49 "confidence": 0.0287,50 "word": "out"51 },52 {53 "confidence": 0.0188,54 "word": "outlays"55 }56 ],57 "end_time": 2.3858 },59 {60 "start_time": 2.39,61 "alternatives": [62 {63 "confidence": 0.6919,64 "word": "is"65 },66 {67 "confidence": 0.136,68 "word": "as"69 },70 {71 "confidence": 0.0287,72 "word": "please"73 }74 ],75 "end_time": 2.576 },77 {78 "start_time": 2.5,79 "alternatives": [80 {81 "confidence": 0.9897,82 "word": "fascinated"83 }84 ],85 "end_time": 3.5386 },87 {88 "start_time": 3.62,89 "alternatives": [90 {91 "confidence": 0.9992,92 "word": "by"93 }94 ],95 "end_time": 4.1196 },97 {98 "start_time": 4.14,99 "alternatives": [100 {101 "confidence": 0.9994,102 "word": "the"103 }104 ],105 "end_time": 4.23106 },107 {108 "start_time": 4.23,109 "alternatives": [110 {111 "confidence": 1,112 "word": "work"113 }114 ],115 "end_time": 4.58116 },117 {118 "start_time": 4.58,119 "alternatives": [120 {121 "confidence": 0.9743,122 "word": "I'm"123 },124 {125 "confidence": 0.0256,126 "word": "am"127 }128 ],129 "end_time": 4.79130 },131 {132 "start_time": 4.79,133 "alternatives": [134 {135 "confidence": 0.9999,136 "word": "doing"137 }138 ],139 "end_time": 5.06140 },141 {142 "start_time": 5.06,143 "alternatives": [144 {145 "confidence": 0.9996,146 "word": "with"147 }148 ],149 "end_time": 5.23150 },151 {152 "start_time": 5.23,153 "alternatives": [154 {155 "confidence": 0.9998,156 "word": "Watson"157 }158 ],159 "end_time": 5.87160 },161 {162 "start_time": 6.29,163 "alternatives": [164 {165 "confidence": 1,166 "word": "and"167 }168 ],169 "end_time": 6.8170 },171 {172 "start_time": 6.98,173 "alternatives": [174 {175 "confidence": 0.9833,176 "word": "I"177 },178 {179 "confidence": 0.0102,180 "word": "by"181 }182 ],183 "end_time": 7.13184 },185 {186 "start_time": 7.13,187 "alternatives": [188 {189 "confidence": 0.8472,190 "word": "I"191 }192 ],193 "end_time": 7.23194 },195 {196 "start_time": 7.23,197 "alternatives": [198 {199 "confidence": 0.9981,200 "word": "think"201 }202 ],203 "end_time": 7.43204 },205 {206 "start_time": 7.43,207 "alternatives": [208 {209 "confidence": 1,210 "word": "they"211 }212 ],213 "end_time": 7.52214 },215 {216 "start_time": 7.52,217 "alternatives": [218 {219 "confidence": 1,220 "word": "feel"221 }222 ],223 "end_time": 7.95224 },225 {226 "start_time": 7.98,227 "alternatives": [228 {229 "confidence": 1,230 "word": "a"231 }232 ],233 "end_time": 8.05234 },235 {236 "start_time": 8.05,237 "alternatives": [238 {239 "confidence": 0.9999,240 "word": "personal"241 }242 ],243 "end_time": 8.68244 },245 {246 "start_time": 8.68,247 "alternatives": [248 {249 "confidence": 1,250 "word": "sense"251 }252 ],253 "end_time": 8.94254 },255 {256 "start_time": 8.94,257 "alternatives": [258 {259 "confidence": 1,260 "word": "of"261 }262 ],263 "end_time": 9.05264 },265 {266 "start_time": 9.05,267 "alternatives": [268 {269 "confidence": 1,270 "word": "pride"271 }272 ],273 "end_time": 9.66274 },275 {276 "start_time": 9.66,277 "alternatives": [278 {279 "confidence": 1,280 "word": "and"281 }282 ],283 "end_time": 9.83284 },285 {286 "start_time": 9.83,287 "alternatives": [288 {289 "confidence": 0.9999,290 "word": "satisfaction"291 }292 ],293 "end_time": 10.72294 },295 {296 "start_time": 11.2,297 "alternatives": [298 {299 "confidence": 0.4755,300 "word": "about"301 },302 {303 "confidence": 0.1395,304 "word": "bout"305 },306 {307 "confidence": 0.1016,308 "word": "%HESITATION"309 },310 {311 "confidence": 0.0896,312 "word": "of"313 },314 {315 "confidence": 0.0674,316 "word": "out"317 },318 {319 "confidence": 0.0655,320 "word": "by"321 },322 {323 "confidence": 0.0224,324 "word": "a"325 },326 {327 "confidence": 0.0204,328 "word": "but"329 }330 ],331 "end_time": 11.41332 },333 {334 "start_time": 11.41,335 "alternatives": [336 {337 "confidence": 0.5376,338 "word": "with"339 },340 {341 "confidence": 0.4525,342 "word": "what"343 }344 ],345 "end_time": 11.51346 },347 {348 "start_time": 11.51,349 "alternatives": [350 {351 "confidence": 0.9938,352 "word": "the"353 }354 ],355 "end_time": 11.57356 },357 {358 "start_time": 11.57,359 "alternatives": [360 {361 "confidence": 0.9769,362 "word": "fact"363 }364 ],365 "end_time": 11.94366 },367 {368 "start_time": 11.94,369 "alternatives": [370 {371 "confidence": 0.7003,372 "word": "is"373 },374 {375 "confidence": 0.2001,376 "word": "it's"377 },378 {379 "confidence": 0.0508,380 "word": "that's"381 },382 {383 "confidence": 0.0108,384 "word": "its"385 },386 {387 "confidence": 0.0106,388 "word": "this"389 }390 ],391 "end_time": 12.05392 },393 {394 "start_time": 12.05,395 "alternatives": [396 {397 "confidence": 0.9976,398 "word": "not"399 }400 ],401 "end_time": 12.23402 },403 {404 "start_time": 12.23,405 "alternatives": [406 {407 "confidence": 0.9982,408 "word": "just"409 }410 ],411 "end_time": 12.42412 },413 {414 "start_time": 12.42,415 "alternatives": [416 {417 "confidence": 0.9982,418 "word": "technology"419 }420 ],421 "end_time": 12.95422 },423 {424 "start_time": 12.95,425 "alternatives": [426 {427 "confidence": 1,428 "word": "for"429 }430 ],431 "end_time": 13.08432 },433 {434 "start_time": 13.08,435 "alternatives": [436 {437 "confidence": 0.9644,438 "word": "technology's"439 },440 {441 "confidence": 0.0351,442 "word": "technology"443 }444 ],445 "end_time": 13.61446 },447 {448 "start_time": 13.61,449 "alternatives": [450 {451 "confidence": 0.9989,452 "word": "sake"453 }454 ],455 "end_time": 13.85456 },457 {458 "start_time": 13.85,459 "alternatives": [460 {461 "confidence": 0.3588,462 "word": "it's"463 },464 {465 "confidence": 0.3442,466 "word": "is"467 },468 {469 "confidence": 0.1871,470 "word": "as"471 },472 {473 "confidence": 0.0769,474 "word": "its"475 },476 {477 "confidence": 0.0157,478 "word": "this"479 },480 {481 "confidence": 0.0105,482 "word": "US"483 }484 ],485 "end_time": 13.97486 },487 {488 "start_time": 13.97,489 "alternatives": [490 {491 "confidence": 0.9989,492 "word": "technology"493 }494 ],495 "end_time": 14.56496 },497 {498 "start_time": 14.56,499 "alternatives": [500 {501 "confidence": 0.987,502 "word": "that's"503 }504 ],505 "end_time": 14.76506 },507 {508 "start_time": 14.76,509 "alternatives": [510 {511 "confidence": 0.9985,512 "word": "actually"513 }514 ],515 "end_time": 15.26516 },517 {518 "start_time": 15.26,519 "alternatives": [520 {521 "confidence": 1,522 "word": "making"523 }524 ],525 "end_time": 15.64526 },527 {528 "start_time": 15.64,529 "alternatives": [530 {531 "confidence": 1,532 "word": "a"533 }534 ],535 "end_time": 15.7536 },537 {538 "start_time": 15.7,539 "alternatives": [540 {541 "confidence": 1,542 "word": "difference"543 }544 ],545 "end_time": 16.37546 },547 {548 "start_time": 16.69,549 "alternatives": [550 {551 "confidence": 0.9985,552 "word": "and"553 }554 ],555 "end_time": 16.95556 },557 {558 "start_time": 17,559 "alternatives": [560 {561 "confidence": 0.6974,562 "word": "then"563 },564 {565 "confidence": 0.0994,566 "word": "don't"567 },568 {569 "confidence": 0.0807,570 "word": "den"571 },572 {573 "confidence": 0.0673,574 "word": "Dan"575 },576 {577 "confidence": 0.0222,578 "word": "ten"579 },580 {581 "confidence": 0.021,582 "word": "and"583 }584 ],585 "end_time": 17.2586 },587 {588 "start_time": 17.2,589 "alternatives": [590 {591 "confidence": 0.5086,592 "word": "changing"593 },594 {595 "confidence": 0.4843,596 "word": "change"597 }598 ],599 "end_time": 17.57600 },601 {602 "start_time": 17.57,603 "alternatives": [604 {605 "confidence": 0.9974,606 "word": "the"607 }608 ],609 "end_time": 17.64610 },611 {612 "start_time": 17.64,613 "alternatives": [614 {615 "confidence": 0.9939,616 "word": "world"617 }618 ],619 "end_time": 18.08620 }621 ],622 "keywords_result": {623 "watson": [624 {625 "normalized_text": "Watson",626 "start_time": 5.23,627 "confidence": 1,628 "end_time": 5.87629 }630 ],631 "technology": [632 {633 "normalized_text": "technology",634 "start_time": 12.42,635 "confidence": 0.998,636 "end_time": 12.95637 },638 {639 "normalized_text": "technology",640 "start_time": 13.08,641 "confidence": 0.035,642 "end_time": 13.61643 },644 {645 "normalized_text": "technology",646 "start_time": 13.97,647 "confidence": 0.999,648 "end_time": 14.56649 }650 ],651 "sense of pride": [652 {653 "normalized_text": "sense of pride",654 "start_time": 8.68,655 "confidence": 1,656 "end_time": 9.66657 }658 ],659 "changing the world": [660 {661 "normalized_text": "changing the world",662 "start_time": 17.2,663 "confidence": 0.504,664 "end_time": 18.08665 }666 ]667 },668 "alternatives": [669 {670 "timestamps": [671 [672 "my",673 0.8,674 0.96675 ],676 [677 "family",678 0.96,679 1.8680 ],681 [682 "absolute",683 1.95,684 2.38685 ],686 [687 "is",688 2.38,689 2.5690 ],691 [692 "fascinated",693 2.5,694 3.53695 ],696 [697 "by",698 3.62,699 4.11700 ],701 [702 "the",703 4.14,704 4.23705 ],706 [707 "work",708 4.23,709 4.58710 ],711 [712 "I'm",713 4.58,714 4.79715 ],716 [717 "doing",718 4.79,719 5.06720 ],721 [722 "with",723 5.06,724 5.23725 ],726 [727 "Watson",728 5.23,729 5.87730 ],731 [732 "and",733 6.29,734 6.8735 ],736 [737 "I",738 6.98,739 7.13740 ],741 [742 "I",743 7.13,744 7.23745 ],746 [747 "think",748 7.23,749 7.43750 ],751 [752 "they",753 7.43,754 7.52755 ],756 [757 "feel",758 7.52,759 7.95760 ],761 [762 "a",763 7.98,764 8.05765 ],766 [767 "personal",768 8.05,769 8.68770 ],771 [772 "sense",773 8.68,774 8.94775 ],776 [777 "of",778 8.94,779 9.05780 ],781 [782 "pride",783 9.05,784 9.66785 ],786 [787 "and",788 9.66,789 9.83790 ],791 [792 "satisfaction",793 9.83,794 10.72795 ],796 [797 "about",798 11.18,799 11.41800 ],801 [802 "what",803 11.41,804 11.51805 ],806 [807 "the",808 11.51,809 11.57810 ],811 [812 "fact",813 11.57,814 11.94815 ],816 [817 "is",818 11.94,819 12.05820 ],821 [822 "not",823 12.05,824 12.23825 ],826 [827 "just",828 12.23,829 12.42830 ],831 [832 "technology",833 12.42,834 12.95835 ],836 [837 "for",838 12.95,839 13.08840 ],841 [842 "technology's",843 13.08,844 13.61845 ],846 [847 "sake",848 13.61,849 13.85850 ],851 [852 "is",853 13.85,854 13.96855 ],856 [857 "technology",858 13.96,859 14.56860 ],861 [862 "that's",863 14.56,864 14.76865 ],866 [867 "actually",868 14.76,869 15.26870 ],871 [872 "making",873 15.26,874 15.64875 ],876 [877 "a",878 15.64,879 15.7880 ],881 [882 "difference",883 15.7,884 16.37885 ],886 [887 "and",888 16.69,889 16.95890 ],891 [892 "then",893 17,894 17.2895 ],896 [897 "changing",898 17.2,899 17.57900 ],901 [902 "the",903 17.57,904 17.64905 ],906 [907 "world",908 17.64,909 18.08910 ]911 ],912 "confidence": 0.895,913 "transcript": "my family absolute is fascinated by the work I'm doing with Watson and I I think they feel a personal sense of pride and satisfaction about what the fact is not just technology for technology's sake is technology that's actually making a difference and then changing the world "914 }915 ],916 "final": true917 }918 ],919 "result_index": 0920 };921module.exports = {...

Full Screen

Full Screen

interval-partitioning.py

Source:interval-partitioning.py Github

copy

Full Screen

1from collections import namedtuple, defaultdict2from operator import attrgetter3import heapq, functools, itertools, math4# ________________________________________________________________________________5# Topological sort and `heapindex` funtion.6class OrderableBunch(object):7 def __init__(self, **kwds):8 if 'key' not in kwds:9 raise ValueError("The *key* parameter is mandatory for ordering")10 11 self.__dict__.update(kwds)12 def __lt__(self, other):13 key = self.key14 return key(self) < key(other)15def topological_sort(graph, key_spec=(len, 0)):16 """Topological sort.17 >>> G = {18 ... 'v₁': set(),19 ... 'v₂': set(),20 ... 'v₃': {'v₂'},21 ... 'v₄': {'v₁','v₃'},22 ... 'v₅': {'v₁','v₂','v₃','v₄'},23 ... 'v₆': {'v₂','v₅'},24 ... 'v₇': {'v₁','v₅','v₆'}25 ... }26 >>> list(topological_sort(G))27 ['v₁', 'v₂', 'v₃', 'v₄', 'v₅', 'v₆', 'v₇']28 """29 key, check = key_spec # unpacking the spec for the priority rank function.30 q = [] # the priority queue.31 G = defaultdict(set) # The "usual" adjacency list representation of a graph;32 # btw, `set` is used as fallback ctor because of a fast33 # lookup in the forthcoming expression `children = G[node]`.34 for node, parents in graph.items():35 v = OrderableBunch(priority=key(parents), value=node, # the priority of each node depends on the rank of their `parents`. 36 key=attrgetter('priority')) # the newly OrderableBunch obj uses `priority` as key in the heapq.37 heapq.heappush(q, v) # push it into the queue mantaining the heap invariant.38 for parent in parents: # For each parent of `node`, the loop records39 G[parent].add(v) # this forward connection augmenting the graph `G`.40 while q:41 v = heapq.heappop(q) # It extracts the next value with higher priority42 assert v.priority == check # and it checks that its priority is consistent wrt `key`.43 node = v.value # Simple unpacking.44 yield node # A new record for the generator.45 children = G[node] # Fast lookup because G's values are `set` objects.46 if not children: continue # Noop.47 for child in children: # No need to use `heapindex` because we 48 child.priority -= 1 # reference OrderableBunch objs directly.49 50 heapq.heapify(q) # Restore the heap invariant in *linear time*.51def heapindex(q, item):52 """A generator of positions in which `item` occurs in `q`, in O(log n) time where n is `len(q)`.53 >>> import heapq54 >>> q = list(reversed(range(10)))55 >>> q56 [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]57 >>> heapq.heapify(q)58 >>> q59 [0, 1, 3, 2, 5, 4, 7, 9, 6, 8]60 >>> list(heapindex(q, 4))61 [5]62 >>> list(map(lambda item: min(heapindex(q, item)), q))63 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]64 >>> q = [1,3,3,3,10,10,2,2,4]65 >>> heapq.heapify(q)66 >>> q67 [1, 2, 2, 3, 10, 10, 3, 3, 4]68 >>> list(map(lambda item: list(heapindex(q, item)), [1,2,3,10,4]))69 [[0], [1, 2], [3, 7, 6], [4, 5], [8]]70 """71 L = len(q) # Simple upper bound for indexes.72 stack = [0] # Start with the position of the highest-priority obj.73 while stack: # Implement a recursive process by using a stack.74 k = stack.pop() # Handle the next position75 76 if k >= L or q[k] > item: # Outbound or greater than the desired item.77 continue78 79 if q[k] == item: # Good, remember `k` as a position where `item` lies.80 yield k81 stack.append(2*k+2) # According the the heapq's invariant, it proceeds82 stack.append(2*k+1) # in a logarithmic way.83# ________________________________________________________________________________84# Domain-specific Definitions.85job = namedtuple('job', ['start_time', 'duration', 'deadline', 'name']) 86dep = namedtuple('dep', ['name', 'jitter'])87def by(jobs, prop_name):88 return dict(zip(map(attrgetter(prop_name), jobs), jobs))89def finish_time(jb):90 return jb.start_time + jb.duration91def overlaps(I, J):92 return finish_time(I) > J.start_time # taking advantage of ordering93def ontime(J):94 return finish_time(J) <= J.deadline95def ordering(jobs, deps):96 deps_graph = {J.name: [d.name for d in deps[J.name]] for J in jobs}97 DAG = topological_sort(deps_graph)98 jobs_by_name = by(jobs, 'name')99 return [jobs_by_name[job_name] for job_name in DAG]100def run(graph, label, busy=defaultdict(list)):101 jobs, deps = graph # unpacking.102 def R(prefix, jobs, machine, label):103 if jobs: # still jobs to allocate.104 J_clean, *Js = jobs # unpacking.105 prefix_by_name = by(prefix, 'name')106 def ready_time(dp): # `dp` stands for `dependency`.107 D = prefix_by_name[dp.name]108 assert D.start_time is not None and D.name == dp.name109 rt = None110 if dp.jitter is None:111 rt = finish_time(D)112 else:113 assert dp.jitter > 0114 rt = D.start_time + dp.jitter115 return rt116 at_least = max(map(ready_time, deps[J_clean.name]), default=0)117 for st in itertools.count(max(at_least, J_clean.start_time or 0)):118 #min(J_clean.deadline - J_clean.duration,119 #max(map(attrgetter('duration'), jobs))) + 1):120 if J_clean.deadline is not math.inf and st + J_clean.duration > J_clean.deadline:121 break122 J = J_clean._replace(start_time=st)123 L = label[J.name].copy()124 for I in filter(functools.partial(overlaps, J=J), prefix): # O(n^2) complexity because of the last job; btw, preprocess of overlappings may help to check only those ones, getting a linear time.125 label[J.name] -= {machine[I.name]} # remove the machine on which job `I` is allocated for possibilities about job `J`.126 for l in label[J.name]:127 J_delayed = J128 for B in busy[l]:129 if overlaps(J_delayed, B):130 d = J_delayed.duration + B.duration131 J_delayed = J_delayed._replace(duration=d)132 else:133 break # assuming busy jobs are ordered too.134 if ontime(J_delayed):135 machine[J.name] = l # an attempt to allocate job `J` on machine `l`.136 yield from R([J_delayed] + prefix, Js, machine.copy(), label)137 label[J.name] = L138 else:139 assert len(machine) == len(prefix)140 assert all(map(lambda J: J.start_time is not None, prefix))141 yield (machine, prefix)142 return R([], jobs, {}, label.copy())143def sol_handler(sol):144 machine, prefix = sol145 M = {m: [] for m in set(machine.values())}146 for J in prefix:147 M[machine[J.name]].append(J)148 for k, v in M.items():149 v.sort()150 return M151def roassal(sol):152 return ['#({} {} {} {})'.format(machine, J.start_time, finish_time(J), J.name)153 for machine, jobs in sol.items() for J in jobs]154 155# ________________________________________________________________________________156# Problem instance157def liviotti():158 import random159 random.seed(1 << 5) # to reproduce the same values all the times.160 params = dict(required_jobs=50, max_duration=10, children_bounds=(5, 10), available_machines=10) # generation parameters.161 162 jobs = [job(start_time=None,163 duration=random.randint(1, params['max_duration']),164 deadline=math.inf, # for now every job can be allocated without 165 # time constraint, just schedule all of them.166 name=str(j))#chr(ord('A') + j)) 167 for j in range(params['required_jobs'])]168 deps = defaultdict(list)169 children = []170 for J in jobs:171 for c in range(random.randint(*params['children_bounds'])):172 C = J._replace(name=J.name + '_' + str(c), 173 duration=random.randint(1, params['max_duration']))174 children.append(C) # register `C` as a new job.175 deps[C.name] = [dep(name=J.name, jitter=None)] # `J` is parent of `C`176 J = C # `C` becomes the new parent for future children.177 jobs.extend(children)178 machines = set(map(str, range(params['available_machines']))) # at least each job goes to its machine.179 label = {J.name: machines.copy() for J in jobs} # each job can be assigned to any machine, initially.180 #label['A'] = {'M₃'} # job 'E' can be performed on the first machine only.181 #label['E'] = {'M₀'} # job 'E' can be performed on the first machine only.182 #label['D'] = {'M₁', 'M₂'} # job 'E' can be performed on the first machine only.183 """184 busy = defaultdict(list)185 busy.update({186 'M₀': [job(2, 3, None, 'cleaning'), 187 job(14, 1, None, 'sunday')],188 'M₁': [job(5, 2, None, 'maintenance')],189 })190 """191 busy = {machine: [job(i, 1, None, 'sunday') for i in range(7, 1000, 7)] 192 for machine in machines}193 print('Summary:\n=======\nJobs ({}): {}\nDeps: {}\n'.format(194 len(jobs), jobs, deps))195 196 sols = run((ordering(jobs, deps), deps), label.copy(), busy)197 print()198 for i, sol in zip(range(1), map(sol_handler, sols)):199 #for sol in map(sol_handler, sols):200 print('#({})'.format(' '.join(roassal(sol))), '\n')201 202def simple_test():203 """204 >>> jobs = [job(None, 3, 3, 'A')]205 >>> deps = defaultdict(list)206 >>> sols = run((ordering(jobs, deps), deps), {'A':{'M₀'}})207 >>> list(map(sol_handler, sols))208 [{'M₀': [job(start_time=0, duration=3, deadline=3, name='A')]}]209 >>> jobs = [job(1, 3, 6, 'A')] # if we put 8 as a deadline we should obtain allocations upto 4.210 >>> sols = run((ordering(jobs, deps), deps), {'A':{'M₀'}})211 >>> list(map(sol_handler, sols)) # doctest: +NORMALIZE_WHITESPACE212 [{'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 213 {'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 214 {'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}]215 >>> jobs.append(job(None, 3, 10, 'B'))216 >>> deps['B'] = [dep(name='A', jitter=None)]217 >>> sols = run((ordering(jobs, deps), deps), {'A':{'M₀'}, 'B':{'M₀', 'M₁'}})218 >>> list(sorted(map(sol_handler, sols), key=len)) # doctest: +NORMALIZE_WHITESPACE219 [{'M₀': [job(start_time=1, duration=3, deadline=6, name='A'), 220 job(start_time=4, duration=3, deadline=10, name='B')]}, 221 {'M₀': [job(start_time=1, duration=3, deadline=6, name='A'), 222 job(start_time=5, duration=3, deadline=10, name='B')]}, 223 {'M₀': [job(start_time=1, duration=3, deadline=6, name='A'), 224 job(start_time=6, duration=3, deadline=10, name='B')]}, 225 {'M₀': [job(start_time=1, duration=3, deadline=6, name='A'), 226 job(start_time=7, duration=3, deadline=10, name='B')]}, 227 {'M₀': [job(start_time=2, duration=3, deadline=6, name='A'), 228 job(start_time=5, duration=3, deadline=10, name='B')]}, 229 {'M₀': [job(start_time=2, duration=3, deadline=6, name='A'), 230 job(start_time=6, duration=3, deadline=10, name='B')]}, 231 {'M₀': [job(start_time=2, duration=3, deadline=6, name='A'), 232 job(start_time=7, duration=3, deadline=10, name='B')]}, 233 {'M₀': [job(start_time=3, duration=3, deadline=6, name='A'), 234 job(start_time=6, duration=3, deadline=10, name='B')]}, 235 {'M₀': [job(start_time=3, duration=3, deadline=6, name='A'), 236 job(start_time=7, duration=3, deadline=10, name='B')]}, 237 {'M₁': [job(start_time=4, duration=3, deadline=10, name='B')], 238 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 239 {'M₁': [job(start_time=5, duration=3, deadline=10, name='B')], 240 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 241 {'M₁': [job(start_time=6, duration=3, deadline=10, name='B')], 242 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 243 {'M₁': [job(start_time=7, duration=3, deadline=10, name='B')], 244 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 245 {'M₁': [job(start_time=5, duration=3, deadline=10, name='B')], 246 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 247 {'M₁': [job(start_time=6, duration=3, deadline=10, name='B')], 248 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 249 {'M₁': [job(start_time=7, duration=3, deadline=10, name='B')], 250 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 251 {'M₁': [job(start_time=6, duration=3, deadline=10, name='B')], 252 'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}, 253 {'M₁': [job(start_time=7, duration=3, deadline=10, name='B')], 254 'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}]255 >>> deps['B'] = [dep(name='A', jitter=1)]256 >>> sols = run((ordering(jobs, deps), deps), {'A':{'M₀'}, 'B':{'M₁'}})257 >>> list(sorted(map(sol_handler, sols), key=len)) # doctest: +NORMALIZE_WHITESPACE258 [{'M₁': [job(start_time=2, duration=3, deadline=10, name='B')], 259 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 260 {'M₁': [job(start_time=3, duration=3, deadline=10, name='B')], 261 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 262 {'M₁': [job(start_time=4, duration=3, deadline=10, name='B')], 263 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 264 {'M₁': [job(start_time=5, duration=3, deadline=10, name='B')], 265 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 266 {'M₁': [job(start_time=6, duration=3, deadline=10, name='B')], 267 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 268 {'M₁': [job(start_time=7, duration=3, deadline=10, name='B')], 269 'M₀': [job(start_time=1, duration=3, deadline=6, name='A')]}, 270 {'M₁': [job(start_time=3, duration=3, deadline=10, name='B')], 271 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 272 {'M₁': [job(start_time=4, duration=3, deadline=10, name='B')], 273 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 274 {'M₁': [job(start_time=5, duration=3, deadline=10, name='B')], 275 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 276 {'M₁': [job(start_time=6, duration=3, deadline=10, name='B')], 277 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 278 {'M₁': [job(start_time=7, duration=3, deadline=10, name='B')], 279 'M₀': [job(start_time=2, duration=3, deadline=6, name='A')]}, 280 {'M₁': [job(start_time=4, duration=3, deadline=10, name='B')], 281 'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}, 282 {'M₁': [job(start_time=5, duration=3, deadline=10, name='B')], 283 'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}, 284 {'M₁': [job(start_time=6, duration=3, deadline=10, name='B')], 285 'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}, 286 {'M₁': [job(start_time=7, duration=3, deadline=10, name='B')], 287 'M₀': [job(start_time=3, duration=3, deadline=6, name='A')]}]288 """289 pass...

Full Screen

Full Screen

benchmark_time.py

Source:benchmark_time.py Github

copy

Full Screen

1import tensorflow as tf2import numpy as np3import pandas as pd4import time5from tqdm import tqdm6from sklearn.model_selection import train_test_split7from scipy.stats import pearsonr8from contextual_decomposition import ContextualDecompositionExplainerTF9from gradients import GradientExplainerTF10from neural_interaction_detection import NeuralInteractionDetectionExplainerTF11from path_explain import PathExplainerTF, softplus_activation12from shapley_sampling import SamplingExplainerTF13def build_model(num_features,14 units=[128, 128],15 activation_function=tf.keras.activations.softplus,16 output_units=1):17 model = tf.keras.models.Sequential()18 model.add(tf.keras.layers.Input(shape=(num_features,)))19 for unit in units:20 model.add(tf.keras.layers.Dense(unit))21 model.add(tf.keras.layers.Activation(activation_function))22 model.add(tf.keras.layers.Dense(output_units))23 return model24def get_data(num_samples,25 num_features):26 x = np.random.randn(num_samples, num_features).astype(np.float32)27 return x28def benchmark_time():29 number_of_layers = [5]30 number_of_samples = [1000]31 number_of_features = [5, 50, 500]32 layer_array = []33 sample_array = []34 feature_array = []35 time_dict = {}36 for method in ['ih', 'eh', 'cd', 'nid', 'hess', 'hess_in', 'sii_sampling', 'sii_brute_force']:37 for eval_type in ['all', 'row', 'pair']:38 time_dict[method + '_' + eval_type] = []39 for layer_count in number_of_layers:40 for sample_count in number_of_samples:41 for feature_count in number_of_features:42 print('Number of layers: {} - Number of samples: {} - Number of features: {}'.format(layer_count, sample_count, feature_count))43 model = build_model(num_features=feature_count,44 activation_function=softplus_activation(beta=10.0))45 data = get_data(sample_count, feature_count)46 ###### Shapley Interaction Index Brute Force ######47 sii_explainer = SamplingExplainerTF(model)48 print('Shapley Interaction Index Brute Force')49 if feature_count < 10:50 start_time = time.time()51 _ = sii_explainer.interactions(inputs=data,52 baselines=np.zeros(feature_count).astype(np.float32),53 batch_size=100,54 output_index=0,55 feature_index=None,56 number_of_samples=None,57 verbose=True)58 end_time = time.time()59 time_dict['sii_brute_force_all'].append(end_time - start_time)60 start_time = time.time()61 for i in tqdm(range(1, feature_count)):62 _ = sii_explainer.interactions(inputs=data,63 baselines=np.zeros(feature_count).astype(np.float32),64 batch_size=100,65 output_index=0,66 feature_index=(0, i),67 number_of_samples=None)68 end_time = time.time()69 time_dict['sii_brute_force_row'].append(end_time - start_time)70 start_time = time.time()71 _ = sii_explainer.interactions(inputs=data,72 baselines=np.zeros(feature_count).astype(np.float32),73 batch_size=100,74 output_index=0,75 feature_index=(0, 1),76 number_of_samples=None,77 verbose=True)78 end_time = time.time()79 time_dict['sii_brute_force_pair'].append(end_time - start_time)80 else:81 time_dict['sii_brute_force_all'].append(np.nan)82 time_dict['sii_brute_force_row'].append(np.nan)83 time_dict['sii_brute_force_pair'].append(np.nan)84 ###### Shapley Interaction Index Sampling ######85 print('Shapley Interaction Index Sampling')86 if feature_count < 100:87 start_time = time.time()88 _ = sii_explainer.interactions(inputs=data,89 baselines=np.zeros(feature_count).astype(np.float32),90 batch_size=100,91 output_index=0,92 feature_index=None,93 number_of_samples=200,94 verbose=True)95 end_time = time.time()96 time_dict['sii_sampling_all'].append(end_time - start_time)97 else:98 time_dict['sii_sampling_all'].append(np.nan)99 start_time = time.time()100 for i in tqdm(range(1, feature_count)):101 _ = sii_explainer.interactions(inputs=data,102 baselines=np.zeros(feature_count).astype(np.float32),103 batch_size=100,104 output_index=0,105 feature_index=(0, i),106 number_of_samples=200)107 end_time = time.time()108 time_dict['sii_sampling_row'].append(end_time - start_time)109 start_time = time.time()110 _ = sii_explainer.interactions(inputs=data,111 baselines=np.zeros(feature_count).astype(np.float32),112 batch_size=100,113 output_index=0,114 feature_index=(0, 1),115 number_of_samples=200,116 verbose=True)117 end_time = time.time()118 time_dict['sii_sampling_pair'].append(end_time - start_time)119 ###### Integrated and Expected Hessians ######120 print('Integrated Hessians')121 path_explainer = PathExplainerTF(model)122 start_time = time.time()123 _ = path_explainer.interactions(inputs=data,124 baseline=np.zeros((1, feature_count)).astype(np.float32),125 batch_size=100,126 num_samples=200,127 use_expectation=False,128 output_indices=0,129 verbose=True,130 interaction_index=None)131 end_time = time.time()132 time_dict['ih_all'].append(end_time - start_time)133 start_time = time.time()134 _ = path_explainer.interactions(inputs=data,135 baseline=np.zeros((1, feature_count)).astype(np.float32),136 batch_size=100,137 num_samples=200,138 use_expectation=False,139 output_indices=0,140 verbose=True,141 interaction_index=0)142 end_time = time.time()143 time_dict['ih_row'].append(end_time - start_time)144 time_dict['ih_pair'].append(end_time - start_time)145 print('Expected Hessians')146 start_time = time.time()147 _ = path_explainer.interactions(inputs=data,148 baseline=np.zeros((200, feature_count)).astype(np.float32),149 batch_size=100,150 num_samples=200,151 use_expectation=True,152 output_indices=0,153 verbose=True,154 interaction_index=None)155 end_time = time.time()156 time_dict['eh_all'].append(end_time - start_time)157 start_time = time.time()158 ih_interactions = path_explainer.interactions(inputs=data,159 baseline=np.zeros((200, feature_count)).astype(np.float32),160 batch_size=100,161 num_samples=200,162 use_expectation=True,163 output_indices=0,164 verbose=True,165 interaction_index=0)166 end_time = time.time()167 time_dict['eh_row'].append(end_time - start_time)168 time_dict['eh_pair'].append(end_time - start_time)169 ###### Contextual Decomposition ######170 print('Contextual Decomposition')171 cd_explainer = ContextualDecompositionExplainerTF(model)172 start_time = time.time()173 _ = cd_explainer.interactions(inputs=data,174 batch_size=100,175 output_indices=0,176 interaction_index=None)177 end_time = time.time()178 time_dict['cd_all'].append(end_time - start_time)179 start_time = time.time()180 _ = cd_explainer.interactions(inputs=data,181 batch_size=100,182 output_indices=0,183 interaction_index=0)184 end_time = time.time()185 time_dict['cd_row'].append(end_time - start_time)186 start_time = time.time()187 _ = cd_explainer.interactions(inputs=data,188 batch_size=100,189 output_indices=0,190 interaction_index=(0, 1))191 end_time = time.time()192 time_dict['cd_pair'].append(end_time - start_time)193 ###### Neural Interaction Detection ######194 print('Neural Interaction Detection')195 nid_explainer = NeuralInteractionDetectionExplainerTF(model)196 start_time = time.time()197 _ = nid_explainer.interactions(output_index=0,198 verbose=True,199 inputs=data,200 batch_size=100)201 end_time = time.time()202 time_dict['nid_all'].append(end_time - start_time)203 start_time = time.time()204 _ = nid_explainer.interactions(output_index=0,205 verbose=True,206 inputs=data,207 batch_size=100,208 interaction_index=0)209 end_time = time.time()210 time_dict['nid_row'].append(end_time - start_time)211 start_time = time.time()212 _ = nid_explainer.interactions(output_index=0,213 verbose=True,214 inputs=data,215 batch_size=100,216 interaction_index=(0, 1))217 end_time = time.time()218 time_dict['nid_pair'].append(end_time - start_time)219 ###### Input Hessian ######220 print('Input Hessian')221 grad_explainer = GradientExplainerTF(model)222 start_time = time.time()223 hess_interactions = grad_explainer.interactions(inputs=data,224 multiply_by_input=False,225 batch_size=100,226 output_index=0)227 end_time = time.time()228 time_dict['hess_all'].append(end_time - start_time)229 start_time = time.time()230 hess_interactions = grad_explainer.interactions(inputs=data,231 multiply_by_input=False,232 batch_size=100,233 output_index=0,234 interaction_index=0)235 end_time = time.time()236 time_dict['hess_row'].append(end_time - start_time)237 time_dict['hess_pair'].append(end_time - start_time)238 start_time = time.time()239 hess_interactions = grad_explainer.interactions(inputs=data,240 multiply_by_input=True,241 batch_size=100,242 output_index=0)243 end_time = time.time()244 time_dict['hess_in_all'].append(end_time - start_time)245 start_time = time.time()246 hess_interactions = grad_explainer.interactions(inputs=data,247 multiply_by_input=True,248 batch_size=100,249 output_index=0,250 interaction_index=0)251 end_time = time.time()252 time_dict['hess_in_row'].append(end_time - start_time)253 time_dict['hess_in_pair'].append(end_time - start_time)254 layer_array.append(layer_count)255 sample_array.append(sample_count)256 feature_array.append(feature_count)257 time_dict['hidden_layers'] = layer_array258 time_dict['number_of_samples'] = sample_array259 time_dict['number_of_features'] = feature_array260 time_df = pd.DataFrame(time_dict)261 time_df.to_csv('time.csv', index=False)262if __name__ == '__main__':263 tf.autograph.set_verbosity(0)...

Full Screen

Full Screen

time.py

Source:time.py Github

copy

Full Screen

1from datetime import datetime, timedelta2def timeRange(start_time: datetime, stop_time: datetime, step_time=timedelta(seconds=1)):3 if start_time > stop_time:4 temp = stop_time5 stop_time = start_time6 start_time = temp7 curr_time = start_time8 while curr_time <= stop_time:9 yield curr_time10 curr_time += step_time11def stockTimeRange(start_time: datetime, stop_time: datetime, step_time=timedelta(seconds=1)):12 # 確保先後順序13 if start_time > stop_time:14 temp = start_time15 start_time = stop_time16 stop_time = temp17 start_time = start_time - timedelta(minutes=1) + timedelta(seconds=1)18 # 確保時間在交易時間內19 start_time = tradingTime(start_time)20 stop_time = tradingTime(stop_time)21 print(f"start_time: {start_time}, stop_time: {stop_time}")22 curr_time = start_time23 while curr_time <= stop_time:24 yield curr_time25 curr_time = tradingTime(curr_time + step_time)26def tradingTimeRange(start_time: datetime, stop_time: datetime, trading_time: list, step_time=timedelta(seconds=1)):27 # 確保先後順序28 if start_time > stop_time:29 temp = start_time30 start_time = stop_time31 stop_time = temp32 trading_time.sort()33 print(f"[tradingTimeRange] trading_time: {trading_time}")34 first_date = trading_time[0].date()35 # start_time 這天沒有交易36 if start_time.date() < first_date:37 print(f"[tradingTimeRange] first_date: {first_date}, start_time.date(): {start_time.date()}")38 start_time = datetime(year=first_date.year, month=first_date.month, day=first_date.day,39 hour=9, minute=0, second=0)40 # start_time 是有交易的日子41 else:42 print(f"[tradingTimeRange] start_time before modify: {start_time}")43 # tick 的時間比 K 棒的時間早 1 分鐘,且從 HH:MM:01 開始計時(若輸入精度到秒,那秒數是不是會怪怪的?)44 start_time = start_time - timedelta(minutes=1) + timedelta(seconds=1)45 print(f"[tradingTimeRange] start_time: {start_time}")46 start_time = tradingTime(start_time)47 print(f"[tradingTimeRange] start_time after tradingTime: {start_time}")48 last_date = trading_time[-1].date()49 # stop_time 這天沒有交易50 if last_date < stop_time.date():51 print(f"[tradingTimeRange] last_date: {last_date}, stop_time.date(): {stop_time.date()}")52 stop_time = datetime(year=last_date.year, month=last_date.month, day=last_date.day,53 hour=13, minute=30, second=0)54 # stop_time 是有交易的日子55 else:56 first_stop_time = startTradingTime(stop_time)57 print(f"[tradingTimeRange] first_stop_time: {first_stop_time}")58 # 若結束時間的指定,並不在最後一天的交易時間內,表示想要到前一天的交易結束時間點59 if stop_time < first_stop_time:60 stop_time = endTradingTime(stop_time - datetime.timedelta(days=1))61 print(f"[tradingTimeRange] stop_time -> last day endTradingTime: {stop_time}")62 stop_time = tradingTime(stop_time)63 print(f"[tradingTimeRange] start_time: {start_time}, stop_time: {stop_time}")64 n_trading_time = len(trading_time)65 if n_trading_time == 1:66 start_trading = start_time67 end_trading = stop_time68 curr_time = start_trading69 while curr_time <= end_trading:70 yield curr_time71 curr_time = tradingTime(curr_time + step_time, next_day=True)72 elif n_trading_time == 2:73 # 第一天74 start_trading = start_time75 end_trading = endTradingTime(start_time)76 curr_time = start_trading77 while curr_time <= end_trading:78 yield curr_time79 curr_time = tradingTime(curr_time + step_time, next_day=True)80 start_trading = startTradingTime(stop_time)81 end_trading = stop_time82 curr_time = start_trading83 # 最後一天84 while curr_time <= end_trading:85 yield curr_time86 curr_time = tradingTime(curr_time + step_time, next_day=True)87 else:88 # 第 1 天89 start_trading = start_time90 end_trading = endTradingTime(start_time)91 curr_time = start_trading92 while curr_time <= end_trading:93 yield curr_time94 curr_time = tradingTime(curr_time + step_time, next_day=True)95 # 第 2 天 ~ 第 N - 1 天96 for i in range(1, n_trading_time - 1):97 date_time = trading_time[i]98 start_trading = startTradingTime(date_time)99 end_trading = endTradingTime(date_time)100 curr_time = start_trading101 while curr_time <= end_trading:102 yield curr_time103 curr_time = tradingTime(curr_time + step_time, next_day=True)104 start_trading = startTradingTime(stop_time)105 end_trading = stop_time106 curr_time = start_trading107 # 第 N 天(最後一天)108 while curr_time <= end_trading:109 yield curr_time110 curr_time = tradingTime(curr_time + step_time, next_day=True)111def tradingTime(date_time, next_day=False):112 """113 確保時間在交易時間內114 :param date_time:115 :param next_day: 超過交易時間的數值,是否進位到隔天的交易開始時間點116 :return:117 """118 first_time = startTradingTime(date_time)119 last_time = endTradingTime(date_time)120 if date_time < first_time:121 date_time = first_time122 elif date_time > last_time:123 if next_day:124 date_time = first_time + timedelta(days=1)125 else:126 date_time = last_time127 return date_time128def startTradingTime(date_time):129 return datetime(date_time.year, date_time.month, date_time.day, 9, 0, 1)130def endTradingTime(date_time):131 return datetime(date_time.year, date_time.month, date_time.day, 13, 30, 0)132if __name__ == "__main__":133 class Tester:134 def testStockTimeRange(self):135 start_time = datetime(2020, 3, 2, 13, 29)136 stop_time = datetime(2020, 3, 4, 0, 0)137 idx = 0138 for t in stockTimeRange(start_time=stop_time, stop_time=start_time, step_time=timedelta(seconds=1)):139 idx += 1140 print(idx, t)141 def testTradingTime(self):142 date_time = datetime(2020, 3, 2, 8, 45, 0)143 print(f"date_time: {date_time} -> {tradingTime(date_time)}")144 date_time = datetime(2020, 3, 2, 14, 9, 0)145 print(f"date_time: {date_time} -> {tradingTime(date_time)}")146 def testTradingTimeRange(self):147 start_time = startTradingTime(datetime(2020, 5, 14))148 stop_time = endTradingTime(datetime(2020, 5, 21))149 trading_time = [datetime(year=2020, month=5, day=15),150 datetime(year=2020, month=5, day=17),151 datetime(year=2020, month=5, day=19),152 datetime(year=2020, month=5, day=21)]153 """154 """155 idx = 0156 for t in tradingTimeRange(start_time=start_time, stop_time=stop_time, trading_time=trading_time,157 step_time=timedelta(minutes=1)):158 if idx % 30 == 0:159 print(idx, t)160 idx += 1161 tester = Tester()...

Full Screen

Full Screen

idoly-pride-op.py

Source:idoly-pride-op.py Github

copy

Full Screen

1from pyonfx import *2import random3io = Ass("idoly-pride-op.ass")4meta, styles, lines = io.get_data()5circle = Shape.ellipse(20, 20)6def romaji(line, l):7 8 l.start_time = line.start_time - 3009 l.end_time = line.start_time10 l.text = "{\\blur1\\fscx5\\bord1.5\\an4\\pos(%.3f,%.3f)\\c&HFFFFFF&\\t(0,300,\\fscx100)\\p1}%s" % (11 line.left, line.top,Shape.rectangle(line.width,2))12 13 io.write_line(l)14 15 l.start_time = line.start_time16 l.end_time = line.start_time + 30017 l.text = "{\\blur1\\fscx100\\bord1.5\\an6\\pos(%.3f,%.3f)\\c&HFFFFFF&\\t(0,300,\\fscx5)\\p1}%s" % (18 line.right, line.top,Shape.rectangle(line.width,2))19 20 io.write_line(l)21 22 23 for syl in Utils.all_non_empty(line.syls):24 # Leadin Effect25 l.layer = 026 if line.actor == "split":27 mulai = syl.start_time28 if mulai <=2240:29 ledi = 0 if line.leadin < 300 else 30030 l.start_time = line.start_time - ledi31 l.end_time = line.start_time + syl.start_time32 l.dur = l.end_time - l.start_time33 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)\\fad(%d,0)}%s" % (34 syl.center, syl.middle, ledi, syl.text)35 io.write_line(l)36 else:37 38 ledi = 0 if line.leadin < 300 else 30039 l.start_time = line.start_time - ledi40 l.end_time = line.start_time + 224041 l.dur = l.end_time - l.start_time42 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)\\fad(%d,0)}%s" % (43 syl.center, syl.middle, ledi, syl.text)44 io.write_line(l)45 46 l.start_time = line.start_time + 224047 l.end_time = line.start_time + syl.start_time48 l.dur = l.end_time - l.start_time49 50 l.text = "{\\3c&H3E79B1&\\blur1\\an5\\pos(%.3f,%.3f)}%s" % (51 syl.center, syl.middle, syl.text)52 io.write_line(l)53 else:54 ledi = 0 if line.leadin < 300 else 30055 l.start_time = line.start_time - ledi56 l.end_time = line.start_time + syl.start_time57 l.dur = l.end_time - l.start_time58 59 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)\\fad(%d,0)}%s" % (60 syl.center, syl.middle, ledi, syl.text)61 io.write_line(l)62 # Main Effect63 if l.effect == "fx1":64 65 l.layer = 166 FU = FrameUtility(line.start_time + syl.start_time, line.start_time + syl.end_time)67 rand = random.uniform(-10, 10)68 69 70 # Starting to iterate over the frames71 for s, e, i, n in FU:72 l.layer = 173 l.start_time = s74 l.end_time = e75 76 if i <= n/2:77 warna = Utils.interpolate(i/(n/2),line.styleref.color3,"&HFFFFFF&")78 else:79 warna = Utils.interpolate((i-(n/2))/(n/2),"&HFFFFFF&",line.styleref.color3)80 81 fsc = 10082 fsc += FU.add(0, syl.duration/3, 20)83 fsc += FU.add(syl.duration/3, syl.duration, -20)84 alpha = 25585 alpha -= FU.add(syl.duration/2, syl.duration, 255)86 alpha = Convert.coloralpha(alpha)87 l.text = "{\\blur1\\3c%s\\an9\\pos(%.3f,%.3f)\\fscx%.3f\\fscy%.3f}%s" % (88 warna, syl.right, syl.top,89 fsc, fsc, syl.text)90 io.write_line(l)91 l.text = "{\\an5\\pos(%.3f,%.3f)\\fscx%.3f\\fscy%.3f\\1c%s\\bord0\\shad0\\blur2\\alpha%s\\clip(%s)\\p1}%s" % (92 syl.center + rand, syl.middle + rand,93 fsc, fsc, line.styleref.color3, alpha, Convert.text_to_clip(syl, an=9, fscx=fsc, fscy=fsc),94 circle)95 io.write_line(l)96 else:97 l.layer = 198 99 if line.actor == "split":100 mulai = syl.start_time101 if mulai <= 2140:102 l.start_time = line.start_time + syl.start_time103 l.end_time = line.start_time + syl.end_time104 l.dur = l.end_time - l.start_time105 106 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)"\107 "\\t(0,%d,0.5,\\3c&HFFFFFF&\\fscx125\\fscy125)"\108 "\\t(%d,%d,1.5,\\fscx100\\fscy100\\1c%s\\3c%s)}%s" % (109 syl.center, syl.middle,110 l.dur/3, l.dur/3, l.dur, line.styleref.color1, line.styleref.color3, syl.text)111 112 io.write_line(l)113 else:114 l.start_time = line.start_time + syl.start_time115 l.end_time = line.start_time + syl.end_time116 l.dur = l.end_time - l.start_time117 118 l.text = "{\\3c&H3E79B1&\\blur1\\an5\\pos(%.3f,%.3f)"\119 "\\t(0,%d,0.5,\\3c&HFFFFFF&\\fscx125\\fscy125)"\120 "\\t(%d,%d,1.5,\\fscx100\\fscy100\\1c%s\\3c&H3E79B1&)}%s" % (121 syl.center, syl.middle,122 l.dur/3, l.dur/3, l.dur, line.styleref.color1, syl.text)123 124 io.write_line(l)125 126 else: 127 l.start_time = line.start_time + syl.start_time128 l.end_time = line.start_time + syl.end_time129 l.dur = l.end_time - l.start_time130 131 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)"\132 "\\t(0,%d,0.5,\\3c&HFFFFFF&\\fscx125\\fscy125)"\133 "\\t(%d,%d,1.5,\\fscx100\\fscy100\\1c%s\\3c%s)}%s" % (134 syl.center, syl.middle,135 l.dur/3, l.dur/3, l.dur, line.styleref.color1, line.styleref.color3, syl.text)136 137 io.write_line(l)138 139 io.write_line(l)140 # Leadout Effect141 l.layer = 0142 if line.actor == "split":143 mulai = syl.start_time144 if mulai <= 2240:145 l.start_time = line.start_time + syl.end_time146 l.end_time = line.start_time + 2240147 l.dur = l.end_time - l.start_time148 149 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)}%s" % (150 syl.center, syl.middle, syl.text)151 io.write_line(l)152 153 ledo = 0 if line.leadout < 300 else 300154 l.start_time = line.start_time + 2240155 l.end_time = line.end_time + ledo156 l.dur = l.end_time - l.start_time157 158 l.text = "{\\3c&H3E79B1&\\blur1\\an5\\pos(%.3f,%.3f)\\fad(0,%d)}%s" % (159 syl.center, syl.middle, ledo, syl.text)160 io.write_line(l)161 162 else:163 ledo = 0 if line.leadout < 300 else 300164 l.start_time = line.start_time + syl.end_time165 l.end_time = line.end_time + ledo166 l.dur = l.end_time - l.start_time167 168 l.text = "{\\3c&H3E79B1&\\blur1\\an5\\pos(%.3f,%.3f)\\fad(0,%d)}%s" % (169 syl.center, syl.middle, ledo, syl.text)170 io.write_line(l)171 else:172 ledo = 0 if line.leadout < 300 else 300173 l.start_time = line.start_time + syl.end_time174 l.end_time = line.end_time + ledo175 l.dur = l.end_time - l.start_time176 177 l.text = "{\\blur1\\an5\\pos(%.3f,%.3f)\\fad(0,%d)}%s" % (178 syl.center, syl.middle, ledo, syl.text)179 io.write_line(l)180def sub(line, l):181 # Translation Effect182 183 l.start_time = line.start_time - 300184 l.end_time = line.start_time185 l.text = "{\\blur1\\fscx5\\bord1.5\\an6\\pos(%.3f,%.3f)\\c&HFFFFFF&\\t(0,300,\\fscx100)\\p1}%s" % (186 line.right, line.bottom+5,Shape.rectangle(line.width,2))187 188 io.write_line(l)189 190 l.start_time = line.start_time191 l.end_time = line.start_time + 300192 l.text = "{\\blur1\\fscx100\\bord1.5\\an4\\pos(%.3f,%.3f)\\c&HFFFFFF&\\t(0,300,\\fscx5)\\p1}%s" % (193 line.left, line.bottom+5,Shape.rectangle(line.width,2))194 io.write_line(l)195 196 l.layer = 2197 if line.actor == "split":198 ledi1 = 0 if line.leadin < 300 else 300199 200 l.start_time = line.start_time - ledi1201 l.end_time = line.start_time + 2240202 l.dur = l.end_time - l.start_time203 l.text = "{\pos(%.3f,%.3f)\\blur1\\fad(%d,0)}%s" % (204 line.center, line.bottom, ledi1, line.text)205 io.write_line(l)206 207 ledo1 = 0 if line.leadout < 300 else 300208 209 l.start_time = line.start_time + 2240210 l.end_time = line.end_time + ledo1211 l.dur = l.end_time - l.start_time212 l.text = "{\\3c&H3E79B1&\pos(%.3f,%.3f)\\blur1\\fad(0,%d)}%s" % (213 line.center, line.bottom, ledo1, line.text)214 io.write_line(l)215 216 else:217 ledi2 = 0 if line.leadin < 300 else 300218 ledo2 = 0 if line.leadout < 300 else 300219 220 l.start_time = line.start_time - ledi2221 l.end_time = line.end_time + ledo2222 l.dur = l.end_time - l.start_time223 if line.style == "OP2-kanan - TL":224 225 l.text = "{\pos(%.3f,%.3f)\\blur1\\fad(%d,%d)}%s" % (226 line.right, line.bottom, ledi2, ledo2, line.text)227 io.write_line(l)228 229 else:230 l.text = "{\pos(%.3f,%.3f)\\blur1\\fad(%d,%d)}%s" % (231 line.center, line.bottom, ledi2, ledo2, line.text)232 io.write_line(l)233 234# Generating lines235for line in lines:236 if line.styleref.alignment >= 7:237 romaji(line, line.copy())238 else:239 sub(line, line.copy())240io.save()...

Full Screen

Full Screen

deterministic_performance_counters.js

Source:deterministic_performance_counters.js Github

copy

Full Screen

1// Copyright 2015 The Chromium Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4// Monkey patch performance to get deterministic results.5(function () {6 // Web page replay patches Data.now().7 var start_time = Date.now();8 var now_counter = 0;9 function now() {10 return now_counter++;11 }12 function timing() {13 // These values are arbitrary.14 // They are obtained by sampling "performance.now()" on a live web site.15 return {16 "navigationStart": start_time,17 "unloadEventStart": 0,18 "unloadEventEnd": 0,19 "redirectStart": 0,20 "redirectEnd": 0,21 "fetchStart": start_time + 94,22 "domainLookupStart": start_time + 94,23 "domainLookupEnd": start_time + 94,24 "connectStart": start_time + 94,25 "connectEnd": start_time + 94,26 "secureConnectionStart":0,27 "requestStart": start_time + 98,28 "responseStart": start_time + 546,29 "responseEnd": start_time + 1511,30 "domLoading": start_time + 562,31 "domInteractive": start_time + 1647,32 "domContentLoadedEventStart": start_time + 1647,33 "domContentLoadedEventEnd": start_time + 1654,34 "domComplete": start_time + 2009,35 "loadEventStart": start_time + 2009,36 "loadEventEnd": start_time + 200937 };38 }39 Object.defineProperty(window, "performance", {40 get : function() {41 return { 'now' : now, 'timing' : timing() };42 }43 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var test = wpt('www.webpagetest.org');3 if (err) {4 console.log(err);5 } else {6 test.startTest(data.data.testId, function(err, data) {7 if (err) {8 console.log(err);9 } else {10 console.log(data);11 }12 });13 }14});15var wpt = require('webpagetest');16var test = wpt('www.webpagetest.org');17 if (err) {18 console.log(err);19 } else {20 test.stopTest(data.data.testId, function(err, data) {21 if (err) {22 console.log(err);23 } else {24 console.log(data);25 }26 });27 }28});29var wpt = require('webpagetest');30var test = wpt('www.webpagetest.org');31test.getLocations(function(err, data) {32 if (err) {33 console.log(err);34 } else {35 console.log(data);36 }37});38var wpt = require('webpagetest');39var test = wpt('www.webpagetest.org');40test.getStatus(function(err, data) {41 if (err) {42 console.log(err);43 } else {44 console.log(data);45 }46});47var wpt = require('webpagetest');48var test = wpt('www.webpagetest.org');49test.getTestResults('160718_4S_8a4e1d4f7b1f3b8a8a3a3d3c9a6a3e8f', function(err, data) {50 if (err) {51 console.log(err);52 } else {53 console.log(data);54 }55});

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var wptModule = new wpt('API_KEY');3}, function(err, data) {4 if (err) {5 console.log('Error: ' + err);6 } else {7 console.log('Test ID: ' + data.data.testId);8 console.log('Test Status Text: ' + data.statusText);9 console.log('Test Status: ' + data.statusCode);10 var testId = data.data.testId;11 wptModule.getTestResults(testId, function(err, data) {12 if (err) {13 console.log('Error: ' + err);14 } else {15 console.log('Test Status Text: ' + data.statusText);16 console.log('Test Status: ' + data.statusCode);17 console.log('Test Results: ' + JSON.stringify(data.data));18 }19 });20 }21});

Full Screen

Using AI Code Generation

copy

Full Screen

1 console.log(data);2});3 console.log(data);4});5 console.log(data);6});7 console.log(data);8});9wpt.get_test_locations( function(data) {10 console.log(data);11});12wpt.get_testers( function(data) {13 console.log(data);14});15wpt.get_testers_by_location( "Dulles_MotoG4", function(data) {16 console.log(data);17});18 console.log(data);19});20 console.log(data);21});22 console.log(data);23});24 console.log(data);25});26 console.log(data);27});

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('./wpt');2var wpt_test = new wpt();3wpt_test.start_time();4function wpt() {5 this.start_time = function() {6 console.log("start_time method called");7 }8}9module.exports = wpt;10var wpt = require('./wpt');11var wpt_test = new wpt();12wpt_test.start_time();13function wpt() {14 this.start_time = function() {15 console.log("start_time method called");16 }17}18module.exports = wpt;19var wpt = require('./wpt');20var wpt_test = new wpt();21wpt_test.start_time();22function wpt() {

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org');3 if (err) {4 console.log(err);5 } else {6 console.log(data);7 }8});9### start_test(url, callback)10### get_test_status(test_id, callback)11### get_test_results(test_id, callback)12### get_test_result_by_location(test_id, location, callback)13### get_test_video(test_id, callback)14### get_test_video_by_location(test_id, location, callback)

Full Screen

Using AI Code Generation

copy

Full Screen

1var Wpt = require('wpt-api');2var wpt = new Wpt('your WPT API key');3var params = {4 videoParams: {5 }6};7wpt.start_test(url, params, function(err, data) {8 if (err) return console.error(err);9 console.log(data);10});11### wpt.start_test(url, params, callback)12### wpt.get_test_results(testId, callback)13### wpt.get_test_status(testId, callback)14### wpt.get_test_locations(callback)15### wpt.get_test_location(location, callback)16### wpt.get_test_location_browsers(location, callback)17### wpt.get_test_location_connectivity(location, callback)

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var wpt = new WebPageTest('www.webpagetest.org', 'A.2b0e1f2c2e9d6d9e9f8f8c8e8b8d8f8f');3 console.log(data);4});5var wpt = require('wpt');6var wpt = new WebPageTest('www.webpagetest.org', 'A.2b0e1f2c2e9d6d9e9f8f8c8e8b8d8f8f');7 console.log(data);8});9var wpt = require('wpt');10var wpt = new WebPageTest('www.webpagetest.org', 'A.2b0e1f2c2e9d

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful