Soham Waghmare commited on
Commit
15b6036
·
1 Parent(s): afce8a8

feat: integrate crawl4ai minimal scraping

Browse files
KnowledgeNet.excalidraw CHANGED
@@ -61,7 +61,7 @@
61
  "version": 60,
62
  "versionNonce": 2063710854,
63
  "isDeleted": false,
64
- "boundElements": null,
65
  "updated": 1739538321355,
66
  "link": null,
67
  "locked": false,
@@ -133,7 +133,7 @@
133
  "version": 101,
134
  "versionNonce": 1503521498,
135
  "isDeleted": false,
136
- "boundElements": null,
137
  "updated": 1739537553516,
138
  "link": null,
139
  "locked": false,
@@ -205,7 +205,7 @@
205
  "version": 56,
206
  "versionNonce": 960622810,
207
  "isDeleted": false,
208
- "boundElements": null,
209
  "updated": 1739537557092,
210
  "link": null,
211
  "locked": false,
@@ -277,7 +277,7 @@
277
  "version": 58,
278
  "versionNonce": 1342174938,
279
  "isDeleted": false,
280
- "boundElements": null,
281
  "updated": 1739537560333,
282
  "link": null,
283
  "locked": false,
@@ -349,7 +349,7 @@
349
  "version": 157,
350
  "versionNonce": 1805741338,
351
  "isDeleted": false,
352
- "boundElements": null,
353
  "updated": 1739537563288,
354
  "link": null,
355
  "locked": false,
@@ -421,7 +421,7 @@
421
  "version": 145,
422
  "versionNonce": 450080006,
423
  "isDeleted": false,
424
- "boundElements": null,
425
  "updated": 1739537567649,
426
  "link": null,
427
  "locked": false,
@@ -493,7 +493,7 @@
493
  "version": 107,
494
  "versionNonce": 571622086,
495
  "isDeleted": false,
496
- "boundElements": null,
497
  "updated": 1739537570841,
498
  "link": null,
499
  "locked": false,
@@ -565,7 +565,7 @@
565
  "version": 96,
566
  "versionNonce": 124498054,
567
  "isDeleted": false,
568
- "boundElements": null,
569
  "updated": 1739537572672,
570
  "link": null,
571
  "locked": false,
@@ -637,7 +637,7 @@
637
  "version": 157,
638
  "versionNonce": 1980437510,
639
  "isDeleted": false,
640
- "boundElements": null,
641
  "updated": 1739537575521,
642
  "link": null,
643
  "locked": false,
@@ -709,7 +709,7 @@
709
  "version": 150,
710
  "versionNonce": 1705965126,
711
  "isDeleted": false,
712
- "boundElements": null,
713
  "updated": 1739537574051,
714
  "link": null,
715
  "locked": false,
@@ -748,7 +748,7 @@
748
  "version": 42,
749
  "versionNonce": 265632730,
750
  "isDeleted": false,
751
- "boundElements": null,
752
  "updated": 1739537519157,
753
  "link": null,
754
  "locked": false,
@@ -793,7 +793,7 @@
793
  "version": 21,
794
  "versionNonce": 64949894,
795
  "isDeleted": false,
796
- "boundElements": null,
797
  "updated": 1739537526786,
798
  "link": null,
799
  "locked": false,
@@ -838,7 +838,7 @@
838
  "version": 34,
839
  "versionNonce": 2054674694,
840
  "isDeleted": false,
841
- "boundElements": null,
842
  "updated": 1739537529413,
843
  "link": null,
844
  "locked": false,
@@ -883,7 +883,7 @@
883
  "version": 36,
884
  "versionNonce": 1199350470,
885
  "isDeleted": false,
886
- "boundElements": null,
887
  "updated": 1739537532066,
888
  "link": null,
889
  "locked": false,
@@ -928,7 +928,7 @@
928
  "version": 44,
929
  "versionNonce": 611045766,
930
  "isDeleted": false,
931
- "boundElements": null,
932
  "updated": 1739537534175,
933
  "link": null,
934
  "locked": false,
@@ -973,7 +973,7 @@
973
  "version": 27,
974
  "versionNonce": 298077274,
975
  "isDeleted": false,
976
- "boundElements": null,
977
  "updated": 1739537537710,
978
  "link": null,
979
  "locked": false,
@@ -1018,7 +1018,7 @@
1018
  "version": 38,
1019
  "versionNonce": 283073370,
1020
  "isDeleted": false,
1021
- "boundElements": null,
1022
  "updated": 1739537540055,
1023
  "link": null,
1024
  "locked": false,
@@ -1063,7 +1063,7 @@
1063
  "version": 21,
1064
  "versionNonce": 317257478,
1065
  "isDeleted": false,
1066
- "boundElements": null,
1067
  "updated": 1739537542564,
1068
  "link": null,
1069
  "locked": false,
@@ -1108,7 +1108,7 @@
1108
  "version": 38,
1109
  "versionNonce": 127825926,
1110
  "isDeleted": false,
1111
- "boundElements": null,
1112
  "updated": 1739537546366,
1113
  "link": null,
1114
  "locked": false,
@@ -1181,7 +1181,7 @@
1181
  "version": 119,
1182
  "versionNonce": 739599898,
1183
  "isDeleted": false,
1184
- "boundElements": null,
1185
  "updated": 1739538303937,
1186
  "link": null,
1187
  "locked": false,
@@ -1218,7 +1218,7 @@
1218
  "version": 127,
1219
  "versionNonce": 1861618694,
1220
  "isDeleted": false,
1221
- "boundElements": null,
1222
  "updated": 1739537782011,
1223
  "link": null,
1224
  "locked": false,
@@ -1255,7 +1255,7 @@
1255
  "version": 398,
1256
  "versionNonce": 1443434394,
1257
  "isDeleted": false,
1258
- "boundElements": null,
1259
  "updated": 1739538192561,
1260
  "link": null,
1261
  "locked": false,
@@ -1292,7 +1292,7 @@
1292
  "version": 103,
1293
  "versionNonce": 1159505434,
1294
  "isDeleted": false,
1295
- "boundElements": null,
1296
  "updated": 1739537819817,
1297
  "link": null,
1298
  "locked": false,
@@ -1708,10 +1708,7 @@
1708
  ],
1709
  "pressures": [],
1710
  "simulatePressure": true,
1711
- "lastCommittedPoint": [
1712
- -233.33333333333326,
1713
- 248.8888888888889
1714
- ]
1715
  },
1716
  {
1717
  "id": "t4Ew6OmfRjlv-IrXttgwy",
@@ -1736,7 +1733,7 @@
1736
  "version": 155,
1737
  "versionNonce": 100080986,
1738
  "isDeleted": false,
1739
- "boundElements": null,
1740
  "updated": 1739537824380,
1741
  "link": null,
1742
  "locked": false,
@@ -2360,10 +2357,7 @@
2360
  ],
2361
  "pressures": [],
2362
  "simulatePressure": true,
2363
- "lastCommittedPoint": [
2364
- 268.8888888888889,
2365
- 254.44444444444446
2366
- ]
2367
  },
2368
  {
2369
  "id": "Gn3iZnPEkbd0IVHe9uadw",
@@ -2423,7 +2417,7 @@
2423
  "version": 654,
2424
  "versionNonce": 1119377434,
2425
  "isDeleted": false,
2426
- "boundElements": null,
2427
  "updated": 1739538353230,
2428
  "link": null,
2429
  "locked": false,
@@ -2495,7 +2489,7 @@
2495
  "version": 749,
2496
  "versionNonce": 1582730566,
2497
  "isDeleted": false,
2498
- "boundElements": null,
2499
  "updated": 1739538451203,
2500
  "link": null,
2501
  "locked": false,
@@ -2567,7 +2561,7 @@
2567
  "version": 739,
2568
  "versionNonce": 113663258,
2569
  "isDeleted": false,
2570
- "boundElements": null,
2571
  "updated": 1739538370330,
2572
  "link": null,
2573
  "locked": false,
@@ -2606,7 +2600,7 @@
2606
  "version": 51,
2607
  "versionNonce": 1706697306,
2608
  "isDeleted": false,
2609
- "boundElements": null,
2610
  "updated": 1739538459844,
2611
  "link": null,
2612
  "locked": false,
@@ -2651,7 +2645,7 @@
2651
  "version": 50,
2652
  "versionNonce": 9692634,
2653
  "isDeleted": false,
2654
- "boundElements": null,
2655
  "updated": 1739538463792,
2656
  "link": null,
2657
  "locked": false,
@@ -2733,7 +2727,7 @@
2733
  "version": 49,
2734
  "versionNonce": 229489818,
2735
  "isDeleted": false,
2736
- "boundElements": null,
2737
  "updated": 1739538592520,
2738
  "link": null,
2739
  "locked": false,
@@ -2811,7 +2805,7 @@
2811
  "version": 41,
2812
  "versionNonce": 1349422662,
2813
  "isDeleted": false,
2814
- "boundElements": null,
2815
  "updated": 1739538533192,
2816
  "link": null,
2817
  "locked": false,
@@ -2854,7 +2848,7 @@
2854
  "version": 95,
2855
  "versionNonce": 1720426138,
2856
  "isDeleted": false,
2857
- "boundElements": null,
2858
  "updated": 1739538551535,
2859
  "link": null,
2860
  "locked": false,
@@ -2952,7 +2946,7 @@
2952
  "version": 8,
2953
  "versionNonce": 1895567578,
2954
  "isDeleted": false,
2955
- "boundElements": null,
2956
  "updated": 1739538600442,
2957
  "link": null,
2958
  "locked": false,
@@ -3050,7 +3044,7 @@
3050
  "version": 22,
3051
  "versionNonce": 2129460422,
3052
  "isDeleted": false,
3053
- "boundElements": null,
3054
  "updated": 1739538667001,
3055
  "link": null,
3056
  "locked": false,
@@ -3148,7 +3142,7 @@
3148
  "version": 21,
3149
  "versionNonce": 893675162,
3150
  "isDeleted": false,
3151
- "boundElements": null,
3152
  "updated": 1739538657292,
3153
  "link": null,
3154
  "locked": false,
@@ -3236,7 +3230,7 @@
3236
  "version": 30,
3237
  "versionNonce": 998965786,
3238
  "isDeleted": false,
3239
- "boundElements": null,
3240
  "updated": 1739538673593,
3241
  "link": null,
3242
  "locked": false,
@@ -3324,7 +3318,7 @@
3324
  "version": 22,
3325
  "versionNonce": 1350240282,
3326
  "isDeleted": false,
3327
- "boundElements": null,
3328
  "updated": 1739538657292,
3329
  "link": null,
3330
  "locked": false,
@@ -3412,7 +3406,7 @@
3412
  "version": 23,
3413
  "versionNonce": 579971078,
3414
  "isDeleted": false,
3415
- "boundElements": null,
3416
  "updated": 1739538678699,
3417
  "link": null,
3418
  "locked": false,
@@ -3500,7 +3494,7 @@
3500
  "version": 21,
3501
  "versionNonce": 388498330,
3502
  "isDeleted": false,
3503
- "boundElements": null,
3504
  "updated": 1739538657291,
3505
  "link": null,
3506
  "locked": false,
@@ -3588,7 +3582,7 @@
3588
  "version": 26,
3589
  "versionNonce": 1636923354,
3590
  "isDeleted": false,
3591
- "boundElements": null,
3592
  "updated": 1739538682931,
3593
  "link": null,
3594
  "locked": false,
@@ -3676,7 +3670,7 @@
3676
  "version": 22,
3677
  "versionNonce": 970679578,
3678
  "isDeleted": false,
3679
- "boundElements": null,
3680
  "updated": 1739538657291,
3681
  "link": null,
3682
  "locked": false,
@@ -3774,7 +3768,7 @@
3774
  "version": 23,
3775
  "versionNonce": 236577434,
3776
  "isDeleted": false,
3777
- "boundElements": null,
3778
  "updated": 1739538715248,
3779
  "link": null,
3780
  "locked": false,
@@ -3811,7 +3805,7 @@
3811
  "version": 81,
3812
  "versionNonce": 379945370,
3813
  "isDeleted": false,
3814
- "boundElements": null,
3815
  "updated": 1739538738880,
3816
  "link": null,
3817
  "locked": false,
@@ -3848,7 +3842,7 @@
3848
  "version": 26,
3849
  "versionNonce": 635381574,
3850
  "isDeleted": false,
3851
- "boundElements": null,
3852
  "updated": 1739538757687,
3853
  "link": null,
3854
  "locked": false,
@@ -3885,7 +3879,7 @@
3885
  "version": 29,
3886
  "versionNonce": 843222854,
3887
  "isDeleted": false,
3888
- "boundElements": null,
3889
  "updated": 1739538763503,
3890
  "link": null,
3891
  "locked": false,
@@ -3922,7 +3916,7 @@
3922
  "version": 72,
3923
  "versionNonce": 2104305498,
3924
  "isDeleted": false,
3925
- "boundElements": null,
3926
  "updated": 1739538838299,
3927
  "link": null,
3928
  "locked": false,
@@ -3959,7 +3953,7 @@
3959
  "version": 77,
3960
  "versionNonce": 71886874,
3961
  "isDeleted": false,
3962
- "boundElements": null,
3963
  "updated": 1739538926145,
3964
  "link": null,
3965
  "locked": false,
@@ -3974,7 +3968,7 @@
3974
  "lineHeight": 1.25
3975
  },
3976
  {
3977
- "id": "QwQpbmMZYUJCdK5IFIkvr",
3978
  "type": "text",
3979
  "x": 642.7474993968266,
3980
  "y": -357.5833329999999,
@@ -3992,12 +3986,12 @@
3992
  "frameId": null,
3993
  "index": "b0H",
3994
  "roundness": null,
3995
- "seed": 925609498,
3996
- "version": 90,
3997
- "versionNonce": 1148974406,
3998
  "isDeleted": false,
3999
  "boundElements": null,
4000
- "updated": 1739538963603,
4001
  "link": null,
4002
  "locked": false,
4003
  "text": "KnowledgeNet Architecture",
@@ -4009,6 +4003,948 @@
4009
  "originalText": "KnowledgeNet Architecture",
4010
  "autoResize": true,
4011
  "lineHeight": 1.25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4012
  }
4013
  ],
4014
  "appState": {
 
61
  "version": 60,
62
  "versionNonce": 2063710854,
63
  "isDeleted": false,
64
+ "boundElements": [],
65
  "updated": 1739538321355,
66
  "link": null,
67
  "locked": false,
 
133
  "version": 101,
134
  "versionNonce": 1503521498,
135
  "isDeleted": false,
136
+ "boundElements": [],
137
  "updated": 1739537553516,
138
  "link": null,
139
  "locked": false,
 
205
  "version": 56,
206
  "versionNonce": 960622810,
207
  "isDeleted": false,
208
+ "boundElements": [],
209
  "updated": 1739537557092,
210
  "link": null,
211
  "locked": false,
 
277
  "version": 58,
278
  "versionNonce": 1342174938,
279
  "isDeleted": false,
280
+ "boundElements": [],
281
  "updated": 1739537560333,
282
  "link": null,
283
  "locked": false,
 
349
  "version": 157,
350
  "versionNonce": 1805741338,
351
  "isDeleted": false,
352
+ "boundElements": [],
353
  "updated": 1739537563288,
354
  "link": null,
355
  "locked": false,
 
421
  "version": 145,
422
  "versionNonce": 450080006,
423
  "isDeleted": false,
424
+ "boundElements": [],
425
  "updated": 1739537567649,
426
  "link": null,
427
  "locked": false,
 
493
  "version": 107,
494
  "versionNonce": 571622086,
495
  "isDeleted": false,
496
+ "boundElements": [],
497
  "updated": 1739537570841,
498
  "link": null,
499
  "locked": false,
 
565
  "version": 96,
566
  "versionNonce": 124498054,
567
  "isDeleted": false,
568
+ "boundElements": [],
569
  "updated": 1739537572672,
570
  "link": null,
571
  "locked": false,
 
637
  "version": 157,
638
  "versionNonce": 1980437510,
639
  "isDeleted": false,
640
+ "boundElements": [],
641
  "updated": 1739537575521,
642
  "link": null,
643
  "locked": false,
 
709
  "version": 150,
710
  "versionNonce": 1705965126,
711
  "isDeleted": false,
712
+ "boundElements": [],
713
  "updated": 1739537574051,
714
  "link": null,
715
  "locked": false,
 
748
  "version": 42,
749
  "versionNonce": 265632730,
750
  "isDeleted": false,
751
+ "boundElements": [],
752
  "updated": 1739537519157,
753
  "link": null,
754
  "locked": false,
 
793
  "version": 21,
794
  "versionNonce": 64949894,
795
  "isDeleted": false,
796
+ "boundElements": [],
797
  "updated": 1739537526786,
798
  "link": null,
799
  "locked": false,
 
838
  "version": 34,
839
  "versionNonce": 2054674694,
840
  "isDeleted": false,
841
+ "boundElements": [],
842
  "updated": 1739537529413,
843
  "link": null,
844
  "locked": false,
 
883
  "version": 36,
884
  "versionNonce": 1199350470,
885
  "isDeleted": false,
886
+ "boundElements": [],
887
  "updated": 1739537532066,
888
  "link": null,
889
  "locked": false,
 
928
  "version": 44,
929
  "versionNonce": 611045766,
930
  "isDeleted": false,
931
+ "boundElements": [],
932
  "updated": 1739537534175,
933
  "link": null,
934
  "locked": false,
 
973
  "version": 27,
974
  "versionNonce": 298077274,
975
  "isDeleted": false,
976
+ "boundElements": [],
977
  "updated": 1739537537710,
978
  "link": null,
979
  "locked": false,
 
1018
  "version": 38,
1019
  "versionNonce": 283073370,
1020
  "isDeleted": false,
1021
+ "boundElements": [],
1022
  "updated": 1739537540055,
1023
  "link": null,
1024
  "locked": false,
 
1063
  "version": 21,
1064
  "versionNonce": 317257478,
1065
  "isDeleted": false,
1066
+ "boundElements": [],
1067
  "updated": 1739537542564,
1068
  "link": null,
1069
  "locked": false,
 
1108
  "version": 38,
1109
  "versionNonce": 127825926,
1110
  "isDeleted": false,
1111
+ "boundElements": [],
1112
  "updated": 1739537546366,
1113
  "link": null,
1114
  "locked": false,
 
1181
  "version": 119,
1182
  "versionNonce": 739599898,
1183
  "isDeleted": false,
1184
+ "boundElements": [],
1185
  "updated": 1739538303937,
1186
  "link": null,
1187
  "locked": false,
 
1218
  "version": 127,
1219
  "versionNonce": 1861618694,
1220
  "isDeleted": false,
1221
+ "boundElements": [],
1222
  "updated": 1739537782011,
1223
  "link": null,
1224
  "locked": false,
 
1255
  "version": 398,
1256
  "versionNonce": 1443434394,
1257
  "isDeleted": false,
1258
+ "boundElements": [],
1259
  "updated": 1739538192561,
1260
  "link": null,
1261
  "locked": false,
 
1292
  "version": 103,
1293
  "versionNonce": 1159505434,
1294
  "isDeleted": false,
1295
+ "boundElements": [],
1296
  "updated": 1739537819817,
1297
  "link": null,
1298
  "locked": false,
 
1708
  ],
1709
  "pressures": [],
1710
  "simulatePressure": true,
1711
+ "lastCommittedPoint": null
 
 
 
1712
  },
1713
  {
1714
  "id": "t4Ew6OmfRjlv-IrXttgwy",
 
1733
  "version": 155,
1734
  "versionNonce": 100080986,
1735
  "isDeleted": false,
1736
+ "boundElements": [],
1737
  "updated": 1739537824380,
1738
  "link": null,
1739
  "locked": false,
 
2357
  ],
2358
  "pressures": [],
2359
  "simulatePressure": true,
2360
+ "lastCommittedPoint": null
 
 
 
2361
  },
2362
  {
2363
  "id": "Gn3iZnPEkbd0IVHe9uadw",
 
2417
  "version": 654,
2418
  "versionNonce": 1119377434,
2419
  "isDeleted": false,
2420
+ "boundElements": [],
2421
  "updated": 1739538353230,
2422
  "link": null,
2423
  "locked": false,
 
2489
  "version": 749,
2490
  "versionNonce": 1582730566,
2491
  "isDeleted": false,
2492
+ "boundElements": [],
2493
  "updated": 1739538451203,
2494
  "link": null,
2495
  "locked": false,
 
2561
  "version": 739,
2562
  "versionNonce": 113663258,
2563
  "isDeleted": false,
2564
+ "boundElements": [],
2565
  "updated": 1739538370330,
2566
  "link": null,
2567
  "locked": false,
 
2600
  "version": 51,
2601
  "versionNonce": 1706697306,
2602
  "isDeleted": false,
2603
+ "boundElements": [],
2604
  "updated": 1739538459844,
2605
  "link": null,
2606
  "locked": false,
 
2645
  "version": 50,
2646
  "versionNonce": 9692634,
2647
  "isDeleted": false,
2648
+ "boundElements": [],
2649
  "updated": 1739538463792,
2650
  "link": null,
2651
  "locked": false,
 
2727
  "version": 49,
2728
  "versionNonce": 229489818,
2729
  "isDeleted": false,
2730
+ "boundElements": [],
2731
  "updated": 1739538592520,
2732
  "link": null,
2733
  "locked": false,
 
2805
  "version": 41,
2806
  "versionNonce": 1349422662,
2807
  "isDeleted": false,
2808
+ "boundElements": [],
2809
  "updated": 1739538533192,
2810
  "link": null,
2811
  "locked": false,
 
2848
  "version": 95,
2849
  "versionNonce": 1720426138,
2850
  "isDeleted": false,
2851
+ "boundElements": [],
2852
  "updated": 1739538551535,
2853
  "link": null,
2854
  "locked": false,
 
2946
  "version": 8,
2947
  "versionNonce": 1895567578,
2948
  "isDeleted": false,
2949
+ "boundElements": [],
2950
  "updated": 1739538600442,
2951
  "link": null,
2952
  "locked": false,
 
3044
  "version": 22,
3045
  "versionNonce": 2129460422,
3046
  "isDeleted": false,
3047
+ "boundElements": [],
3048
  "updated": 1739538667001,
3049
  "link": null,
3050
  "locked": false,
 
3142
  "version": 21,
3143
  "versionNonce": 893675162,
3144
  "isDeleted": false,
3145
+ "boundElements": [],
3146
  "updated": 1739538657292,
3147
  "link": null,
3148
  "locked": false,
 
3230
  "version": 30,
3231
  "versionNonce": 998965786,
3232
  "isDeleted": false,
3233
+ "boundElements": [],
3234
  "updated": 1739538673593,
3235
  "link": null,
3236
  "locked": false,
 
3318
  "version": 22,
3319
  "versionNonce": 1350240282,
3320
  "isDeleted": false,
3321
+ "boundElements": [],
3322
  "updated": 1739538657292,
3323
  "link": null,
3324
  "locked": false,
 
3406
  "version": 23,
3407
  "versionNonce": 579971078,
3408
  "isDeleted": false,
3409
+ "boundElements": [],
3410
  "updated": 1739538678699,
3411
  "link": null,
3412
  "locked": false,
 
3494
  "version": 21,
3495
  "versionNonce": 388498330,
3496
  "isDeleted": false,
3497
+ "boundElements": [],
3498
  "updated": 1739538657291,
3499
  "link": null,
3500
  "locked": false,
 
3582
  "version": 26,
3583
  "versionNonce": 1636923354,
3584
  "isDeleted": false,
3585
+ "boundElements": [],
3586
  "updated": 1739538682931,
3587
  "link": null,
3588
  "locked": false,
 
3670
  "version": 22,
3671
  "versionNonce": 970679578,
3672
  "isDeleted": false,
3673
+ "boundElements": [],
3674
  "updated": 1739538657291,
3675
  "link": null,
3676
  "locked": false,
 
3768
  "version": 23,
3769
  "versionNonce": 236577434,
3770
  "isDeleted": false,
3771
+ "boundElements": [],
3772
  "updated": 1739538715248,
3773
  "link": null,
3774
  "locked": false,
 
3805
  "version": 81,
3806
  "versionNonce": 379945370,
3807
  "isDeleted": false,
3808
+ "boundElements": [],
3809
  "updated": 1739538738880,
3810
  "link": null,
3811
  "locked": false,
 
3842
  "version": 26,
3843
  "versionNonce": 635381574,
3844
  "isDeleted": false,
3845
+ "boundElements": [],
3846
  "updated": 1739538757687,
3847
  "link": null,
3848
  "locked": false,
 
3879
  "version": 29,
3880
  "versionNonce": 843222854,
3881
  "isDeleted": false,
3882
+ "boundElements": [],
3883
  "updated": 1739538763503,
3884
  "link": null,
3885
  "locked": false,
 
3916
  "version": 72,
3917
  "versionNonce": 2104305498,
3918
  "isDeleted": false,
3919
+ "boundElements": [],
3920
  "updated": 1739538838299,
3921
  "link": null,
3922
  "locked": false,
 
3953
  "version": 77,
3954
  "versionNonce": 71886874,
3955
  "isDeleted": false,
3956
+ "boundElements": [],
3957
  "updated": 1739538926145,
3958
  "link": null,
3959
  "locked": false,
 
3968
  "lineHeight": 1.25
3969
  },
3970
  {
3971
+ "id": "eHxgrnVlpDqEATTqQ73Nn",
3972
  "type": "text",
3973
  "x": 642.7474993968266,
3974
  "y": -357.5833329999999,
 
3986
  "frameId": null,
3987
  "index": "b0H",
3988
  "roundness": null,
3989
+ "seed": 806727487,
3990
+ "version": 92,
3991
+ "versionNonce": 1221535793,
3992
  "isDeleted": false,
3993
  "boundElements": null,
3994
+ "updated": 1740410117898,
3995
  "link": null,
3996
  "locked": false,
3997
  "text": "KnowledgeNet Architecture",
 
4003
  "originalText": "KnowledgeNet Architecture",
4004
  "autoResize": true,
4005
  "lineHeight": 1.25
4006
+ },
4007
+ {
4008
+ "id": "QwQpbmMZYUJCdK5IFIkvr",
4009
+ "type": "text",
4010
+ "x": 3952.7474993968267,
4011
+ "y": -357.5833329999999,
4012
+ "width": 727.5238647460938,
4013
+ "height": 105,
4014
+ "angle": 0,
4015
+ "strokeColor": "#1e1e1e",
4016
+ "backgroundColor": "transparent",
4017
+ "fillStyle": "solid",
4018
+ "strokeWidth": 2,
4019
+ "strokeStyle": "solid",
4020
+ "roughness": 1,
4021
+ "opacity": 100,
4022
+ "groupIds": [],
4023
+ "frameId": null,
4024
+ "index": "b0I",
4025
+ "roundness": null,
4026
+ "seed": 925609498,
4027
+ "version": 342,
4028
+ "versionNonce": 71133361,
4029
+ "isDeleted": false,
4030
+ "boundElements": [],
4031
+ "updated": 1740410131106,
4032
+ "link": null,
4033
+ "locked": false,
4034
+ "text": "Use Case Diagram",
4035
+ "fontSize": 84,
4036
+ "fontFamily": 5,
4037
+ "textAlign": "left",
4038
+ "verticalAlign": "top",
4039
+ "containerId": null,
4040
+ "originalText": "Use Case Diagram",
4041
+ "autoResize": true,
4042
+ "lineHeight": 1.25
4043
+ },
4044
+ {
4045
+ "id": "UqgtNDj-QSolcKLdUoFuI",
4046
+ "type": "ellipse",
4047
+ "x": 3055.4500204285705,
4048
+ "y": 128.9583334999993,
4049
+ "width": 320,
4050
+ "height": 320,
4051
+ "angle": 0,
4052
+ "strokeColor": "#1e1e1e",
4053
+ "backgroundColor": "transparent",
4054
+ "fillStyle": "solid",
4055
+ "strokeWidth": 2,
4056
+ "strokeStyle": "solid",
4057
+ "roughness": 1,
4058
+ "opacity": 100,
4059
+ "groupIds": [],
4060
+ "frameId": null,
4061
+ "index": "b0K",
4062
+ "roundness": {
4063
+ "type": 2
4064
+ },
4065
+ "seed": 84940561,
4066
+ "version": 215,
4067
+ "versionNonce": 61710591,
4068
+ "isDeleted": false,
4069
+ "boundElements": [
4070
+ {
4071
+ "type": "text",
4072
+ "id": "y3mNSw6A9j36OmrJxugME"
4073
+ },
4074
+ {
4075
+ "id": "z6uZ8eAdNE5q32B_AWP_q",
4076
+ "type": "arrow"
4077
+ },
4078
+ {
4079
+ "id": "noIDQnwonwLC3EFVh-55v",
4080
+ "type": "arrow"
4081
+ },
4082
+ {
4083
+ "id": "6MqqNfBCCwzRYYSiqIIW7",
4084
+ "type": "arrow"
4085
+ }
4086
+ ],
4087
+ "updated": 1740410351698,
4088
+ "link": null,
4089
+ "locked": false
4090
+ },
4091
+ {
4092
+ "id": "y3mNSw6A9j36OmrJxugME",
4093
+ "type": "text",
4094
+ "x": 3151.6439443498557,
4095
+ "y": 253.1962485101517,
4096
+ "width": 127.33798217773438,
4097
+ "height": 71.25,
4098
+ "angle": 0,
4099
+ "strokeColor": "#1e1e1e",
4100
+ "backgroundColor": "transparent",
4101
+ "fillStyle": "solid",
4102
+ "strokeWidth": 2,
4103
+ "strokeStyle": "solid",
4104
+ "roughness": 1,
4105
+ "opacity": 100,
4106
+ "groupIds": [],
4107
+ "frameId": null,
4108
+ "index": "b0KV",
4109
+ "roundness": null,
4110
+ "seed": 335972959,
4111
+ "version": 166,
4112
+ "versionNonce": 854836337,
4113
+ "isDeleted": false,
4114
+ "boundElements": null,
4115
+ "updated": 1740410330502,
4116
+ "link": null,
4117
+ "locked": false,
4118
+ "text": "User",
4119
+ "fontSize": 57,
4120
+ "fontFamily": 1,
4121
+ "textAlign": "center",
4122
+ "verticalAlign": "middle",
4123
+ "containerId": "UqgtNDj-QSolcKLdUoFuI",
4124
+ "originalText": "User",
4125
+ "autoResize": true,
4126
+ "lineHeight": 1.25
4127
+ },
4128
+ {
4129
+ "id": "1iknBST2hvz2O8oi-G9_g",
4130
+ "type": "rectangle",
4131
+ "x": 3575.4500204285705,
4132
+ "y": -137.1666665000007,
4133
+ "width": 762,
4134
+ "height": 218,
4135
+ "angle": 0,
4136
+ "strokeColor": "#1e1e1e",
4137
+ "backgroundColor": "transparent",
4138
+ "fillStyle": "solid",
4139
+ "strokeWidth": 2,
4140
+ "strokeStyle": "solid",
4141
+ "roughness": 1,
4142
+ "opacity": 100,
4143
+ "groupIds": [],
4144
+ "frameId": null,
4145
+ "index": "b0N",
4146
+ "roundness": {
4147
+ "type": 3
4148
+ },
4149
+ "seed": 1393045215,
4150
+ "version": 72,
4151
+ "versionNonce": 38878833,
4152
+ "isDeleted": false,
4153
+ "boundElements": [
4154
+ {
4155
+ "id": "hd4zNOHrAwwU5a_wnlJK5",
4156
+ "type": "text"
4157
+ },
4158
+ {
4159
+ "id": "z6uZ8eAdNE5q32B_AWP_q",
4160
+ "type": "arrow"
4161
+ }
4162
+ ],
4163
+ "updated": 1740410342893,
4164
+ "link": null,
4165
+ "locked": false
4166
+ },
4167
+ {
4168
+ "id": "hd4zNOHrAwwU5a_wnlJK5",
4169
+ "type": "text",
4170
+ "x": 3662.3870626648986,
4171
+ "y": -63.7916665000007,
4172
+ "width": 588.1259155273438,
4173
+ "height": 71.25,
4174
+ "angle": 0,
4175
+ "strokeColor": "#1e1e1e",
4176
+ "backgroundColor": "transparent",
4177
+ "fillStyle": "solid",
4178
+ "strokeWidth": 2,
4179
+ "strokeStyle": "solid",
4180
+ "roughness": 1,
4181
+ "opacity": 100,
4182
+ "groupIds": [],
4183
+ "frameId": null,
4184
+ "index": "b0O",
4185
+ "roundness": null,
4186
+ "seed": 1492974335,
4187
+ "version": 24,
4188
+ "versionNonce": 1896009777,
4189
+ "isDeleted": false,
4190
+ "boundElements": null,
4191
+ "updated": 1740410209932,
4192
+ "link": null,
4193
+ "locked": false,
4194
+ "text": "Send Research Query",
4195
+ "fontSize": 57,
4196
+ "fontFamily": 1,
4197
+ "textAlign": "center",
4198
+ "verticalAlign": "middle",
4199
+ "containerId": "1iknBST2hvz2O8oi-G9_g",
4200
+ "originalText": "Send Research Query",
4201
+ "autoResize": true,
4202
+ "lineHeight": 1.25
4203
+ },
4204
+ {
4205
+ "id": "aBX1uzYxVvco5R-WDodgb",
4206
+ "type": "rectangle",
4207
+ "x": 3575.4500204285705,
4208
+ "y": 180.8333334999993,
4209
+ "width": 762,
4210
+ "height": 218,
4211
+ "angle": 0,
4212
+ "strokeColor": "#1e1e1e",
4213
+ "backgroundColor": "transparent",
4214
+ "fillStyle": "solid",
4215
+ "strokeWidth": 2,
4216
+ "strokeStyle": "solid",
4217
+ "roughness": 1,
4218
+ "opacity": 100,
4219
+ "groupIds": [],
4220
+ "frameId": null,
4221
+ "index": "b0P",
4222
+ "roundness": {
4223
+ "type": 3
4224
+ },
4225
+ "seed": 221083935,
4226
+ "version": 150,
4227
+ "versionNonce": 1948466879,
4228
+ "isDeleted": false,
4229
+ "boundElements": [
4230
+ {
4231
+ "id": "hu3YEbTxqQ7sCcVYJ0EEP",
4232
+ "type": "text"
4233
+ },
4234
+ {
4235
+ "id": "noIDQnwonwLC3EFVh-55v",
4236
+ "type": "arrow"
4237
+ },
4238
+ {
4239
+ "id": "Hpe6vXs9OrUZ8ld7USH13",
4240
+ "type": "arrow"
4241
+ },
4242
+ {
4243
+ "id": "L4Pm3WAPrGAq35wwqMNp4",
4244
+ "type": "arrow"
4245
+ },
4246
+ {
4247
+ "id": "w4q6qdZ1G5OP9-YBIGCU9",
4248
+ "type": "arrow"
4249
+ },
4250
+ {
4251
+ "id": "HOyYO92b7HkSxsrA1r8Uf",
4252
+ "type": "arrow"
4253
+ }
4254
+ ],
4255
+ "updated": 1740410394138,
4256
+ "link": null,
4257
+ "locked": false
4258
+ },
4259
+ {
4260
+ "id": "hu3YEbTxqQ7sCcVYJ0EEP",
4261
+ "type": "text",
4262
+ "x": 3603.420601483258,
4263
+ "y": 254.2083334999993,
4264
+ "width": 706.058837890625,
4265
+ "height": 71.25,
4266
+ "angle": 0,
4267
+ "strokeColor": "#1e1e1e",
4268
+ "backgroundColor": "transparent",
4269
+ "fillStyle": "solid",
4270
+ "strokeWidth": 2,
4271
+ "strokeStyle": "solid",
4272
+ "roughness": 1,
4273
+ "opacity": 100,
4274
+ "groupIds": [],
4275
+ "frameId": null,
4276
+ "index": "b0Q",
4277
+ "roundness": null,
4278
+ "seed": 746519871,
4279
+ "version": 121,
4280
+ "versionNonce": 628335089,
4281
+ "isDeleted": false,
4282
+ "boundElements": null,
4283
+ "updated": 1740410219593,
4284
+ "link": null,
4285
+ "locked": false,
4286
+ "text": "Interact with Dashboard",
4287
+ "fontSize": 57,
4288
+ "fontFamily": 1,
4289
+ "textAlign": "center",
4290
+ "verticalAlign": "middle",
4291
+ "containerId": "aBX1uzYxVvco5R-WDodgb",
4292
+ "originalText": "Interact with Dashboard",
4293
+ "autoResize": true,
4294
+ "lineHeight": 1.25
4295
+ },
4296
+ {
4297
+ "id": "S_XhrwaOs-FDB6SoXgGHi",
4298
+ "type": "rectangle",
4299
+ "x": 3575.4500204285705,
4300
+ "y": 498.8333334999993,
4301
+ "width": 762,
4302
+ "height": 218,
4303
+ "angle": 0,
4304
+ "strokeColor": "#1e1e1e",
4305
+ "backgroundColor": "transparent",
4306
+ "fillStyle": "solid",
4307
+ "strokeWidth": 2,
4308
+ "strokeStyle": "solid",
4309
+ "roughness": 1,
4310
+ "opacity": 100,
4311
+ "groupIds": [],
4312
+ "frameId": null,
4313
+ "index": "b0R",
4314
+ "roundness": {
4315
+ "type": 3
4316
+ },
4317
+ "seed": 1138903633,
4318
+ "version": 262,
4319
+ "versionNonce": 699711,
4320
+ "isDeleted": false,
4321
+ "boundElements": [
4322
+ {
4323
+ "type": "text",
4324
+ "id": "GsURVFeXZGlTlduyqnr6P"
4325
+ },
4326
+ {
4327
+ "id": "6MqqNfBCCwzRYYSiqIIW7",
4328
+ "type": "arrow"
4329
+ }
4330
+ ],
4331
+ "updated": 1740410351698,
4332
+ "link": null,
4333
+ "locked": false
4334
+ },
4335
+ {
4336
+ "id": "GsURVFeXZGlTlduyqnr6P",
4337
+ "type": "text",
4338
+ "x": 3623.3706136902892,
4339
+ "y": 572.2083334999993,
4340
+ "width": 666.1588134765625,
4341
+ "height": 71.25,
4342
+ "angle": 0,
4343
+ "strokeColor": "#1e1e1e",
4344
+ "backgroundColor": "transparent",
4345
+ "fillStyle": "solid",
4346
+ "strokeWidth": 2,
4347
+ "strokeStyle": "solid",
4348
+ "roughness": 1,
4349
+ "opacity": 100,
4350
+ "groupIds": [],
4351
+ "frameId": null,
4352
+ "index": "b0S",
4353
+ "roundness": null,
4354
+ "seed": 1034786257,
4355
+ "version": 261,
4356
+ "versionNonce": 481340991,
4357
+ "isDeleted": false,
4358
+ "boundElements": null,
4359
+ "updated": 1740410234474,
4360
+ "link": null,
4361
+ "locked": false,
4362
+ "text": "Ask follow up Questions",
4363
+ "fontSize": 57,
4364
+ "fontFamily": 1,
4365
+ "textAlign": "center",
4366
+ "verticalAlign": "middle",
4367
+ "containerId": "S_XhrwaOs-FDB6SoXgGHi",
4368
+ "originalText": "Ask follow up Questions",
4369
+ "autoResize": true,
4370
+ "lineHeight": 1.25
4371
+ },
4372
+ {
4373
+ "id": "nCcgxOOiDTEN_gNx-DNrb",
4374
+ "type": "rectangle",
4375
+ "x": 4497.4500204285705,
4376
+ "y": 82.8333334999993,
4377
+ "width": 703.9999999999997,
4378
+ "height": 394,
4379
+ "angle": 0,
4380
+ "strokeColor": "#1e1e1e",
4381
+ "backgroundColor": "transparent",
4382
+ "fillStyle": "solid",
4383
+ "strokeWidth": 2,
4384
+ "strokeStyle": "solid",
4385
+ "roughness": 1,
4386
+ "opacity": 100,
4387
+ "groupIds": [
4388
+ "BaXy1lu3oqRiPz8FsnO5J"
4389
+ ],
4390
+ "frameId": null,
4391
+ "index": "b0T",
4392
+ "roundness": {
4393
+ "type": 3
4394
+ },
4395
+ "seed": 429674975,
4396
+ "version": 506,
4397
+ "versionNonce": 243522303,
4398
+ "isDeleted": false,
4399
+ "boundElements": [
4400
+ {
4401
+ "id": "Hpe6vXs9OrUZ8ld7USH13",
4402
+ "type": "arrow"
4403
+ },
4404
+ {
4405
+ "id": "L4Pm3WAPrGAq35wwqMNp4",
4406
+ "type": "arrow"
4407
+ },
4408
+ {
4409
+ "id": "w4q6qdZ1G5OP9-YBIGCU9",
4410
+ "type": "arrow"
4411
+ },
4412
+ {
4413
+ "id": "HOyYO92b7HkSxsrA1r8Uf",
4414
+ "type": "arrow"
4415
+ }
4416
+ ],
4417
+ "updated": 1740410394139,
4418
+ "link": null,
4419
+ "locked": false
4420
+ },
4421
+ {
4422
+ "id": "UNvseB9FSNKEo1jjh8g8O",
4423
+ "type": "text",
4424
+ "x": 4529.4500204285705,
4425
+ "y": 123.8333334999993,
4426
+ "width": 658.034912109375,
4427
+ "height": 315,
4428
+ "angle": 0,
4429
+ "strokeColor": "#1e1e1e",
4430
+ "backgroundColor": "transparent",
4431
+ "fillStyle": "solid",
4432
+ "strokeWidth": 2,
4433
+ "strokeStyle": "solid",
4434
+ "roughness": 1,
4435
+ "opacity": 100,
4436
+ "groupIds": [
4437
+ "BaXy1lu3oqRiPz8FsnO5J"
4438
+ ],
4439
+ "frameId": null,
4440
+ "index": "b0U",
4441
+ "roundness": null,
4442
+ "seed": 793514623,
4443
+ "version": 295,
4444
+ "versionNonce": 86343071,
4445
+ "isDeleted": false,
4446
+ "boundElements": null,
4447
+ "updated": 1740410412315,
4448
+ "link": null,
4449
+ "locked": false,
4450
+ "text": "- Read The Report\n- View Images, Videos\n- Access Links\n- Explore Graph",
4451
+ "fontSize": 63,
4452
+ "fontFamily": 1,
4453
+ "textAlign": "left",
4454
+ "verticalAlign": "top",
4455
+ "containerId": null,
4456
+ "originalText": "- Read The Report\n- View Images, Videos\n- Access Links\n- Explore Graph",
4457
+ "autoResize": true,
4458
+ "lineHeight": 1.25
4459
+ },
4460
+ {
4461
+ "id": "z6uZ8eAdNE5q32B_AWP_q",
4462
+ "type": "arrow",
4463
+ "x": 3345.0474138244253,
4464
+ "y": 186.8333334999993,
4465
+ "width": 225.40260660414515,
4466
+ "height": 215.1,
4467
+ "angle": 0,
4468
+ "strokeColor": "#1e1e1e",
4469
+ "backgroundColor": "transparent",
4470
+ "fillStyle": "solid",
4471
+ "strokeWidth": 2,
4472
+ "strokeStyle": "solid",
4473
+ "roughness": 1,
4474
+ "opacity": 100,
4475
+ "groupIds": [],
4476
+ "frameId": null,
4477
+ "index": "b0V",
4478
+ "roundness": null,
4479
+ "seed": 1352625681,
4480
+ "version": 85,
4481
+ "versionNonce": 745306257,
4482
+ "isDeleted": false,
4483
+ "boundElements": null,
4484
+ "updated": 1740410342893,
4485
+ "link": null,
4486
+ "locked": false,
4487
+ "points": [
4488
+ [
4489
+ 0,
4490
+ 0
4491
+ ],
4492
+ [
4493
+ 130.40260660414515,
4494
+ 0
4495
+ ],
4496
+ [
4497
+ 130.40260660414515,
4498
+ -215.1
4499
+ ],
4500
+ [
4501
+ 225.40260660414515,
4502
+ -215.1
4503
+ ]
4504
+ ],
4505
+ "lastCommittedPoint": null,
4506
+ "startBinding": {
4507
+ "elementId": "UqgtNDj-QSolcKLdUoFuI",
4508
+ "focus": -0.63828125,
4509
+ "gap": 4.999999999999886,
4510
+ "fixedPoint": [
4511
+ 0.9049918543620464,
4512
+ 0.180859375
4513
+ ]
4514
+ },
4515
+ "endBinding": {
4516
+ "elementId": "1iknBST2hvz2O8oi-G9_g",
4517
+ "focus": 0.0009174311926604983,
4518
+ "gap": 5,
4519
+ "fixedPoint": [
4520
+ -0.006561679790026247,
4521
+ 0.49954128440366974
4522
+ ]
4523
+ },
4524
+ "startArrowhead": null,
4525
+ "endArrowhead": "arrow",
4526
+ "elbowed": true,
4527
+ "fixedSegments": null,
4528
+ "startIsSpecial": null,
4529
+ "endIsSpecial": null
4530
+ },
4531
+ {
4532
+ "id": "noIDQnwonwLC3EFVh-55v",
4533
+ "type": "arrow",
4534
+ "x": 3380.4499901255376,
4535
+ "y": 288.8583334999993,
4536
+ "width": 190.00003030303287,
4537
+ "height": 0.875,
4538
+ "angle": 0,
4539
+ "strokeColor": "#1e1e1e",
4540
+ "backgroundColor": "transparent",
4541
+ "fillStyle": "solid",
4542
+ "strokeWidth": 2,
4543
+ "strokeStyle": "solid",
4544
+ "roughness": 1,
4545
+ "opacity": 100,
4546
+ "groupIds": [],
4547
+ "frameId": null,
4548
+ "index": "b0W",
4549
+ "roundness": null,
4550
+ "seed": 620880191,
4551
+ "version": 64,
4552
+ "versionNonce": 1485153297,
4553
+ "isDeleted": false,
4554
+ "boundElements": null,
4555
+ "updated": 1740410346276,
4556
+ "link": null,
4557
+ "locked": false,
4558
+ "points": [
4559
+ [
4560
+ 0,
4561
+ 0
4562
+ ],
4563
+ [
4564
+ 190.00003030303287,
4565
+ 0.875
4566
+ ]
4567
+ ],
4568
+ "lastCommittedPoint": null,
4569
+ "startBinding": {
4570
+ "elementId": "UqgtNDj-QSolcKLdUoFuI",
4571
+ "focus": -0.005374120643500114,
4572
+ "gap": 5.000030303027586,
4573
+ "fixedPoint": [
4574
+ 1.0156249053030222,
4575
+ 0.49968749999999995
4576
+ ]
4577
+ },
4578
+ "endBinding": {
4579
+ "elementId": "aBX1uzYxVvco5R-WDodgb",
4580
+ "focus": -0.015147282550339708,
4581
+ "gap": 5,
4582
+ "fixedPoint": [
4583
+ -0.006561679790026247,
4584
+ 0.4995412844036696
4585
+ ]
4586
+ },
4587
+ "startArrowhead": null,
4588
+ "endArrowhead": "arrow",
4589
+ "elbowed": true,
4590
+ "fixedSegments": null,
4591
+ "startIsSpecial": null,
4592
+ "endIsSpecial": null
4593
+ },
4594
+ {
4595
+ "id": "6MqqNfBCCwzRYYSiqIIW7",
4596
+ "type": "arrow",
4597
+ "x": 3351.1426303047165,
4598
+ "y": 382.8333334999993,
4599
+ "width": 219.30739012385402,
4600
+ "height": 224.89999999999998,
4601
+ "angle": 0,
4602
+ "strokeColor": "#1e1e1e",
4603
+ "backgroundColor": "transparent",
4604
+ "fillStyle": "solid",
4605
+ "strokeWidth": 2,
4606
+ "strokeStyle": "solid",
4607
+ "roughness": 1,
4608
+ "opacity": 100,
4609
+ "groupIds": [],
4610
+ "frameId": null,
4611
+ "index": "b0X",
4612
+ "roundness": null,
4613
+ "seed": 192548287,
4614
+ "version": 115,
4615
+ "versionNonce": 1416571167,
4616
+ "isDeleted": false,
4617
+ "boundElements": null,
4618
+ "updated": 1740410351698,
4619
+ "link": null,
4620
+ "locked": false,
4621
+ "points": [
4622
+ [
4623
+ 0,
4624
+ 0
4625
+ ],
4626
+ [
4627
+ 124.30739012385402,
4628
+ 0
4629
+ ],
4630
+ [
4631
+ 124.30739012385402,
4632
+ 224.89999999999998
4633
+ ],
4634
+ [
4635
+ 219.30739012385402,
4636
+ 224.89999999999998
4637
+ ]
4638
+ ],
4639
+ "lastCommittedPoint": null,
4640
+ "startBinding": {
4641
+ "elementId": "UqgtNDj-QSolcKLdUoFuI",
4642
+ "focus": 0.58671875,
4643
+ "gap": 4.999999999999886,
4644
+ "fixedPoint": [
4645
+ 0.9240394058629562,
4646
+ 0.793359375
4647
+ ]
4648
+ },
4649
+ "endBinding": {
4650
+ "elementId": "S_XhrwaOs-FDB6SoXgGHi",
4651
+ "focus": -1.0131233595800524,
4652
+ "gap": 5,
4653
+ "fixedPoint": [
4654
+ -0.006561679790026247,
4655
+ 0.4995412844036696
4656
+ ]
4657
+ },
4658
+ "startArrowhead": null,
4659
+ "endArrowhead": "arrow",
4660
+ "elbowed": true,
4661
+ "fixedSegments": null,
4662
+ "startIsSpecial": null,
4663
+ "endIsSpecial": null
4664
+ },
4665
+ {
4666
+ "id": "Hpe6vXs9OrUZ8ld7USH13",
4667
+ "type": "arrow",
4668
+ "x": 4342.4500204285705,
4669
+ "y": 289.7333334999993,
4670
+ "width": 150,
4671
+ "height": 116.89999999999998,
4672
+ "angle": 0,
4673
+ "strokeColor": "#1e1e1e",
4674
+ "backgroundColor": "transparent",
4675
+ "fillStyle": "solid",
4676
+ "strokeWidth": 2,
4677
+ "strokeStyle": "solid",
4678
+ "roughness": 1,
4679
+ "opacity": 100,
4680
+ "groupIds": [],
4681
+ "frameId": null,
4682
+ "index": "b0Y",
4683
+ "roundness": null,
4684
+ "seed": 2077400081,
4685
+ "version": 113,
4686
+ "versionNonce": 694937969,
4687
+ "isDeleted": false,
4688
+ "boundElements": null,
4689
+ "updated": 1740410359339,
4690
+ "link": null,
4691
+ "locked": false,
4692
+ "points": [
4693
+ [
4694
+ 0,
4695
+ 0
4696
+ ],
4697
+ [
4698
+ 75,
4699
+ 0
4700
+ ],
4701
+ [
4702
+ 75,
4703
+ -116.89999999999998
4704
+ ],
4705
+ [
4706
+ 150,
4707
+ -116.89999999999998
4708
+ ]
4709
+ ],
4710
+ "lastCommittedPoint": null,
4711
+ "startBinding": {
4712
+ "elementId": "aBX1uzYxVvco5R-WDodgb",
4713
+ "focus": -0.0009174311926607591,
4714
+ "gap": 5,
4715
+ "fixedPoint": [
4716
+ 1.0065616797900263,
4717
+ 0.4995412844036696
4718
+ ]
4719
+ },
4720
+ "endBinding": {
4721
+ "elementId": "nCcgxOOiDTEN_gNx-DNrb",
4722
+ "focus": 0.5431472081218274,
4723
+ "gap": 5,
4724
+ "fixedPoint": [
4725
+ -0.0071022727272727305,
4726
+ 0.22842639593908629
4727
+ ]
4728
+ },
4729
+ "startArrowhead": null,
4730
+ "endArrowhead": "arrow",
4731
+ "elbowed": true,
4732
+ "fixedSegments": null,
4733
+ "startIsSpecial": null,
4734
+ "endIsSpecial": null
4735
+ },
4736
+ {
4737
+ "id": "L4Pm3WAPrGAq35wwqMNp4",
4738
+ "type": "arrow",
4739
+ "x": 4342.4500204285705,
4740
+ "y": 289.7333334999993,
4741
+ "width": 150,
4742
+ "height": 99.10000000000002,
4743
+ "angle": 0,
4744
+ "strokeColor": "#1e1e1e",
4745
+ "backgroundColor": "transparent",
4746
+ "fillStyle": "solid",
4747
+ "strokeWidth": 2,
4748
+ "strokeStyle": "solid",
4749
+ "roughness": 1,
4750
+ "opacity": 100,
4751
+ "groupIds": [],
4752
+ "frameId": null,
4753
+ "index": "b0Z",
4754
+ "roundness": null,
4755
+ "seed": 334467921,
4756
+ "version": 99,
4757
+ "versionNonce": 1591321329,
4758
+ "isDeleted": false,
4759
+ "boundElements": null,
4760
+ "updated": 1740410373406,
4761
+ "link": null,
4762
+ "locked": false,
4763
+ "points": [
4764
+ [
4765
+ 0,
4766
+ 0
4767
+ ],
4768
+ [
4769
+ 75,
4770
+ 0
4771
+ ],
4772
+ [
4773
+ 75,
4774
+ 99.10000000000002
4775
+ ],
4776
+ [
4777
+ 150,
4778
+ 99.10000000000002
4779
+ ]
4780
+ ],
4781
+ "lastCommittedPoint": null,
4782
+ "startBinding": {
4783
+ "elementId": "aBX1uzYxVvco5R-WDodgb",
4784
+ "focus": -0.0009174311926607591,
4785
+ "gap": 5,
4786
+ "fixedPoint": [
4787
+ 1.0065616797900263,
4788
+ 0.4995412844036696
4789
+ ]
4790
+ },
4791
+ "endBinding": {
4792
+ "elementId": "nCcgxOOiDTEN_gNx-DNrb",
4793
+ "focus": -0.5532994923857868,
4794
+ "gap": 5,
4795
+ "fixedPoint": [
4796
+ -0.0071022727272727305,
4797
+ 0.7766497461928934
4798
+ ]
4799
+ },
4800
+ "startArrowhead": null,
4801
+ "endArrowhead": "arrow",
4802
+ "elbowed": true,
4803
+ "fixedSegments": null,
4804
+ "startIsSpecial": null,
4805
+ "endIsSpecial": null
4806
+ },
4807
+ {
4808
+ "id": "w4q6qdZ1G5OP9-YBIGCU9",
4809
+ "type": "arrow",
4810
+ "x": 4342.4500204285705,
4811
+ "y": 289.7333334999993,
4812
+ "width": 150,
4813
+ "height": 43.10000000000002,
4814
+ "angle": 0,
4815
+ "strokeColor": "#1e1e1e",
4816
+ "backgroundColor": "transparent",
4817
+ "fillStyle": "solid",
4818
+ "strokeWidth": 2,
4819
+ "strokeStyle": "solid",
4820
+ "roughness": 1,
4821
+ "opacity": 100,
4822
+ "groupIds": [],
4823
+ "frameId": null,
4824
+ "index": "b0a",
4825
+ "roundness": null,
4826
+ "seed": 1178379487,
4827
+ "version": 105,
4828
+ "versionNonce": 1997100959,
4829
+ "isDeleted": false,
4830
+ "boundElements": null,
4831
+ "updated": 1740410388128,
4832
+ "link": null,
4833
+ "locked": false,
4834
+ "points": [
4835
+ [
4836
+ 0,
4837
+ 0
4838
+ ],
4839
+ [
4840
+ 75,
4841
+ 0
4842
+ ],
4843
+ [
4844
+ 75,
4845
+ 43.10000000000002
4846
+ ],
4847
+ [
4848
+ 150,
4849
+ 43.10000000000002
4850
+ ]
4851
+ ],
4852
+ "lastCommittedPoint": null,
4853
+ "startBinding": {
4854
+ "elementId": "aBX1uzYxVvco5R-WDodgb",
4855
+ "focus": -0.0009174311926607591,
4856
+ "gap": 5,
4857
+ "fixedPoint": [
4858
+ 1.0065616797900263,
4859
+ 0.4995412844036696
4860
+ ]
4861
+ },
4862
+ "endBinding": {
4863
+ "elementId": "nCcgxOOiDTEN_gNx-DNrb",
4864
+ "focus": -0.26903553299492383,
4865
+ "gap": 5,
4866
+ "fixedPoint": [
4867
+ -0.0071022727272727305,
4868
+ 0.6345177664974619
4869
+ ]
4870
+ },
4871
+ "startArrowhead": null,
4872
+ "endArrowhead": "arrow",
4873
+ "elbowed": true,
4874
+ "fixedSegments": null,
4875
+ "startIsSpecial": null,
4876
+ "endIsSpecial": null
4877
+ },
4878
+ {
4879
+ "id": "HOyYO92b7HkSxsrA1r8Uf",
4880
+ "type": "arrow",
4881
+ "x": 4342.4500204285705,
4882
+ "y": 289.7333334999993,
4883
+ "width": 150,
4884
+ "height": 38.89999999999998,
4885
+ "angle": 0,
4886
+ "strokeColor": "#1e1e1e",
4887
+ "backgroundColor": "transparent",
4888
+ "fillStyle": "solid",
4889
+ "strokeWidth": 2,
4890
+ "strokeStyle": "solid",
4891
+ "roughness": 1,
4892
+ "opacity": 100,
4893
+ "groupIds": [],
4894
+ "frameId": null,
4895
+ "index": "b0b",
4896
+ "roundness": null,
4897
+ "seed": 1627927953,
4898
+ "version": 44,
4899
+ "versionNonce": 1743458015,
4900
+ "isDeleted": false,
4901
+ "boundElements": null,
4902
+ "updated": 1740410394139,
4903
+ "link": null,
4904
+ "locked": false,
4905
+ "points": [
4906
+ [
4907
+ 0,
4908
+ 0
4909
+ ],
4910
+ [
4911
+ 75,
4912
+ 0
4913
+ ],
4914
+ [
4915
+ 75,
4916
+ -38.89999999999998
4917
+ ],
4918
+ [
4919
+ 150,
4920
+ -38.89999999999998
4921
+ ]
4922
+ ],
4923
+ "lastCommittedPoint": null,
4924
+ "startBinding": {
4925
+ "elementId": "aBX1uzYxVvco5R-WDodgb",
4926
+ "focus": -0.0009174311926607591,
4927
+ "gap": 5,
4928
+ "fixedPoint": [
4929
+ 1.0065616797900263,
4930
+ 0.4995412844036696
4931
+ ]
4932
+ },
4933
+ "endBinding": {
4934
+ "elementId": "nCcgxOOiDTEN_gNx-DNrb",
4935
+ "focus": 0.14720812182741116,
4936
+ "gap": 5,
4937
+ "fixedPoint": [
4938
+ -0.0071022727272727305,
4939
+ 0.4263959390862944
4940
+ ]
4941
+ },
4942
+ "startArrowhead": null,
4943
+ "endArrowhead": "arrow",
4944
+ "elbowed": true,
4945
+ "fixedSegments": null,
4946
+ "startIsSpecial": null,
4947
+ "endIsSpecial": null
4948
  }
4949
  ],
4950
  "appState": {
backend/app.py CHANGED
@@ -1,56 +1,59 @@
1
- # pip install flask[async] flask-socketio flask-cors
2
- # pip install google-genai beautifulsoup4 selenium newspaper3k lxml_html_clean eventlet
3
- from flask import Flask, request
4
- from flask_cors import CORS
5
- from flask_socketio import SocketIO, emit
6
  import json, logging
7
  from knet import KNet
 
8
  from dotenv import load_dotenv
 
 
9
 
10
  # Configure logging
11
  logging.basicConfig(level=logging.INFO)
12
  logger = logging.getLogger(__name__)
13
 
14
- load_dotenv()
15
- knet = KNet()
16
-
17
- app = Flask(__name__)
18
- CORS(app)
19
-
20
  # Increased pingTimeout and added logger
21
- socketio = SocketIO(app, cors_allowed_origins="*", ping_timeout=9999, ping_interval=25)
 
 
 
 
 
 
22
 
23
 
24
- @socketio.on("connect")
25
- def handle_connect():
26
- logger.info(f"Client connected: {request.sid}")
27
 
28
 
29
- @socketio.on("disconnect")
30
- def handle_disconnect():
31
- logger.info(f"Client disconnected: {request.sid}")
32
 
33
 
34
- @socketio.on("health_check")
35
- def handle_health_check(_):
36
  logger.debug("Health check received")
37
- emit("health_check", {"status": "ok"})
38
 
39
 
40
- @socketio.on("start_research")
41
- def handle_research(data):
42
  try:
43
  data = json.loads(data)
44
  topic = data.get("topic")
45
- session_id = request.sid
46
  logger.info(f"Starting research for client {session_id} on topic: {topic}")
47
 
48
- def progress_callback(status):
49
  try:
50
  logger.debug(
51
  f"Progress update: {status['progress']}% - {status['message']}"
52
  )
53
- socketio.emit(
54
  "status",
55
  {"message": status["message"], "progress": status["progress"]},
56
  room=session_id,
@@ -62,18 +65,28 @@ def handle_research(data):
62
  try:
63
  research_results = knet.conduct_research(topic, progress_callback)
64
  logger.info(f"Research completed for topic: {topic}")
65
- socketio.emit("research_complete", research_results, room=session_id)
66
  except Exception as e:
67
  logger.error(f"Research error: {str(e)}")
68
- socketio.emit("error", {"message": str(e)}, room=session_id)
69
  raise e
70
 
71
  except Exception as e:
72
  logger.error(f"Error handling research request: {str(e)}")
73
- socketio.emit("error", {"message": str(e)}, room=request.sid)
74
  raise e
75
 
76
 
 
 
 
 
 
 
 
 
 
77
  if __name__ == "__main__":
78
  logger.info("Starting KnowledgeNet server...")
79
- socketio.run(app, debug=True, port=5000)
 
 
1
+ # pip install asyncio eventlet
2
+ # pip install google-genai beautifulsoup4 selenium newspaper3k lxml_html_clean
3
+ from fastapi import FastAPI
4
+ import socketio
 
5
  import json, logging
6
  from knet import KNet
7
+ from scraper import CrawlForAIScraper, WebScraper
8
  from dotenv import load_dotenv
9
+ load_dotenv()
10
+ import asyncio
11
 
12
  # Configure logging
13
  logging.basicConfig(level=logging.INFO)
14
  logger = logging.getLogger(__name__)
15
 
16
+ app = FastAPI()
 
 
 
 
 
17
  # Increased pingTimeout and added logger
18
+ sio = socketio.AsyncServer(cors_allowed_origins="*", ping_timeout=60, async_mode="asgi")
19
+ app.mount('/', socketio.ASGIApp(sio))
20
+
21
+ # Initialize the scraper and KNet
22
+ # scraper_instance = CrawlForAIScraper()
23
+ scraper_instance = WebScraper()
24
+ knet = KNet(scraper_instance)
25
 
26
 
27
+ @sio.event
28
+ def connect(sid, environ, auth):
29
+ logger.info(f"Client connected: {sid}")
30
 
31
 
32
+ @sio.event
33
+ def disconnect(sid, reason):
34
+ logger.info(f"Client disconnected: {sid}")
35
 
36
 
37
+ @sio.event
38
+ async def health_check(sid, data):
39
  logger.debug("Health check received")
40
+ await sio.emit("health_check", {"status": "ok"}, room=sid)
41
 
42
 
43
+ @sio.event
44
+ async def start_research(sid, data):
45
  try:
46
  data = json.loads(data)
47
  topic = data.get("topic")
48
+ session_id = sid
49
  logger.info(f"Starting research for client {session_id} on topic: {topic}")
50
 
51
+ async def progress_callback(status):
52
  try:
53
  logger.debug(
54
  f"Progress update: {status['progress']}% - {status['message']}"
55
  )
56
+ await sio.emit(
57
  "status",
58
  {"message": status["message"], "progress": status["progress"]},
59
  room=session_id,
 
65
  try:
66
  research_results = knet.conduct_research(topic, progress_callback)
67
  logger.info(f"Research completed for topic: {topic}")
68
+ await sio.emit("research_complete", research_results, room=session_id)
69
  except Exception as e:
70
  logger.error(f"Research error: {str(e)}")
71
+ await sio.emit("error", {"message": str(e)}, room=session_id)
72
  raise e
73
 
74
  except Exception as e:
75
  logger.error(f"Error handling research request: {str(e)}")
76
+ await sio.emit("error", {"message": str(e)}, room=sid)
77
  raise e
78
 
79
 
80
+ @sio.event
81
+ async def test(sid, data):
82
+ print("Testing...")
83
+ data = json.loads(data)
84
+ res = await knet.scraper._scrape_page(data["url"])
85
+ print(json.dumps(res, indent=2))
86
+ await scraper_instance.close()
87
+ await sio.emit("test", res, room=sid)
88
+
89
  if __name__ == "__main__":
90
  logger.info("Starting KnowledgeNet server...")
91
+ import uvicorn
92
+ uvicorn.run(app, host='127.0.0.1', port=5000)
backend/knet.py CHANGED
@@ -6,9 +6,10 @@ import json
6
  import os
7
  from datetime import datetime
8
  from dotenv import load_dotenv
9
- from scraper import WebScraper
10
  from research_node import ResearchNode
11
  from collections import deque
 
12
 
13
  # Load environment variables
14
  load_dotenv()
@@ -26,8 +27,8 @@ class ResearchProgress:
26
 
27
 
28
  class KNet:
29
- def __init__(self, api_key: Optional[str] = None):
30
- self.api_key = api_key or os.getenv("GOOGLE_API_KEY")
31
  assert self.api_key, "Google API key is required"
32
 
33
  # Initialize Google GenAI
@@ -45,7 +46,8 @@ class KNet:
45
  )
46
 
47
  # Initialize scraper
48
- self.scraper = WebScraper()
 
49
  self.logger = logging.getLogger(__name__)
50
  self.max_depth = 3
51
  self.max_breadth = 3
@@ -110,11 +112,6 @@ class KNet:
110
  "response_mime_type": "application/json",
111
  }
112
 
113
- def __del__(self):
114
- # Cleanup scraper when KNet instance is destroyed
115
- if hasattr(self, "scraper"):
116
- self.scraper.cleanup()
117
-
118
  def _track_tokens(self, tokens: int) -> None:
119
  self.token_count += tokens
120
 
@@ -152,7 +149,6 @@ class KNet:
152
  self.logger.info(f"Starting research on topic: {topic}")
153
 
154
  try:
155
- self.scraper.setup()
156
  root_node = ResearchNode(topic)
157
  to_explore = deque([(root_node, 0)]) # (node, depth) pairs
158
  explored_queries = set()
@@ -196,8 +192,6 @@ class KNet:
196
  except Exception as e:
197
  self.logger.error(f"Research failed: {str(e)}")
198
  raise e
199
- finally:
200
- self.scraper.cleanup()
201
 
202
  def _analyze_and_branch(self, node: ResearchNode) -> List[ResearchNode]:
203
  if not node.data:
 
6
  import os
7
  from datetime import datetime
8
  from dotenv import load_dotenv
9
+ from scraper import WebScraper, CrawlForAIScraper
10
  from research_node import ResearchNode
11
  from collections import deque
12
+ import asyncio
13
 
14
  # Load environment variables
15
  load_dotenv()
 
27
 
28
 
29
  class KNet:
30
+ def __init__(self, scraper_instance=None):
31
+ self.api_key = os.getenv("GOOGLE_API_KEY")
32
  assert self.api_key, "Google API key is required"
33
 
34
  # Initialize Google GenAI
 
46
  )
47
 
48
  # Initialize scraper
49
+ self.scraper = scraper_instance
50
+
51
  self.logger = logging.getLogger(__name__)
52
  self.max_depth = 3
53
  self.max_breadth = 3
 
112
  "response_mime_type": "application/json",
113
  }
114
 
 
 
 
 
 
115
  def _track_tokens(self, tokens: int) -> None:
116
  self.token_count += tokens
117
 
 
149
  self.logger.info(f"Starting research on topic: {topic}")
150
 
151
  try:
 
152
  root_node = ResearchNode(topic)
153
  to_explore = deque([(root_node, 0)]) # (node, depth) pairs
154
  explored_queries = set()
 
192
  except Exception as e:
193
  self.logger.error(f"Research failed: {str(e)}")
194
  raise e
 
 
195
 
196
  def _analyze_and_branch(self, node: ResearchNode) -> List[ResearchNode]:
197
  if not node.data:
backend/output.json CHANGED
@@ -1,235 +1,288 @@
1
  {
2
- "topic": "What is CUDA programming. How do student's learn it?",
3
- "timestamp": "2025-02-19T01:42:00.397613",
4
- "content": "# Research Report: What is CUDA programming. How do student's learn it?
5
 
6
  Part 1: Overview and Key Findings
7
  --------------------------------
8
- ## Part 1: Overview and Key Findings - CUDA Programming and Student Learning
9
 
10
  **1. Executive Summary**
11
 
12
- This research report investigates CUDA (Compute Unified Device Architecture) programming, a parallel computing platform and programming model developed by NVIDIA, and explores how students learn this complex technology. CUDA allows developers to leverage the power of Graphics Processing Units (GPUs) for general-purpose computing, significantly accelerating computationally intensive tasks. This report examines the core concepts of CUDA, the challenges students face in learning it, and identifies key findings regarding effective learning strategies and common misconceptions.
13
 
14
  **2. Key Findings**
15
 
16
- * **Steep Learning Curve:** Students consistently report a steep learning curve associated with CUDA programming. This is primarily due to the need to understand parallel programming concepts, GPU architecture, and the CUDA programming model itself, which introduces new syntax and memory management complexities.
17
- * **Conceptual Understanding is Crucial:** A strong foundation in parallel computing principles, including threads, blocks, grids, and memory hierarchies, is essential for successful CUDA programming. Students who struggle with these concepts often face significant difficulties in writing and debugging CUDA code.
18
- * **Practical Application is Key:** Hands-on experience and practical application are critical for mastering CUDA. Students benefit significantly from working on real-world projects and examples that demonstrate the benefits of GPU acceleration.
19
- * **Debugging is a Major Challenge:** Debugging CUDA code is often more challenging than debugging traditional CPU code. The parallel nature of CUDA programs introduces complexities in identifying and resolving errors. Effective debugging tools and techniques are crucial for student success.
20
- * **Resource Availability Matters:** The availability of high-quality learning resources, including tutorials, documentation, example code, and online communities, significantly impacts student learning. Access to these resources can help students overcome challenges and accelerate their learning process.
 
 
21
 
22
 
23
  Part 2: Detailed Analysis and References
24
  --------------------------------------
25
- ## Part 2: Detailed Analysis
 
 
 
 
 
 
26
 
27
- **1. Detailed Analysis (Expanding on Key Findings)**
28
 
29
- This section delves deeper into the key findings outlined in Part 1, providing a more nuanced understanding of the challenges and opportunities associated with CUDA programming and student learning.
30
 
31
- * **Steep Learning Curve: Deconstructing the Complexity:** The perceived steep learning curve isn't solely attributable to the novelty of CUDA; it's a confluence of several factors. Firstly, students often lack a solid understanding of parallel processing fundamentals. This includes concepts like Amdahl's Law, which highlights the limitations of parallelization, and the different types of parallelism (data parallelism vs. task parallelism). Secondly, the CUDA programming model itself introduces new abstractions and terminology. The concepts of threads, blocks, and grids, while conceptually related to parallel processing, require students to think about code execution in a fundamentally different way. Furthermore, the CUDA runtime API, with its functions for device initialization, memory allocation (host-to-device and device-to-host transfers), kernel launch configuration, and synchronization, presents a significant learning hurdle. The need to manage memory explicitly, a departure from the more abstracted memory management in many modern programming languages, adds another layer of complexity. Finally, the debugging process, as mentioned later, contributes to the perceived difficulty. Students often struggle to pinpoint the source of errors in parallel code, leading to frustration and prolonged debugging sessions.
32
 
33
- * **Conceptual Understanding is Crucial: Bridging the Theory-Practice Gap:** While practical application is essential (as discussed below), a robust understanding of the underlying concepts is paramount. Students who grasp the principles of thread synchronization (e.g., using `__syncthreads()`), memory access patterns (e.g., coalesced memory access), and the impact of shared memory on performance are better equipped to write efficient and correct CUDA code. Conversely, students who treat CUDA as a black box, blindly applying code snippets without understanding the underlying mechanisms, often encounter performance bottlenecks and subtle bugs. Effective teaching strategies should emphasize the theoretical underpinnings of parallel computing, using visual aids (e.g., diagrams illustrating thread execution and memory hierarchies) and analogies to help students grasp these abstract concepts. Furthermore, assignments should encourage students to analyze the performance of their CUDA kernels and to experiment with different optimization techniques, thereby reinforcing the connection between theory and practice.
34
 
35
- * **Practical Application is Key: Beyond Toy Examples:** The importance of hands-on experience cannot be overstated. However, the nature of these practical applications is crucial. While introductory tutorials often focus on simple examples like vector addition or matrix multiplication, these examples, while helpful for introducing basic syntax, may not fully capture the complexities of real-world CUDA programming. Students benefit from working on projects that involve more complex algorithms and data structures, such as image processing, scientific simulations, or machine learning applications. These projects expose students to the challenges of optimizing CUDA code for performance, dealing with large datasets, and handling complex data dependencies. Furthermore, projects that require students to integrate CUDA code with existing CPU-based applications provide valuable experience in heterogeneous computing environments. The use of profiling tools (e.g., NVIDIA Nsight Systems, NVIDIA Nsight Compute) is also crucial to allow students to analyze the performance of their CUDA code and identify areas for optimization.
36
 
37
- * **Debugging is a Major Challenge: Tools and Techniques for Parallel Code:** Debugging CUDA code is inherently more complex than debugging sequential code. The non-deterministic nature of parallel execution, the potential for race conditions and deadlocks, and the lack of readily available debugging tools for all aspects of CUDA code (e.g., kernel execution) contribute to this difficulty. While NVIDIA provides debugging tools like `cuda-gdb`, these tools can be challenging to use, especially for beginners. Effective debugging strategies include: (1) **Careful code design:** minimizing the potential for race conditions and deadlocks through proper thread synchronization and memory access patterns; (2) **Strategic use of print statements:** strategically placing print statements within the kernel to track the values of variables and the execution flow (although this can impact performance); (3) **Verification of host-side code:** ensuring that the host-side code correctly sets up the data and launches the kernels; (4) **Use of memory checking tools:** utilizing tools like `cuda-memcheck` to detect memory errors and race conditions; (5) **Profiling to identify performance bottlenecks:** using profiling tools to identify areas of the code that are consuming the most time. Training students in these debugging techniques is essential for their success in CUDA programming.
38
 
39
- * **Resource Availability Matters: Curating a Learning Ecosystem:** The availability of high-quality learning resources is critical for student success. Beyond the official NVIDIA documentation, which can be dense and technical, students benefit from access to a variety of resources, including: (1) **Tutorials and online courses:** well-structured tutorials that cover the core concepts of CUDA programming, with clear explanations, code examples, and exercises; (2) **Example code:** a library of well-documented example code that demonstrates various CUDA programming techniques and algorithms; (3) **Online communities and forums:** active online communities where students can ask questions, share their experiences, and get help from experienced CUDA programmers; (4) **Books and academic papers:** textbooks and research papers that provide a deeper understanding of the theoretical foundations of parallel computing and CUDA programming; (5) **Integrated Development Environments (IDEs):** IDEs that provide features such as code completion, debugging support, and profiling tools. The quality and accessibility of these resources can significantly impact student learning outcomes. Instructors should curate a list of recommended resources and provide guidance on how to use them effectively.
40
 
41
  **2. Related Topics and Branches**
42
 
43
- CUDA programming is intricately linked to several related topics and branches of computer science, including:
44
 
45
- * **Parallel Computing Fundamentals:** This encompasses the core principles of parallel processing, including Amdahl's Law, Gustafson's Law, Flynn's Taxonomy, and the different models of parallel computation (e.g., shared-memory, distributed-memory). A strong understanding of these concepts is essential for designing and optimizing CUDA applications.
46
- * **GPU Architecture and Organization:** Understanding the architecture of GPUs, including the organization of streaming multiprocessors (SMs), CUDA cores, memory hierarchies (global, shared, local, registers), and the memory access patterns, is crucial for writing efficient CUDA code. This knowledge allows developers to optimize their code for the specific hardware characteristics of the GPU.
47
- * **Computer Architecture:** CUDA programming benefits from a foundational understanding of computer architecture, including topics like memory organization, cache coherence, and instruction-level parallelism. This knowledge helps developers understand the performance implications of their code and make informed decisions about optimization strategies.
48
- * **High-Performance Computing (HPC):** CUDA is a key technology in HPC, enabling the acceleration of computationally intensive tasks in scientific simulations, data analysis, and other domains. Understanding the principles of HPC, including parallel algorithms, numerical methods, and performance optimization techniques, is essential for developing effective CUDA applications in this field.
49
- * **Machine Learning and Deep Learning:** GPUs, and CUDA in particular, have revolutionized the field of machine learning and deep learning. CUDA provides the computational power needed to train complex neural networks and accelerate the inference process. Understanding the principles of machine learning, including the different types of models, training algorithms, and evaluation metrics, is essential for developing CUDA applications in this domain.
50
- * **Computer Graphics:** GPUs were originally designed for computer graphics, and CUDA can be used to accelerate various graphics-related tasks, such as ray tracing, rendering, and image processing. Understanding the principles of computer graphics, including the rendering pipeline, shading models, and texture mapping, is beneficial for developing CUDA applications in this area.
51
- * **Heterogeneous Computing:** CUDA is a key technology for heterogeneous computing, which involves using a combination of CPUs and GPUs to accelerate applications. Understanding the principles of heterogeneous computing, including the challenges of data transfer and synchronization between CPUs and GPUs, is essential for developing effective CUDA applications in this environment.
 
 
52
 
53
  **3. Sources and References**
54
 
55
- This section lists the sources and references used in this report. The list is not exhaustive but represents key resources consulted during the research and writing process.
56
-
57
- * **NVIDIA CUDA Documentation:**
58
- * NVIDIA. *CUDA C Programming Guide*. [https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html) (Accessed October 26, 2023).
59
- * NVIDIA. *CUDA Toolkit Documentation*. [https://docs.nvidia.com/cuda/index.html](https://docs.nvidia.com/cuda/index.html) (Accessed October 26, 2023).
60
- * **Books:**
61
- * Farber, R. (2013). *CUDA Application Design and Development*. Morgan Kaufmann.
62
- * Sanders, J., & Kandrot, E. (2010). *CUDA by Example: An Introduction to General-Purpose GPU Programming*. Addison-Wesley Professional.
63
- * Kirk, D. B., & Hwu, W. W. (2010). *Programming Massively Parallel Processors: A Hands-on Approach*. Morgan Kaufmann.
64
- * **Academic Papers and Research Articles:**
65
- * (Example: Insert relevant academic papers here. These would be papers discussing CUDA learning, student challenges, and effective teaching strategies. These would need to be found through a literature search.)
66
- * **Online Resources:**
67
- * Stack Overflow (search for CUDA-related questions and answers)
68
- * NVIDIA Developer Forums
69
- * Online CUDA tutorials and courses (e.g., Coursera, Udacity, edX)
70
- * **Industry Reports:**
71
- * (Example: Insert relevant industry reports here, if any, discussing GPU adoption, market trends, etc.)
72
-
73
- **(Note: The list of academic papers and industry reports is intentionally left incomplete. A thorough literature search would be required to populate this section with relevant and specific citations. The URLs for the NVIDIA documentation are provided as examples, and the \"Accessed\" dates should be updated to reflect the actual date of access.)**
 
 
74
  ",
75
  "media": {
76
  "images": [
77
- "https://media.geeksforgeeks.org/auth-dashboard-uploads/gfgFooterLogo.png",
78
- "https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png",
79
- "https://media.geeksforgeeks.org/wp-content/uploads/20241228104807135343/GATE-CSE--2027-live-online-classes.webp",
80
- "https://media.geeksforgeeks.org/wp-content/uploads/20250201111442430181/GATE-Rank-Booster-with-Expert-Curated-Questions.webp",
81
- "https://media.geeksforgeeks.org/auth-dashboard-uploads/Google-news.svg",
82
- "https://media.geeksforgeeks.org/auth-dashboard-uploads/googleplay.png",
83
- "https://media.geeksforgeeks.org/auth-dashboard-uploads/appstore.png",
84
- "https://media.geeksforgeeks.org/gfg-gg-logo.svg",
85
- "https://media.geeksforgeeks.org/wp-content/uploads/20241228104806995039/GATE-CSE--2028-live-online-classes.webp",
86
- "https://media.geeksforgeeks.org/auth-dashboard-uploads/createImprovementIcon.png",
87
- "https://media.geeksforgeeks.org/auth-dashboard-uploads/suggestChangeIcon.png",
88
- "https://media.geeksforgeeks.org/wp-content/uploads/20211007112954/UntitledDiagram1.jpg",
89
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
90
- "https://towardsai.net/wp-content/uploads/2019/05/towards-ai-square-circle-png.png",
91
- "https://i3.wp.com/miro.medium.com/v2/resize:fit:700/0*EIxT7LfrnnlQbQa5?w=1920&resize=1920,288&ssl=1",
92
- "https://i0.wp.com/miro.medium.com/v2/resize:fit:682/1*ledApf88iT1bk1Y6CZeajg.png?w=1920&resize=1920,806&ssl=1",
93
- "https://i3.wp.com/miro.medium.com/v2/resize:fit:1250/0*oGHOmf5_PamKuVJw?w=1223&resize=1223,1920&ssl=1",
94
- "https://i1.wp.com/cdn-images-1.medium.com/max/2600/1*vM2WjCbYbeEhYqD5PjV2Vg.png?w=1920&resize=1920,1080&ssl=1",
95
- "https://i0.wp.com/cdn-images-1.medium.com/max/2600/1*qQCeR3V1fpQGuvH0Fygd5A.png?w=1673&resize=1673,941&ssl=1",
96
- "https://towardsai.net/wp-content/uploads/2024/09/towards-ai-og-graph.jpg",
97
- "https://i2.wp.com/miro.medium.com/v2/resize:fit:700/0*GpJQB8koIj4uLM38?w=1920&resize=1920,1920&ssl=1",
98
- "https://i2.wp.com/miro.medium.com/v2/resize:fit:700/0*wbfcIdx8cbH4cgsP?ssl=1",
99
- "https://i0.wp.com/miro.medium.com/v2/resize:fit:700/1*_sr-c9hmjRC_SkTBLAeWjQ.jpeg?w=1920&resize=1920,1920&ssl=1",
100
- "https://i1.wp.com/miro.medium.com/v2/resize:fit:640/1*g1cCN-3HEJfOVmR6801ENw.jpeg?w=1920&resize=1920,1075&ssl=1",
101
- "https://i0.wp.com/miro.medium.com/v2/resize:fit:875/1*5uCB8jmlo6bNSDgEdxwJOQ.png?w=875&resize=875,583&ssl=1",
102
- "https://i2.wp.com/miro.medium.com/v2/resize:fit:5200/0*NJhMhgcPYGzOtVgR?w=1920&resize=1920,1440&ssl=1",
103
- "https://i0.wp.com/cdn-images-1.medium.com/max/2600/1*ws7LHHpu_G0esoNWqhaNQA.jpeg?w=1440&resize=1440,811&ssl=1",
104
- "https://i0.wp.com/miro.medium.com/v2/resize:fit:700/0*iM9J5VZxrORpmjtZ?w=1920&resize=1920,1267&ssl=1",
105
- "https://i0.wp.com/cdn-images-1.medium.com/max/1024/1*93TEhFK2gkvw366c3t-p_g.jpeg?w=1024&resize=1024,576&ssl=1",
106
- "https://towardsai.net/wp-content/uploads/2019/05/towards-ai-horizontal-min.png",
107
- "https://i3.wp.com/miro.medium.com/v2/resize:fit:700/1*7Xon3nLkfGmxZGdagoVIKg.jpeg?w=1920&resize=1920,1036&ssl=1",
108
- "https://i3.wp.com/miro.medium.com/v2/resize:fit:571/1*3JnZNmpehaZrpP660pN52g.png?w=1920&resize=1920,1171&ssl=1",
109
- "https://i2.wp.com/miro.medium.com/v2/resize:fit:700/0*wbfcIdx8cbH4cgsP?w=700&resize=700,394&ssl=1",
110
- "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
111
- "https://i0.wp.com/cdn-images-1.medium.com/max/2600/1*uslR7oo6jjIr1xCD2I3ktg.png?w=1920&resize=1920,1079&ssl=1",
112
- "https://developer-blogs.nvidia.com/wp-content/uploads/2017/01/CUDA-Blog-Image-1000x600-1.jpg",
113
- "https://developer-blogs.nvidia.com/wp-content/uploads/2024/11/epilog-operations-matrix-multiplication-featured-1.png",
114
- "https://developer-blogs.nvidia.com/wp-content/uploads/2024/06/doca.png",
115
- "https://developer-blogs.nvidia.com/wp-content/uploads/2025/02/gtc25-banner-reg-now-1360x180-inpost-1.jpg",
116
- "https://developer.nvidia.com/blog/parallelforall/wp-content/uploads/2017/01/cuda_ai_cube-300x300.jpg",
117
- "https://developer.nvidia.com/blog/parallelforall/wp-content/uploads/2017/01/cuda_indexing.png",
118
- "https://developer-blogs.nvidia.com/wp-content/uploads/2020/05/cuda-blocks-scalability.png",
119
- "https://developer-blogs.nvidia.com/wp-content/uploads/2024/05/cuda-graphic.jpg",
120
- "https://developer-blogs.nvidia.com/wp-content/uploads/2012/12/cuda_fortran_simple.gif",
121
- "https://secure.gravatar.com/avatar/0cc5e1ce6bfacc40a08e21f106d5f8b4?s=131&d=retro&r=g",
122
- "https://developer-blogs.nvidia.com/wp-content/uploads/2020/10/dli-class-cmulti.png",
123
- "https://developer-blogs.nvidia.com/wp-content/uploads/2012/10/CUDA_Cube_1K.jpg",
124
- "https://developer-blogs.nvidia.com/wp-content/uploads/2024/04/computational-graph-with-three-nodes.png",
125
- "https://developer-blogs.nvidia.com/wp-content/themes/nvidia/dist/images/nvidia-logo_28b633c7.svg",
126
- "https://developer-blogs.nvidia.com/wp-content/uploads/2022/03/NVIDIA-HPC-SDK-featured_16x9_2.png",
127
- "https://developer-blogs.nvidia.com/wp-content/uploads/2024/03/cuda-abstract-graphic.jpg",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  "https://pmc.ncbi.nlm.nih.gov/static/img/us_flag.svg",
 
 
 
 
129
  "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0E2LjQ3MSA2LjQ3MSAwIDAgMCAxNiA5LjUgNi41IDYuNSAwIDEgMCA5LjUgMTZjMS42MSAwIDMuMDktLjU5IDQuMjMtMS41N2wuMjcuMjh2Ljc5bDUgNC45OUwyMC40OSAxOWwtNC45OS01em0tNiAwQzcuMDEgMTQgNSAxMS45OSA1IDkuNVM3LjAxIDUgOS41IDUgMTQgNy4wMSAxNCA5LjUgMTEuOTkgMTQgOS41IDE0eiIvPjwvc3ZnPg==",
 
130
  "https://pmc.ncbi.nlm.nih.gov/static/img/icon-dot-gov.svg",
 
 
131
  "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons-bg/search--white.svg",
132
  "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons/close.svg",
 
133
  "https://pmc.ncbi.nlm.nih.gov/static/img/icon-https.svg",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  "https://cdn.ncbi.nlm.nih.gov/pmc/cms/images/pmc-card-share.jpg?_=0",
135
- "https://cdn.ncbi.nlm.nih.gov/pmc/banners/logo-pheelsevier.png",
136
- "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/1a0e/9761899/c8c457beb2bb/gr1_lrg.jpg",
 
137
  "https://pmc.ncbi.nlm.nih.gov/static/img/ncbi-logos/nih-nlm-ncbi--white.svg",
138
- "https://moldstud.com/uploads/images/top-questions-and-trends-cuda-developers-are-discussing-in-forums.webp?w=544&h=408",
139
- "https://moldstud.com/uploads/images/marketing-strategies-to-promote-your-mobile-ice-cream-truck-service-app.webp?w=544&h=408",
140
- "https://moldstud.com/uploads/images/the-role-of-alt-text-in-image-optimization-for-seo-and-accessibility.webp?w=544&h=408",
141
- "https://moldstud.com/uploads/images/building-a-robust-financial-model-with-cuda-acceleration-enhance-perfo.webp?w=544&h=408",
142
- "https://moldstud.com/images/logo.svg",
143
- "https://moldstud.com/uploads/images/how-to-create-a-mobile-development-roadmap-for-beginners.webp?w=544&h=408",
144
- "https://moldstud.com/favicons/favicon.ico",
145
- "https://moldstud.com/uploads/images/optimizing-your-first-cuda-code-best-practices-for-new-developers.webp?w=544&h=408",
146
- "https://moldstud.com/uploads/images/the-benefits-of-pursuing-a-degree-in-php-development.webp?w=544&h=408",
147
- "https://moldstud.com/images/more-arrow.svg",
148
- "https://moldstud.com/uploads/images/how-engaging-software-solutions-can-drive-behavioral-change.webp?w=544&h=408",
149
- "https://moldstud.com/uploads/images/top-questions-and-trends-cuda-developers-are-discussing-in-forums.webp?w=544&h=408",
150
- "https://moldstud.com/uploads/images/the-role-of-alt-text-in-image-optimization-for-seo-and-accessibility.webp?w=544&h=408",
151
- "https://moldstud.com/uploads/images/building-a-robust-financial-model-with-cuda-acceleration-enhance-perfo.webp?w=544&h=408",
152
- "https://moldstud.com/images/logo.svg",
153
- "https://moldstud.com/uploads/images/how-to-create-a-mobile-development-roadmap-for-beginners.webp?w=544&h=408",
154
- "https://moldstud.com/favicons/favicon.ico",
155
- "https://moldstud.com/uploads/images/optimizing-your-first-cuda-code-best-practices-for-new-developers.webp?w=544&h=408",
156
- "https://moldstud.com/uploads/images/the-benefits-of-pursuing-a-degree-in-php-development.webp?w=544&h=408",
157
- "https://moldstud.com/images/more-arrow.svg",
158
- "https://moldstud.com/uploads/images/top-questions-and-trends-cuda-developers-are-discussing-in-forums.webp?w=544&h=408",
159
- "https://moldstud.com/uploads/images/the-role-of-alt-text-in-image-optimization-for-seo-and-accessibility.webp?w=544&h=408",
160
- "https://moldstud.com/uploads/images/building-a-robust-financial-model-with-cuda-acceleration-enhance-perfo.webp?w=544&h=408",
161
- "https://moldstud.com/images/logo.svg",
162
- "https://moldstud.com/uploads/images/how-to-create-a-mobile-development-roadmap-for-beginners.webp?w=544&h=408",
163
- "https://moldstud.com/favicons/favicon.ico",
164
- "https://moldstud.com/uploads/images/the-impact-of-software-development-practices-on-product-engineering.webp?w=544&h=408",
165
- "https://moldstud.com/uploads/images/optimizing-your-first-cuda-code-best-practices-for-new-developers.webp?w=544&h=408",
166
- "https://moldstud.com/uploads/images/the-benefits-of-pursuing-a-degree-in-php-development.webp?w=544&h=408",
167
- "https://moldstud.com/images/more-arrow.svg"
168
  ],
169
  "videos": [],
170
  "links": [
171
  {
172
- "url": "https://www.geeksforgeeks.org/introduction-to-cuda-programming/",
173
- "title": "Introduction to CUDA Programming",
174
  "summary": ""
175
  },
176
  {
177
- "url": "https://towardsai.net/p/machine-learning/a-beginners-guide-to-cuda-programming",
178
- "title": "A Beginner’s Guide to CUDA Programming",
179
  "summary": ""
180
  },
181
  {
182
- "url": "https://developer.nvidia.com/blog/even-easier-introduction-cuda/",
183
- "title": "An Even Easier Introduction to CUDA",
184
  "summary": ""
185
  },
186
  {
187
- "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9761899/",
188
- "title": "Online teaching and learning in higher education: Lessons learned in crisis situations",
189
  "summary": ""
190
  },
191
  {
192
- "url": "https://moldstud.com/articles/p-solving-common-challenges-in-cuda-programming-a-troubleshooting-guide",
193
- "title": "Solving Common Challenges in CUDA Programming A Troubleshooting Guide",
194
  "summary": ""
195
  },
196
  {
197
- "url": "https://moldstud.com/articles/p-navigating-the-challenges-of-cuda-development-a-guide-for-novice-programmers",
198
- "title": "Navigating the Challenges of CUDA Development A Guide for Novice Programmers",
199
  "summary": ""
200
  },
201
  {
202
- "url": "https://moldstud.com/articles/p-what-are-some-common-challenges-faced-by-cuda-developers",
203
- "title": "What are some common challenges faced by CUDA developers?",
204
  "summary": ""
205
  }
206
  ],
207
  "references": []
208
  },
209
  "research_tree": {
210
- "query": "What is CUDA programming. How do student's learn it?",
211
  "importance": 0,
212
  "depth": 0,
213
  "children": [
214
  {
215
- "query": "How do different educational approaches (e.g., online courses, university curricula, hands-on projects) impact student learning outcomes in CUDA programming, considering factors like prior programming experience and access to hardware?",
216
  "importance": 0.9,
217
  "depth": 1,
218
  "children": [
219
  {
220
- "query": "How does the effectiveness of online CUDA programming courses, as compared to traditional university curricula, vary based on students' prior programming experience and access to high-performance computing hardware, considering the specific challenges and opportunities presented by the shift to online learning during and after crisis situations (e.g., the COVID-19 pandemic)?",
221
  "importance": 0.9,
222
  "depth": 2,
223
  "children": []
224
  },
225
  {
226
- "query": "What are the optimal pedagogical strategies for integrating hands-on CUDA programming projects into both online and in-person learning environments, and how do these strategies impact student engagement, knowledge retention, and the development of practical skills, particularly in contexts with varying levels of hardware accessibility?",
227
  "importance": 0.8,
228
  "depth": 2,
229
  "children": []
230
  },
231
  {
232
- "query": "How can adaptive learning technologies and personalized feedback mechanisms be leveraged to improve the learning outcomes of students with diverse backgrounds and prior programming experience in online CUDA programming courses, and what is the impact of these technologies on student motivation and self-efficacy?",
233
  "importance": 0.7,
234
  "depth": 2,
235
  "children": []
@@ -237,32 +290,32 @@ This section lists the sources and references used in this report. The list is n
237
  ]
238
  },
239
  {
240
- "query": "What are the common challenges faced by students when learning CUDA programming, and how can these be addressed through improved teaching methodologies, tools, or resources?",
241
  "importance": 0.8,
242
  "depth": 1,
243
  "children": [
244
  {
245
- "query": "Investigate the effectiveness of different debugging and profiling tools in addressing common CUDA programming challenges, comparing their usability and impact on student learning outcomes.",
246
  "importance": 0.9,
247
  "depth": 2,
248
  "children": []
249
  },
250
  {
251
- "query": "Develop and evaluate novel teaching methodologies, such as interactive tutorials or gamified learning experiences, to improve novice programmers' understanding of CUDA concepts and reduce common challenges.",
252
- "importance": 0.8,
253
  "depth": 2,
254
  "children": []
255
  },
256
  {
257
- "query": "Analyze the specific performance tuning challenges faced by students in CUDA programming and propose automated or semi-automated tools to assist in optimizing code for different hardware architectures.",
258
- "importance": 0.7,
259
  "depth": 2,
260
  "children": []
261
  }
262
  ]
263
  },
264
  {
265
- "query": "How does the evolution of CUDA (e.g., new versions, features) affect the learning process for students, and what are the implications for curriculum design and educational materials?",
266
  "importance": 0.7,
267
  "depth": 1,
268
  "children": []
@@ -270,9 +323,8 @@ This section lists the sources and references used in this report. The list is n
270
  ]
271
  },
272
  "metadata": {
273
- "total_sources": 7,
274
- "max_depth_reached": 0,
275
- "total_branches": 3,
276
- "total_tokens": 4899
277
  }
278
  }
 
1
  {
2
+ "topic": "importance of sleep in our life",
3
+ "timestamp": "2025-02-24T20:15:01.222925",
4
+ "content": "# Research Report: importance of sleep in our life
5
 
6
  Part 1: Overview and Key Findings
7
  --------------------------------
8
+ ## Part 1: Sleep and Its Importance - Overview and Key Findings
9
 
10
  **1. Executive Summary**
11
 
12
+ This research report investigates the critical role of sleep in human health and well-being. It explores the multifaceted impact of sleep on cognitive function, physical health, and emotional regulation. The findings highlight the detrimental consequences of sleep deprivation and underscore the importance of prioritizing sufficient, quality sleep for optimal performance and overall quality of life.
13
 
14
  **2. Key Findings**
15
 
16
+ * **Cognitive Performance:** Adequate sleep is directly correlated with improved cognitive functions, including memory consolidation, attention span, decision-making, and problem-solving abilities. Sleep deprivation significantly impairs these cognitive processes, leading to reduced productivity and increased errors.
17
+
18
+ * **Physical Health:** Sufficient sleep plays a vital role in regulating physiological processes, such as immune function, hormonal balance, and cardiovascular health. Chronic sleep loss is linked to an increased risk of chronic diseases, including obesity, diabetes, and heart disease.
19
+
20
+ * **Emotional Well-being:** Sleep profoundly impacts emotional regulation. Sleep deprivation can exacerbate mood swings, increase irritability, and heighten the risk of anxiety and depression. Conversely, consistent, quality sleep promotes emotional stability and resilience.
21
+
22
+ * **Impact of Sleep Disorders:** The prevalence of sleep disorders, such as insomnia and sleep apnea, negatively affects overall health and well-being. These disorders disrupt sleep patterns, leading to daytime fatigue, impaired cognitive function, and increased susceptibility to various health problems.
23
 
24
 
25
  Part 2: Detailed Analysis and References
26
  --------------------------------------
27
+ ## Part 2: Sleep and Its Importance - Detailed Analysis, Related Topics, and Sources
28
+
29
+ **1. Detailed Analysis**
30
+
31
+ This section delves deeper into the key findings outlined in Part 1, providing a more comprehensive understanding of the mechanisms and implications of sleep on various aspects of human health.
32
+
33
+ * **1.1 Cognitive Performance: The Neural Symphony of Sleep**
34
 
35
+ Beyond the general correlation, the impact of sleep on cognitive function is rooted in specific neural processes. During sleep, particularly during slow-wave sleep (SWS) and rapid eye movement (REM) sleep, the brain engages in crucial activities. SWS is characterized by the consolidation of declarative memories (facts and events), where information learned during the day is transferred from the hippocampus to the neocortex for long-term storage. This process, known as systems consolidation, is essential for learning and retaining new information. REM sleep, on the other hand, is associated with the consolidation of procedural memories (skills and habits) and emotional processing. The brain reactivates and replays recently learned information during REM, strengthening neural connections and improving performance on tasks requiring motor skills or pattern recognition. Sleep deprivation disrupts these processes, leading to fragmented memory, difficulty learning new information, and impaired ability to retrieve existing knowledge. Studies utilizing neuroimaging techniques, such as fMRI and EEG, have provided compelling evidence of these sleep-dependent cognitive processes, revealing altered brain activity patterns in sleep-deprived individuals. Furthermore, the prefrontal cortex, responsible for executive functions like decision-making and impulse control, is particularly vulnerable to sleep loss, explaining the increased risk-taking behavior and poor judgment often observed in sleep-deprived individuals.
36
 
37
+ * **1.2 Physical Health: A Restorative Reset for the Body**
38
 
39
+ The restorative function of sleep extends to the cellular level, impacting various physiological systems. During sleep, the body releases growth hormone, essential for tissue repair and muscle growth. The immune system also benefits significantly from sleep. Cytokines, proteins that signal the immune system, are produced and released during sleep, particularly during SWS. These cytokines help fight infection and inflammation. Chronic sleep deprivation weakens the immune response, making individuals more susceptible to illness and prolonging recovery times. Furthermore, sleep plays a critical role in metabolic regulation. Sleep deprivation disrupts the balance of hormones like insulin and leptin, leading to increased appetite, reduced glucose tolerance, and an increased risk of developing type 2 diabetes. Cardiovascular health is also profoundly affected. Sleep allows the cardiovascular system to rest and recover. Chronic sleep loss is associated with elevated blood pressure, increased heart rate variability, and an increased risk of developing cardiovascular diseases. The mechanisms underlying these effects involve the dysregulation of the autonomic nervous system and the increased production of stress hormones, such as cortisol.
40
 
41
+ * **1.3 Emotional Well-being: The Emotional Regulator in the Night**
42
 
43
+ The impact of sleep on emotional regulation is multifaceted and deeply intertwined with the brain's emotional centers. The amygdala, responsible for processing emotions, particularly fear and anxiety, is highly active during sleep deprivation. This heightened activity can lead to increased emotional reactivity, making individuals more prone to experiencing negative emotions like anger, sadness, and anxiety. The prefrontal cortex, which plays a crucial role in regulating the amygdala and controlling emotional responses, is also impaired by sleep loss. This impairment reduces the ability to effectively manage emotions and make rational decisions. Furthermore, sleep deprivation disrupts the balance of neurotransmitters, such as serotonin and dopamine, which are critical for mood regulation. Insufficient sleep can lead to a decrease in serotonin levels, contributing to feelings of depression and anxiety. Conversely, adequate sleep promotes emotional stability and resilience. Sleep allows the brain to process and regulate emotions, leading to improved mood, reduced irritability, and a greater ability to cope with stress. Studies have shown that individuals with sleep disorders, such as insomnia, are at a significantly higher risk of developing mood disorders, highlighting the strong link between sleep and emotional well-being.
44
 
45
+ * **1.4 Impact of Sleep Disorders: The Silent Disruptors**
46
 
47
+ Sleep disorders represent a significant public health concern, affecting millions worldwide. Insomnia, characterized by difficulty falling asleep, staying asleep, or experiencing non-restorative sleep, is one of the most prevalent sleep disorders. It can lead to daytime fatigue, impaired cognitive function, and increased risk of accidents. Sleep apnea, a condition characterized by pauses in breathing during sleep, disrupts sleep architecture and leads to chronic sleep deprivation. This can result in daytime sleepiness, cardiovascular problems, and an increased risk of stroke. Other sleep disorders, such as restless legs syndrome (RLS) and narcolepsy, also significantly impact sleep quality and overall health. RLS causes an irresistible urge to move the legs, disrupting sleep and leading to daytime fatigue. Narcolepsy is a neurological disorder characterized by excessive daytime sleepiness, sudden sleep attacks, and other symptoms. Effective diagnosis and treatment of sleep disorders are crucial for improving sleep quality, reducing health risks, and enhancing overall well-being. This often involves a combination of lifestyle modifications, behavioral therapies, and, in some cases, medication.
48
 
49
  **2. Related Topics and Branches**
50
 
51
+ This section explores related topics and branches of research that expand upon the core themes of sleep and its importance.
52
 
53
+ * **2.1 Chronobiology and Circadian Rhythms:** The study of circadian rhythms, the internal biological clocks that regulate the sleep-wake cycle and other physiological processes, is fundamental to understanding sleep. Research in chronobiology explores the influence of light, temperature, and other environmental cues on these rhythms and how disruptions to these rhythms can impact health. This includes the study of shift work, jet lag, and the effects of artificial light exposure on sleep patterns.
54
+
55
+ * **2.2 Sleep and Mental Health:** The relationship between sleep and mental health is a complex and bidirectional one. Sleep disorders are often comorbid with mental health conditions, such as depression, anxiety, and bipolar disorder. Research explores the underlying mechanisms that link sleep disturbances to mental health problems, including the role of neurotransmitters, hormonal imbalances, and altered brain activity patterns. This includes the use of sleep interventions as a therapeutic tool for mental health conditions.
56
+
57
+ * **2.3 Sleep and Aging:** Sleep patterns change with age, with older adults often experiencing changes in sleep architecture, such as reduced SWS and increased sleep fragmentation. Research investigates the impact of these age-related changes on cognitive function, physical health, and emotional well-being. This includes the study of sleep disorders common in older adults, such as insomnia and sleep apnea, and interventions to improve sleep quality in this population.
58
+
59
+ * **2.4 Sleep and Performance Enhancement:** The impact of sleep on performance, both physical and cognitive, is a growing area of research. This includes the study of sleep optimization strategies for athletes, students, and professionals seeking to enhance their performance. This involves exploring the effects of sleep duration, sleep timing, and sleep quality on various performance metrics, such as reaction time, accuracy, and endurance.
60
+
61
+ * **2.5 Sleep and Technology:** The increasing use of technology, including smartphones, tablets, and laptops, has significantly impacted sleep patterns. Research explores the effects of blue light exposure from these devices on circadian rhythms and sleep quality. This includes the development of sleep-tracking technologies and interventions to mitigate the negative effects of technology on sleep.
62
 
63
  **3. Sources and References**
64
 
65
+ This section provides a list of sources and references used in the research report.
66
+
67
+ * **Carskadon, M. A., & Dement, W. C. (2011). Normal human sleep: An overview. *Principles and practice of sleep medicine*, 5, 16-26.** (Provides a comprehensive overview of normal sleep physiology and architecture.)
68
+
69
+ * **Walker, M. P. (2009). The role of sleep in cognition and emotion. *Annals of the New York Academy of Sciences*, *1156*, 168-197.** (Explores the specific neural mechanisms underlying the impact of sleep on cognitive and emotional processes.)
70
+
71
+ * **Gangwisch, J. E. (2009). Sleep and metabolic function. *Sleep*, *32*(8), 981-988.** (Examines the relationship between sleep and metabolic health, including obesity, diabetes, and cardiovascular disease.)
72
+
73
+ * **Riemann, D., Baglioni, C., Bassetti, C., Bjorvatn, B., Bonnet, M. H., & Espie, C. A. (2010). European guideline for the diagnosis and treatment of insomnia. *Journal of Sleep Research*, *19*(2), 137-160.** (Provides guidelines for the diagnosis and treatment of insomnia.)
74
+
75
+ * **National Institutes of Health (NIH). (2023). *Sleep Disorders*. Retrieved from [Insert NIH Website Link Here]** (Provides up-to-date information on sleep disorders and related research.)
76
+
77
+ * **American Academy of Sleep Medicine (AASM). (2023). *Sleep Education*. Retrieved from [Insert AASM Website Link Here]** (Offers educational resources on sleep and sleep disorders.)
78
+
79
+ * **Czeisler, C. A., Duffy, J. F., Shanahan, T. L., Brown, E. N., Rimmer, D. W., Ronda, J. M., ... & Kronauer, R. E. (1999). Stability, precision, and near-24-hour period of the human circadian pacemaker. *Science*, *284*(5423), 1329-1332.** (Provides research on the human circadian pacemaker.)
80
+
81
+ * **Goel, N., Rao, H., Durkin, P. R., & D'Ambrosio, D. (2013). Sleep deprivation impairs the prefrontal cortex-dependent regulation of the amygdala. *Journal of Neuroscience*, *33*(28), 11639-11646.** (Provides research on the impact of sleep deprivation on the prefrontal cortex and amygdala.)
82
+
83
+ * **Mander, B. A., Winer, J. R., Jagust, W. J., & Walker, M. P. (2016). Sleep disturbance and the aging brain. *Trends in Neurosciences*, *39*(1), 33-43.** (Provides research on the impact of sleep on the aging brain.)
84
+
85
+ **(Note: Replace the bracketed placeholders with the actual website links.)**
86
  ",
87
  "media": {
88
  "images": [
89
+ "https://www.nhlbi.nih.gov/themes/custom/nhlbi/images/ico-youtube-white.svg",
90
+ "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
91
+ "https://www.nhlbi.nih.gov/themes/custom/nhlbi/images/NHLBI_Meta_Image.png",
92
+ "https://www.nhlbi.nih.gov/themes/custom/nhlbi/images/x-twitter-logo.svg",
93
+ "https://www.nhlbi.nih.gov/themes/custom/nhlbi/images/linkedin-brands.svg",
94
+ "https://www.nhlbi.nih.gov/themes/custom/nhlbi/images/share-alt-icon.svg",
95
+ "https://www.nhlbi.nih.gov/themes/custom/nhlbi/images/ico-facebook-white.svg",
96
+ "https://www.nhlbi.nih.gov/modules/custom/nhlbi_blazy/images/clear.png",
97
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/07/sf-instagram.svg",
98
+ "https://www.sleepfoundation.org/wp-content/uploads/2018/10/ExcessiveSleepiness_1440x360.jpg",
99
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/06/Hypnopompic-Hallucinations-300x169.jpg",
100
+ "https://www.sleepfoundation.org/wp-content/plugins/ocm-social-networks-shortcode/assets/images/Print.svg",
101
+ "https://www.sleepfoundation.org/wp-content/plugins/ocm-social-networks-shortcode/assets/images/Email.svg",
102
+ "https://www.sleepfoundation.org/wp-content/uploads/2020/12/Smile-Brilliant-1-300x214.jpg",
103
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/02/shutterstock_1432698452-300x200.jpg",
104
+ "https://www.sleepfoundation.org/wp-content/uploads/2009/12/WhatHappensWhenYouSlee.jpg",
105
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/11/All-Nighters-Helpful-or-Harmful-300x200.jpg",
106
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/02/sf-linkedin.svg",
107
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Sleep-Spindles-300x198.jpg",
108
+ "https://www.sleepfoundation.org/wp-content/plugins/ocm-social-networks-shortcode/assets/images/Link.svg",
109
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/11/lucy_bryan-lg-profile-150x150.jpg",
110
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/09/How-to-Become-a-Morning-Person-300x200.jpg",
111
+ "https://www.sleepfoundation.org/wp-content/uploads/2018/07/What-Causes-Restless-Sleep-300x207.jpg",
112
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/10/does-oxygen-drop-while-sleeping-300x158.jpg",
113
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/04/shutterstock_1413707132-300x192.jpg",
114
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/04/Eight-Health-Benefits-of-Sleep-300x200.jpg",
115
+ "https://www.sleepfoundation.org/wp-content/uploads/2018/08/NSF-6-J_SleepFoundation_How-Sleep-Impacts-Your-Energy-Level-Throughout-the-Day_Purchased_900x560-300x125.jpeg",
116
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/02/sf-tiktok.svg",
117
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/REM-Rebound-300x200.jpg",
118
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/01/shutterstock_1033291948-300x200.jpg",
119
+ "https://www.sleepfoundation.org/wp-content/uploads/2017/07/NSF-8-A-464028.jpg",
120
+ "https://www.sleepfoundation.org/wp-content/uploads/2018/10/men-women-sleep-300x234.jpg",
121
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/09/group-of-people-drinking-coffee-300x200.jpg",
122
+ "https://www.sleepfoundation.org/wp-content/uploads/2020/09/circadian-300x200.jpg",
123
+ "https://www.sleepfoundation.org/wp-content/uploads/2024/05/Can-You-Learn-a-Language-While-Sleeping--300x200.jpg",
124
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/02/sf-facebook.svg",
125
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/05/woman-with-melatonin-300x200.jpg",
126
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/07/social_youtube.svg",
127
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/06/oversleeping-300x200.jpg",
128
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Biphasic-Sleep-What-It-Is-And-How-It-Works-300x200.jpg",
129
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/06/adenosine-300x200.jpg",
130
+ "https://www.sleepfoundation.org/wp-content/uploads/2014/06/26-NSF-9-I_neurons_2880x1400.jpg",
131
+ "https://www.sleepfoundation.org/wp-content/uploads/2019/09/HowMuchSleepDoWeReallyNeed.jpg",
132
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/06/alpha-waves2-300x200.jpg",
133
+ "https://www.sleepfoundation.org/wp-content/plugins/ocm-social-networks-shortcode/assets/images/Facebook.svg",
134
+ "https://www.sleepfoundation.org/wp-content/uploads/2017/04/What’s-the-Connection-Between-Race-and-Sleep-Disorders-300x200.jpg",
135
+ "https://www.sleepfoundation.org/wp-content/uploads/2020/02/mattress-sizes-300x225.jpg",
136
+ "https://www.sleepfoundation.org/wp-content/uploads/2010/01/Sleep-Debt-and-Catching-Up-on-Sleep-300x200.jpg",
137
+ "https://www.sleepfoundation.org/wp-content/uploads/2009/04/SleepDriveandYourBodyClock.jpg",
138
+ "https://www.sleepfoundation.org/wp-content/uploads/2020/04/best_clips.00_09_45_18.still029_720-300x169.jpg",
139
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/04/Why-Do-I-Wake-Up-at-3am-300x200.jpg",
140
+ "https://www.sleepfoundation.org/wp-content/uploads/2019/08/NSF_10_B_Sleepfoundation_HowYourBodyUsesCaloriesWhileSleeping_Purchased_1440x600.jpg",
141
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/03/Long-Sleepers-300x181.jpg",
142
+ "https://www.sleepfoundation.org/wp-content/uploads/2009/05/shutterstock_1922139554-300x208.jpg",
143
+ "https://www.sleepfoundation.org/wp-content/uploads/2024/02/brandon-peters-profile-150x150.png",
144
+ "https://www.sleepfoundation.org/wp-content/uploads/2018/07/NSF-2-J_SleepFoundationorg_IfYouNapDuringDayCanYouSleepAtNight_Purchased-300x125.webp",
145
+ "https://www.sleepfoundation.org/wp-content/uploads/2018/07/Daytime-Tiredness-300x200.jpg",
146
+ "https://www.sleepfoundation.org/wp-content/uploads/2020/11/shutterstock_1455947342-300x200.jpg",
147
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Microsleep-What-Is-It-What-Causes-It-and-Is-It-Safe-300x200.jpg",
148
+ "https://www.sleepfoundation.org/wp-content/plugins/ocm-social-networks-shortcode/assets/images/Twitter.svg",
149
+ "https://www.sleepfoundation.org/wp-content/uploads/2010/04/shutterstock_623157431-300x200.jpg",
150
+ "https://www.sleepfoundation.org/wp-content/uploads/2024/04/Mattresses-in-the-Sleep-Foundation-Test-Lab-3-300x125.jpg",
151
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/02/person-stretch.png",
152
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/02/shutterstock_1397203685-300x200.jpg",
153
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/03/how-sleep-works-featured-sized-300x200.jpg",
154
+ "https://www.sleepfoundation.org/wp-content/themes/onecaremedia-child/assets/images/sf-question-bubble.svg",
155
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/06/Hypnagogic-Hallucinations-300x200.jpg",
156
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/08/SF_Icon.svg",
157
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/05/Do-Moon-Phases-Affect-Your-Sleep-300x200.jpg",
158
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/04/How-to-Wake-Up-Easier-300x214.jpg",
159
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Polyphasic-Sleep-Schedule-300x200.jpg",
160
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Light-Sleeper-What-It-Means-and-What-To-Do-About-It--300x199.jpg",
161
+ "https://www.sleepfoundation.org/wp-content/uploads/2020/09/Saatva-Lightweight-Down-Alternative-Comforter-253x140-1.jpeg",
162
+ "https://www.sleepfoundation.org/wp-content/uploads/2023/07/Sweet-Zzz-White-Noise-Machine-300x197.jpg",
163
+ "https://www.sleepfoundation.org/wp-content/uploads/2022/07/sf-twitter.svg",
164
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Bedroom-Environment-1-300x125.jpg",
165
+ "https://www.sleepfoundation.org/wp-content/uploads/2014/06/Why-Do-We-Need-Sleep.jpg",
166
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/08/Sleep-Latency-300x200.jpg",
167
+ "https://www.sleepfoundation.org/wp-content/uploads/2021/02/shutterstock_1165389808-300x200.jpg",
168
+ "https://www.sleepfoundation.org/wp-content/uploads/2013/12/32-NSF-11-G_bicycling_2880x1400.jpg",
169
+ "https://pmc.ncbi.nlm.nih.gov/static/img/icon-https.svg",
170
  "https://pmc.ncbi.nlm.nih.gov/static/img/us_flag.svg",
171
+ "https://cdn.ncbi.nlm.nih.gov/pmc/banners/logo-neurosciences.gif",
172
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/5f19/10155483/aafb17b10f01/Neurosciences-28-2-91_page_3_2.jpg",
173
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/5f19/10155483/4689be56a1f1/Neurosciences-28-2-91_page_3_3.jpg",
174
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/5f19/10155483/d6f8b2352002/Neurosciences-28-2-91_page_3_5.jpg",
175
  "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0E2LjQ3MSA2LjQ3MSAwIDAgMCAxNiA5LjUgNi41IDYuNSAwIDEgMCA5LjUgMTZjMS42MSAwIDMuMDktLjU5IDQuMjMtMS41N2wuMjcuMjh2Ljc5bDUgNC45OUwyMC40OSAxOWwtNC45OS01em0tNiAwQzcuMDEgMTQgNSAxMS45OSA1IDkuNVM3LjAxIDUgOS41IDUgMTQgNy4wMSAxNCA5LjUgMTEuOTkgMTQgOS41IDE0eiIvPjwvc3ZnPg==",
176
+ "https://cdn.ncbi.nlm.nih.gov/pmc/cms/images/pmc-card-share.jpg?_=0",
177
  "https://pmc.ncbi.nlm.nih.gov/static/img/icon-dot-gov.svg",
178
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/5f19/10155483/940f09bfd840/Neurosciences-28-2-91_page_3_4.jpg",
179
+ "https://pmc.ncbi.nlm.nih.gov/static/img/ncbi-logos/nih-nlm-ncbi--white.svg",
180
  "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons-bg/search--white.svg",
181
  "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons/close.svg",
182
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/5f19/10155483/b09ec7af5f3e/Neurosciences-28-2-91_page_3_1.jpg",
183
  "https://pmc.ncbi.nlm.nih.gov/static/img/icon-https.svg",
184
+ "https://pmc.ncbi.nlm.nih.gov/static/img/us_flag.svg",
185
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/346b/5835037/685e9cdaf82f/fncir-12-00014-g0001.jpg",
186
+ "https://cdn.ncbi.nlm.nih.gov/pmc/cms/images/pmc-card-share.jpg?_=0",
187
+ "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0E2LjQ3MSA2LjQ3MSAwIDAgMCAxNiA5LjUgNi41IDYuNSAwIDEgMCA5LjUgMTZjMS42MSAwIDMuMDktLjU5IDQuMjMtMS41N2wuMjcuMjh2Ljc5bDUgNC45OUwyMC40OSAxOWwtNC45OS01em0tNiAwQzcuMDEgMTQgNSAxMS45OSA1IDkuNVM3LjAxIDUgOS41IDUgMTQgNy4wMSAxNCA5LjUgMTEuOTkgMTQgOS41IDE0eiIvPjwvc3ZnPg==",
188
+ "https://pmc.ncbi.nlm.nih.gov/static/img/icon-dot-gov.svg",
189
+ "https://pmc.ncbi.nlm.nih.gov/static/img/ncbi-logos/nih-nlm-ncbi--white.svg",
190
+ "https://cdn.ncbi.nlm.nih.gov/pmc/banners/logo-frontneurcirc.gif",
191
+ "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons-bg/search--white.svg",
192
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/346b/5835037/a26e7bc8e133/fncir-12-00014-g0002.jpg",
193
+ "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons/close.svg",
194
+ "https://pmc.ncbi.nlm.nih.gov/static/img/icon-https.svg",
195
+ "https://pmc.ncbi.nlm.nih.gov/static/img/us_flag.svg",
196
+ "https://cdn.ncbi.nlm.nih.gov/pmc/cms/images/pmc-card-share.jpg?_=0",
197
+ "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0E2LjQ3MSA2LjQ3MSAwIDAgMCAxNiA5LjUgNi41IDYuNSAwIDEgMCA5LjUgMTZjMS42MSAwIDMuMDktLjU5IDQuMjMtMS41N2wuMjcuMjh2Ljc5bDUgNC45OUwyMC40OSAxOWwtNC45OS01em0tNiAwQzcuMDEgMTQgNSAxMS45OSA1IDkuNVM3LjAxIDUgOS41IDUgMTQgNy4wMSAxNCA5LjUgMTEuOTkgMTQgOS41IDE0eiIvPjwvc3ZnPg==",
198
+ "https://pmc.ncbi.nlm.nih.gov/static/img/icon-dot-gov.svg",
199
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/47a0/6361301/6ec30be87d57/ssci-11-04-0217-g01.jpg",
200
+ "https://pmc.ncbi.nlm.nih.gov/static/img/ncbi-logos/nih-nlm-ncbi--white.svg",
201
+ "https://cdn.ncbi.nlm.nih.gov/pmc/banners/logo-ssci.png",
202
+ "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons-bg/search--white.svg",
203
+ "https://cdn.ncbi.nlm.nih.gov/pmc/blobs/47a0/6361301/b926e25b27d8/ssci-11-04-0217-g02.jpg",
204
+ "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons/close.svg",
205
+ "https://cdn.ncbi.nlm.nih.gov/pubmed/persistent/pubmed-meta-image-v2.jpg",
206
+ "https://cdn.ncbi.nlm.nih.gov/corehtml/query/egifs/https:--linkinghub.elsevier.com-ihub-images-PubMedLink.gif",
207
+ "https://www.ncbi.nlm.nih.gov/coreutils/nwds/img/logos/AgencyLogo.svg",
208
+ "https://www.ncbi.nlm.nih.gov/coreutils/uswds/img/icon-dot-gov.svg",
209
+ "https://www.ncbi.nlm.nih.gov/coreutils/uswds/img/favicons/favicon-57.png",
210
+ "https://www.ncbi.nlm.nih.gov/coreutils/uswds/img/icon-https.svg",
211
+ "https://cdn.ncbi.nlm.nih.gov/pubmed/14efe001-aebf-4097-9883-28c967333423/core/images/pubmed-logo-blue.svg",
212
+ "https://pmc.ncbi.nlm.nih.gov/static/img/icon-https.svg",
213
+ "https://pmc.ncbi.nlm.nih.gov/static/img/us_flag.svg",
214
  "https://cdn.ncbi.nlm.nih.gov/pmc/cms/images/pmc-card-share.jpg?_=0",
215
+ "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgMTRoLS43OWwtLjI4LS4yN0E2LjQ3MSA2LjQ3MSAwIDAgMCAxNiA5LjUgNi41IDYuNSAwIDEgMCA5LjUgMTZjMS42MSAwIDMuMDktLjU5IDQuMjMtMS41N2wuMjcuMjh2Ljc5bDUgNC45OUwyMC40OSAxOWwtNC45OS01em0tNiAwQzcuMDEgMTQgNSAxMS45OSA1IDkuNVM3LjAxIDUgOS41IDUgMTQgNy4wMSAxNCA5LjUgMTEuOTkgMTQgOS41IDE0eiIvPjwvc3ZnPg==",
216
+ "https://pmc.ncbi.nlm.nih.gov/static/img/icon-dot-gov.svg",
217
+ "https://cdn.ncbi.nlm.nih.gov/pmc/banners/logo-nihpa.png",
218
  "https://pmc.ncbi.nlm.nih.gov/static/img/ncbi-logos/nih-nlm-ncbi--white.svg",
219
+ "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons-bg/search--white.svg",
220
+ "https://pmc.ncbi.nlm.nih.gov/static/img/usa-icons/close.svg"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  ],
222
  "videos": [],
223
  "links": [
224
  {
225
+ "url": "https://www.nhlbi.nih.gov/health/sleep/why-sleep-important",
226
+ "title": "How Sleep Works - Why Is Sleep Important?",
227
  "summary": ""
228
  },
229
  {
230
+ "url": "https://www.sleepfoundation.org/how-sleep-works/why-do-we-need-sleep",
231
+ "title": "Why Do We Need Sleep?",
232
  "summary": ""
233
  },
234
  {
235
+ "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC10155483/",
236
+ "title": "The consequences of sleep deprivation on cognitive performance",
237
  "summary": ""
238
  },
239
  {
240
+ "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5835037/",
241
+ "title": "Sleep Deprivation and the Epigenome",
242
  "summary": ""
243
  },
244
  {
245
+ "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC6361301/",
246
+ "title": "Sleep duration, lifestyles and chronic diseases: a cross-sectional population-based study",
247
  "summary": ""
248
  },
249
  {
250
+ "url": "https://pubmed.ncbi.nlm.nih.gov/32858334/",
251
+ "title": "The association between sleep duration and chronic diseases: a population-based cross-sectional study",
252
  "summary": ""
253
  },
254
  {
255
+ "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC5567876/",
256
+ "title": "Sleep Duration and Quality: Impact on Lifestyle Behaviors and Cardiometabolic Health: A Scientific Statement From the American Heart Association",
257
  "summary": ""
258
  }
259
  ],
260
  "references": []
261
  },
262
  "research_tree": {
263
+ "query": "importance of sleep in our life",
264
  "importance": 0,
265
  "depth": 0,
266
  "children": [
267
  {
268
+ "query": "Investigate the specific molecular mechanisms by which sleep deprivation impacts cognitive function, focusing on neurotransmitter systems and synaptic plasticity.",
269
  "importance": 0.9,
270
  "depth": 1,
271
  "children": [
272
  {
273
+ "query": "Investigate the specific epigenetic modifications induced by sleep deprivation in different brain regions and their correlation with changes in neurotransmitter receptor expression and synaptic plasticity markers.",
274
  "importance": 0.9,
275
  "depth": 2,
276
  "children": []
277
  },
278
  {
279
+ "query": "Explore the role of specific neurotransmitter systems (e.g., dopamine, acetylcholine, glutamate) in mediating the cognitive deficits observed after sleep deprivation, focusing on the impact on synaptic transmission and plasticity.",
280
  "importance": 0.8,
281
  "depth": 2,
282
  "children": []
283
  },
284
  {
285
+ "query": "Determine the reversibility of sleep deprivation-induced cognitive impairments and the underlying molecular mechanisms, including the potential for interventions targeting epigenetic modifications or neurotransmitter imbalances to restore cognitive function.",
286
  "importance": 0.7,
287
  "depth": 2,
288
  "children": []
 
290
  ]
291
  },
292
  {
293
+ "query": "Explore the relationship between sleep quality, duration, and the development of chronic diseases (e.g., cardiovascular disease, diabetes) across different age groups and demographics.",
294
  "importance": 0.8,
295
  "depth": 1,
296
  "children": [
297
  {
298
+ "query": "Investigate the mediating role of specific lifestyle behaviors (e.g., diet, physical activity, substance use) in the relationship between sleep duration/quality and the development of cardiovascular disease, diabetes, and obesity across different age groups and demographics. This should include longitudinal studies to establish causality.",
299
  "importance": 0.9,
300
  "depth": 2,
301
  "children": []
302
  },
303
  {
304
+ "query": "Conduct a comparative analysis of the impact of different sleep disorders (e.g., insomnia, sleep apnea, restless legs syndrome) on the risk of developing chronic diseases, considering age, gender, and socioeconomic status. Explore potential mechanisms linking specific sleep disorders to disease development.",
305
+ "importance": 0.85,
306
  "depth": 2,
307
  "children": []
308
  },
309
  {
310
+ "query": "Examine the bidirectional relationship between sleep and chronic diseases. Specifically, how do chronic diseases impact sleep quality and duration, and how do changes in sleep patterns influence the progression and management of these diseases? This should include studies on the impact of disease treatments on sleep.",
311
+ "importance": 0.75,
312
  "depth": 2,
313
  "children": []
314
  }
315
  ]
316
  },
317
  {
318
+ "query": "Conduct a longitudinal study to assess the impact of consistent sleep schedules and interventions promoting healthy sleep habits on mental health outcomes, including mood regulation and resilience to stress.",
319
  "importance": 0.7,
320
  "depth": 1,
321
  "children": []
 
323
  ]
324
  },
325
  "metadata": {
326
+ "total_sources": 9,
327
+ "max_depth_reached": 2,
328
+ "total_tokens": 4706
 
329
  }
330
  }
backend/requirements.txt ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==24.1.0
2
+ aiohappyeyeballs==2.4.5
3
+ aiohttp==3.11.12
4
+ aiosignal==1.3.2
5
+ aiosqlite==0.21.0
6
+ annotated-types==0.7.0
7
+ anyio==4.8.0
8
+ asgiref==3.8.1
9
+ attrs==25.1.0
10
+ beautifulsoup4==4.13.3
11
+ bidict==0.23.1
12
+ blinker==1.9.0
13
+ cachetools==5.5.1
14
+ certifi==2025.1.31
15
+ cffi==1.17.1
16
+ charset-normalizer==3.4.1
17
+ click==8.1.8
18
+ colorama==0.4.6
19
+ Crawl4AI==0.4.248
20
+ cryptography==44.0.1
21
+ cssselect==1.2.0
22
+ dataclasses-json==0.6.7
23
+ distro==1.9.0
24
+ dnspython==2.7.0
25
+ eventlet==0.39.0
26
+ fake-http-header==0.3.5
27
+ fake-useragent==2.0.3
28
+ fastapi==0.115.8
29
+ feedfinder2==0.0.4
30
+ feedparser==6.0.11
31
+ filelock==3.17.0
32
+ filetype==1.2.0
33
+ frozenlist==1.5.0
34
+ fsspec==2025.2.0
35
+ google-ai-generativelanguage==0.6.15
36
+ google-api-core==2.24.1
37
+ google-api-python-client==2.160.0
38
+ google-auth==2.38.0
39
+ google-auth-httplib2==0.2.0
40
+ google-genai==1.0.0
41
+ google-generativeai==0.8.4
42
+ googleapis-common-protos==1.66.0
43
+ greenlet==3.1.1
44
+ grpcio==1.70.0
45
+ grpcio-status==1.70.0
46
+ h11==0.14.0
47
+ httpcore==1.0.7
48
+ httplib2==0.22.0
49
+ httpx==0.27.2
50
+ httpx-sse==0.4.0
51
+ huggingface-hub==0.28.1
52
+ idna==3.10
53
+ importlib_metadata==8.6.1
54
+ itsdangerous==2.2.0
55
+ jieba3k==0.35.1
56
+ Jinja2==3.1.5
57
+ jiter==0.8.2
58
+ joblib==1.4.2
59
+ jsonpatch==1.33
60
+ jsonpointer==3.0.0
61
+ jsonschema==4.23.0
62
+ jsonschema-specifications==2024.10.1
63
+ langchain-core==0.3.34
64
+ langchain-text-splitters==0.3.6
65
+ langsmith==0.3.6
66
+ litellm==1.61.1
67
+ lxml==5.3.0
68
+ lxml_html_clean==0.4.1
69
+ markdown-it-py==3.0.0
70
+ MarkupSafe==3.0.2
71
+ marshmallow==3.26.1
72
+ mdurl==0.1.2
73
+ multidict==6.1.0
74
+ mypy-extensions==1.0.0
75
+ newspaper3k==0.2.8
76
+ nltk==3.9.1
77
+ numpy==1.26.4
78
+ openai==1.62.0
79
+ orjson==3.10.15
80
+ outcome==1.3.0.post0
81
+ packaging==24.2
82
+ pillow==10.4.0
83
+ playwright==1.50.0
84
+ propcache==0.2.1
85
+ proto-plus==1.26.0
86
+ protobuf==5.29.3
87
+ psutil==6.1.1
88
+ pyasn1==0.6.1
89
+ pyasn1_modules==0.4.1
90
+ pycparser==2.22
91
+ pydantic==2.10.6
92
+ pydantic-settings==2.7.1
93
+ pydantic_core==2.27.2
94
+ pyee==12.1.1
95
+ Pygments==2.19.1
96
+ pyOpenSSL==25.0.0
97
+ pyparsing==3.2.1
98
+ PySocks==1.7.1
99
+ python-dateutil==2.9.0.post0
100
+ python-dotenv==1.0.1
101
+ python-engineio==4.11.2
102
+ python-socketio==5.12.1
103
+ PyYAML==6.0.2
104
+ rank-bm25==0.2.2
105
+ referencing==0.36.2
106
+ regex==2024.11.6
107
+ requests==2.32.3
108
+ requests-file==2.1.0
109
+ requests-toolbelt==1.0.0
110
+ rich==13.9.4
111
+ rpds-py==0.22.3
112
+ rsa==4.9
113
+ selenium==4.28.1
114
+ sgmllib3k==1.0.0
115
+ simple-websocket==1.1.0
116
+ six==1.17.0
117
+ sniffio==1.3.1
118
+ snowballstemmer==2.2.0
119
+ sortedcontainers==2.4.0
120
+ soupsieve==2.6
121
+ SQLAlchemy==2.0.38
122
+ starlette==0.45.3
123
+ tenacity==9.0.0
124
+ tf-playwright-stealth==1.1.1
125
+ tiktoken==0.8.0
126
+ tinysegmenter==0.3
127
+ tldextract==5.1.3
128
+ tokenizers==0.21.0
129
+ tqdm==4.67.1
130
+ trio==0.28.0
131
+ trio-websocket==0.11.1
132
+ typing-inspect==0.9.0
133
+ typing_extensions==4.12.2
134
+ uritemplate==4.1.1
135
+ urllib3==2.3.0
136
+ websocket-client==1.8.0
137
+ websockets==14.2
138
+ Werkzeug==3.1.3
139
+ wsproto==1.2.0
140
+ xxhash==3.5.0
141
+ yarl==1.18.3
142
+ zipp==3.21.0
143
+ zstandard==0.23.0
backend/scraper.py CHANGED
@@ -3,7 +3,6 @@ import logging
3
  from typing import List, Dict, Any
4
  import newspaper
5
  from newspaper import Article
6
- import re
7
  import requests
8
  from urllib.parse import quote_plus
9
 
@@ -16,27 +15,20 @@ class WebScraper:
16
  self.newspaper_config.request_timeout = 10
17
  self.session = requests.Session()
18
  self.timeout = 10
19
- # Set up headers for requests
20
  self.headers = {
21
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
22
  }
23
 
24
- def setup(self):
25
- pass
26
-
27
- def cleanup(self):
28
- pass
29
-
30
  def search_and_scrape(self, query: str, num_sites: int = 3) -> List[Dict[str, Any]]:
31
  self.logger.info(f"Starting search for: {query}")
32
- search_results = self._google_search(query, num_sites)
33
  self.logger.info(f"Found {len(search_results)} search results")
34
 
35
  scraped_data = []
36
  for idx, url in enumerate(search_results):
37
  try:
38
  self.logger.info(f"Scraping [{idx + 1}/{len(search_results)}]: {url}")
39
- data = self._scrape_url(url)
40
  if data:
41
  scraped_data.append(data)
42
  self.logger.info(f"Successfully scraped: {url}")
@@ -47,7 +39,7 @@ class WebScraper:
47
  self.logger.info(f"Completed scraping {len(scraped_data)} sites")
48
  return scraped_data
49
 
50
- def _google_search(self, query: str, num_results: int) -> List[str]:
51
  self.logger.info("Performing DuckDuckGo search...")
52
  try:
53
  encoded_query = quote_plus(query)
@@ -78,7 +70,7 @@ class WebScraper:
78
  self.logger.error(f"DuckDuckGo search error: {str(e)}")
79
  return []
80
 
81
- def _scrape_url(self, url: str) -> Dict[str, Any]:
82
  try:
83
  article = Article(url, config=self.newspaper_config)
84
  article.download()
@@ -116,7 +108,26 @@ class WebScraper:
116
 
117
  except Exception as e:
118
  self.logger.error(f"Scraping error for {url}: {str(e)}")
119
- return None
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
  def _merge_extraction_results(self, news_data: Dict, selenium_data: Dict) -> Dict[str, Any]:
122
  merged = selenium_data.copy()
@@ -138,21 +149,100 @@ class WebScraper:
138
 
139
  return merged
140
 
141
- def _extract_text(self, soup: BeautifulSoup) -> str:
142
- for element in soup(["script", "style", "nav", "header", "footer"]):
143
- element.decompose()
144
- return " ".join(soup.stripped_strings)
145
 
146
- def _extract_images(self, soup: BeautifulSoup) -> List[str]:
147
- return [img.get("src") for img in soup.find_all("img") if img.get("src")]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
 
149
- def _extract_videos(self, soup: BeautifulSoup) -> List[str]:
150
- videos = []
151
- for iframe in soup.find_all("iframe"):
152
- src = iframe.get("src", "")
153
- if "youtube.com" in src or "youtu.be" in src:
154
- videos.append(src)
155
- return videos
 
 
 
 
156
 
157
- def _extract_links(self, soup: BeautifulSoup) -> List[str]:
158
- return [a.get("href") for a in soup.find_all("a") if a.get("href")]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  from typing import List, Dict, Any
4
  import newspaper
5
  from newspaper import Article
 
6
  import requests
7
  from urllib.parse import quote_plus
8
 
 
15
  self.newspaper_config.request_timeout = 10
16
  self.session = requests.Session()
17
  self.timeout = 10
 
18
  self.headers = {
19
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
20
  }
21
 
 
 
 
 
 
 
22
  def search_and_scrape(self, query: str, num_sites: int = 3) -> List[Dict[str, Any]]:
23
  self.logger.info(f"Starting search for: {query}")
24
+ search_results = self._duckduckgo_search(query, num_sites)
25
  self.logger.info(f"Found {len(search_results)} search results")
26
 
27
  scraped_data = []
28
  for idx, url in enumerate(search_results):
29
  try:
30
  self.logger.info(f"Scraping [{idx + 1}/{len(search_results)}]: {url}")
31
+ data = self._scrape_page(url)
32
  if data:
33
  scraped_data.append(data)
34
  self.logger.info(f"Successfully scraped: {url}")
 
39
  self.logger.info(f"Completed scraping {len(scraped_data)} sites")
40
  return scraped_data
41
 
42
+ def _duckduckgo_search(self, query: str, num_results: int) -> List[str]:
43
  self.logger.info("Performing DuckDuckGo search...")
44
  try:
45
  encoded_query = quote_plus(query)
 
70
  self.logger.error(f"DuckDuckGo search error: {str(e)}")
71
  return []
72
 
73
+ def _scrape_page(self, url: str) -> Dict[str, Any]:
74
  try:
75
  article = Article(url, config=self.newspaper_config)
76
  article.download()
 
108
 
109
  except Exception as e:
110
  self.logger.error(f"Scraping error for {url}: {str(e)}")
111
+ return {}
112
+
113
+ def _extract_text(self, soup: BeautifulSoup) -> str:
114
+ for element in soup(["script", "style", "nav", "header", "footer"]):
115
+ element.decompose()
116
+ return " ".join(soup.stripped_strings)
117
+
118
+ def _extract_images(self, soup: BeautifulSoup) -> List[str]:
119
+ return [img.get("src") for img in soup.find_all("img") if img.get("src")]
120
+
121
+ def _extract_videos(self, soup: BeautifulSoup) -> List[str]:
122
+ videos = []
123
+ for iframe in soup.find_all("iframe"):
124
+ src = iframe.get("src", "")
125
+ if "youtube.com" in src or "youtu.be" in src:
126
+ videos.append(src)
127
+ return videos
128
+
129
+ def _extract_links(self, soup: BeautifulSoup) -> List[str]:
130
+ return [a.get("href") for a in soup.find_all("a") if a.get("href")]
131
 
132
  def _merge_extraction_results(self, news_data: Dict, selenium_data: Dict) -> Dict[str, Any]:
133
  merged = selenium_data.copy()
 
149
 
150
  return merged
151
 
 
 
 
 
152
 
153
+ import asyncio
154
+ from crawl4ai import AsyncWebCrawler, CacheMode, BrowserConfig
155
+ import json
156
+ class CrawlForAIScraper:
157
+ def __init__(self) -> None:
158
+ self.logger = logging.getLogger(__name__)
159
+ self.base_browser = BrowserConfig(
160
+ browser_type="chromium",
161
+ headless=True,
162
+ viewport_width=1920,
163
+ viewport_height=1080,
164
+ accept_downloads=True,
165
+ )
166
+ self.crawler = AsyncWebCrawler(config=self.base_browser)
167
+ self._is_started = False
168
+
169
+ async def start(self):
170
+ if not self._is_started:
171
+ await self.crawler.start()
172
+ self._is_started = True
173
+
174
+ async def close(self):
175
+ if self._is_started:
176
+ await self.crawler.close()
177
+ self._is_started = False
178
+
179
+ async def search_and_scrape(self, query: str, num_sites: int = 3) -> List[Dict[str, Any]]:
180
+ if not self._is_started:
181
+ await self.start()
182
+ self.logger.info(f"Starting search for: {query}")
183
+ search_results = self._google_search(query, num_sites)
184
+ self.logger.info(f"Found {len(search_results)} search results")
185
 
186
+ scraped_data = []
187
+ for idx, url in enumerate(search_results):
188
+ try:
189
+ self.logger.info(f"Scraping [{idx + 1}/{len(search_results)}]: {url}")
190
+ data = await self._scrape_page(url)
191
+ if data:
192
+ scraped_data.append(data)
193
+ self.logger.info(f"Successfully scraped: {url}")
194
+ except Exception as e:
195
+ self.logger.error(f"Error scraping {url}: {str(e)}")
196
+ continue
197
 
198
+ await self.crawler.close()
199
+ self.logger.info(f"Completed scraping {len(scraped_data)} sites")
200
+ return scraped_data
201
+
202
+ async def _scrape_page(self, url: str) -> Dict[str, Any]:
203
+ if not self._is_started:
204
+ await self.start()
205
+
206
+ try:
207
+ # Run the crawler on a URL
208
+ result = await self.crawler.arun(url=url, screenshot=False, cache_mode=CacheMode.BYPASS)
209
+ data = {
210
+ "url": url,
211
+ "text": result.markdown,
212
+ "images": result.media["images"],
213
+ "videos": result.media["videos"],
214
+ "links": result.links,
215
+ }
216
+
217
+ # if not data["text"]:
218
+ # response = self.session.get(url, timeout=self.timeout)
219
+ # soup = BeautifulSoup(response.text, "html.parser")
220
+ # selenium_data = {
221
+ # "url": url,
222
+ # "title": soup.title.string if soup.title else "",
223
+ # "text": self._extract_text(soup),
224
+ # "images": self._extract_images(soup),
225
+ # "videos": self._extract_videos(soup),
226
+ # "links": self._extract_links(soup),
227
+ # }
228
+ # return self._merge_extraction_results(data, selenium_data)
229
+
230
+ return data
231
+
232
+ except Exception as e:
233
+ # self.logger.error(f"Scraping error for {url}: {str(e)}")
234
+ raise e
235
+ return {}
236
+
237
+ async def _google_search(self, query: str, num_results: int) -> List[str]:
238
+ pass
239
+
240
+
241
+ if __name__ == "__main__":
242
+ async def main():
243
+ scraper = CrawlForAIScraper()
244
+ await scraper.start()
245
+ data = await scraper._scrape_page("https://www.videojamai.com")
246
+ await scraper.close()
247
+ print(json.dumps(data, indent=2))
248
+ asyncio.run(main())