diff --git a/0223dd9e-0445-4b5f-82c5-a76be3cf5892.png b/0223dd9e-0445-4b5f-82c5-a76be3cf5892.png new file mode 100644 index 0000000000000000000000000000000000000000..a459a4272ecae4b04052946af8197d471903ee1b --- /dev/null +++ b/0223dd9e-0445-4b5f-82c5-a76be3cf5892.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66b72fd53bd2ddd5c2e3919467e0ae182c5c568104def0ec3c8aa2c70e38134e +size 240455 diff --git a/02857791-1c2f-4048-a3ee-1bcd71ef58df.png b/02857791-1c2f-4048-a3ee-1bcd71ef58df.png new file mode 100644 index 0000000000000000000000000000000000000000..36bd497756e924eb1df97620f865a4b36fca1645 --- /dev/null +++ b/02857791-1c2f-4048-a3ee-1bcd71ef58df.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fc38089b5661503b78caaf386d18a33a789a85106972aba4085455f65d6b247 +size 325910 diff --git a/04fc0a64-7b84-44d0-86fd-46f3f94c7724.png b/04fc0a64-7b84-44d0-86fd-46f3f94c7724.png new file mode 100644 index 0000000000000000000000000000000000000000..1d152ebce0229bb89b9a32747440c680ad2200b4 --- /dev/null +++ b/04fc0a64-7b84-44d0-86fd-46f3f94c7724.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:894eadda9d95f5c85dcab55c85989b30297b4b1fb63db78d5d1780d669483b98 +size 60425 diff --git a/05500f09-5cf6-4a2a-affb-0a7253166363.png b/05500f09-5cf6-4a2a-affb-0a7253166363.png new file mode 100644 index 0000000000000000000000000000000000000000..151fcb482a0d050c0fc94cecf95f4bfda4bb6c97 --- /dev/null +++ b/05500f09-5cf6-4a2a-affb-0a7253166363.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc37a8e4a31c1dc3d9510e36442e9776c06f30b8b6f64cb77b1747fc09a74e18 +size 253219 diff --git a/08b215b4-048b-4967-99c8-b9474acd35d5.png b/08b215b4-048b-4967-99c8-b9474acd35d5.png new file mode 100644 index 0000000000000000000000000000000000000000..25b2064d2ca56a6482fc377a07198be6dcb41586 --- /dev/null +++ b/08b215b4-048b-4967-99c8-b9474acd35d5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65ebd00f2f3f6b648641386fd237949aadaca2a6c4ecc93e94df1f52f52a2d2a +size 39197 diff --git a/093c67de-dbc4-4921-bc66-17c94b854eec.png b/093c67de-dbc4-4921-bc66-17c94b854eec.png new file mode 100644 index 0000000000000000000000000000000000000000..bad4343f4131ada74d97cb1ce69f05356c4c74b3 --- /dev/null +++ b/093c67de-dbc4-4921-bc66-17c94b854eec.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7af0c0a27fb0dec44ff35f98f85f91302c76f4facf3600bf32dbe6c332a4279 +size 141146 diff --git a/0c1bd944-ff8c-4132-a612-a226d6b20ddd.png b/0c1bd944-ff8c-4132-a612-a226d6b20ddd.png new file mode 100644 index 0000000000000000000000000000000000000000..c271259358fb40a217ae1256d7740f92f9c65238 --- /dev/null +++ b/0c1bd944-ff8c-4132-a612-a226d6b20ddd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d17272f592020390fde86607ac811165f748308d642d10dceca99fae8a024d48 +size 333620 diff --git a/0f74aa54-c2e0-4571-8110-aefecc8618e2.png b/0f74aa54-c2e0-4571-8110-aefecc8618e2.png new file mode 100644 index 0000000000000000000000000000000000000000..1695dc3192a357f76d6523f18e51cb3ad1e41d68 --- /dev/null +++ b/0f74aa54-c2e0-4571-8110-aefecc8618e2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20d31b001c79296ba5226ec653bbbadbfaaa85a72c80d960e02ad07adae4e8c8 +size 47890 diff --git a/1040b63f-e8b1-46a3-8028-8e57d4a50aec.png b/1040b63f-e8b1-46a3-8028-8e57d4a50aec.png new file mode 100644 index 0000000000000000000000000000000000000000..e33d90d342697a636f28a4f5a86b5dcccca31366 --- /dev/null +++ b/1040b63f-e8b1-46a3-8028-8e57d4a50aec.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e64263c354fecd7d959b3b04d725cf461a843eec086bcae96b8e7215dc7ea4d3 +size 112669 diff --git a/125b1456-78d6-4f86-a8c9-b20f0f18be6c.png b/125b1456-78d6-4f86-a8c9-b20f0f18be6c.png new file mode 100644 index 0000000000000000000000000000000000000000..25b2064d2ca56a6482fc377a07198be6dcb41586 --- /dev/null +++ b/125b1456-78d6-4f86-a8c9-b20f0f18be6c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65ebd00f2f3f6b648641386fd237949aadaca2a6c4ecc93e94df1f52f52a2d2a +size 39197 diff --git a/1434f146-c714-48e2-beef-4e2623729b5c.png b/1434f146-c714-48e2-beef-4e2623729b5c.png new file mode 100644 index 0000000000000000000000000000000000000000..9833a5de9559ad5f15417aa3c5c5c001fefd2a5c --- /dev/null +++ b/1434f146-c714-48e2-beef-4e2623729b5c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7eb3f1ea4c49e19b7ee9cc525080ec7cb52130ea8ae5ffa71e8c81123d08a650 +size 285628 diff --git a/1833d002-08dc-426d-bb7f-3e9a024df61f.png b/1833d002-08dc-426d-bb7f-3e9a024df61f.png new file mode 100644 index 0000000000000000000000000000000000000000..e064de26ec6c680e272e73768c3964249b8e5ba5 --- /dev/null +++ b/1833d002-08dc-426d-bb7f-3e9a024df61f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d2aae5a08da114fcf9a5026f262c8fe7355ec9a0b8422657e1f7e091281e3b8 +size 345356 diff --git a/1891f188-3fd4-4cad-8cec-272be05973b9.png b/1891f188-3fd4-4cad-8cec-272be05973b9.png new file mode 100644 index 0000000000000000000000000000000000000000..9bf6e72c68893c644a25ea4949038ec883d7089c --- /dev/null +++ b/1891f188-3fd4-4cad-8cec-272be05973b9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2a7827801d6a6d0518f5e6e0a184101a5f6e09c4534cc42efffeeceea5a5474 +size 262617 diff --git a/18fedd11-51c3-4487-826d-ecc40508cf52.png b/18fedd11-51c3-4487-826d-ecc40508cf52.png new file mode 100644 index 0000000000000000000000000000000000000000..e60ca3896690f8c0d30f2b2ba74d674b860de574 --- /dev/null +++ b/18fedd11-51c3-4487-826d-ecc40508cf52.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:544aa286e10ca6683df09a6084df774781103c5818940881b2badb581e19c10d +size 239138 diff --git a/1c1bf83e-9cf8-4437-bf51-708e6d0cfa08.png b/1c1bf83e-9cf8-4437-bf51-708e6d0cfa08.png new file mode 100644 index 0000000000000000000000000000000000000000..1695dc3192a357f76d6523f18e51cb3ad1e41d68 --- /dev/null +++ b/1c1bf83e-9cf8-4437-bf51-708e6d0cfa08.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20d31b001c79296ba5226ec653bbbadbfaaa85a72c80d960e02ad07adae4e8c8 +size 47890 diff --git a/1c88e443-8542-49f0-8541-98b2d3db6bba.png b/1c88e443-8542-49f0-8541-98b2d3db6bba.png new file mode 100644 index 0000000000000000000000000000000000000000..e33d90d342697a636f28a4f5a86b5dcccca31366 --- /dev/null +++ b/1c88e443-8542-49f0-8541-98b2d3db6bba.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e64263c354fecd7d959b3b04d725cf461a843eec086bcae96b8e7215dc7ea4d3 +size 112669 diff --git a/1cd59ada-19fc-4cc7-9d67-21767fbc0e10.png b/1cd59ada-19fc-4cc7-9d67-21767fbc0e10.png new file mode 100644 index 0000000000000000000000000000000000000000..03034cda2cc7b1331b8ffd57d2fc4d3a38e79e3e --- /dev/null +++ b/1cd59ada-19fc-4cc7-9d67-21767fbc0e10.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b0d5acc6e903f5f2d1b1bcb2581e03aa398bbecc349fc253fcfe84d5e039339 +size 300740 diff --git a/1ecc87b7-5a7f-4541-bce4-49cc74604739.png b/1ecc87b7-5a7f-4541-bce4-49cc74604739.png new file mode 100644 index 0000000000000000000000000000000000000000..693b6435cc5a10817ef44801d7162758c87ef864 --- /dev/null +++ b/1ecc87b7-5a7f-4541-bce4-49cc74604739.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2722c6101eab205f1c51d7f1194e54616bab1000ae2adf17d4ccfd80195f4249 +size 12478 diff --git a/21bf760e-9d9d-4a2b-8842-cb6c10e58885.png b/21bf760e-9d9d-4a2b-8842-cb6c10e58885.png new file mode 100644 index 0000000000000000000000000000000000000000..28a59faef4bd4d72f63371710b88373a28c5b0e8 --- /dev/null +++ b/21bf760e-9d9d-4a2b-8842-cb6c10e58885.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93c5cf1efeb9cc892ff30b3b50da20dee90f8791f2939ab5a744166879656b93 +size 175707 diff --git a/2430cdf3-cf42-4693-9fb9-8303f1a820a8.png b/2430cdf3-cf42-4693-9fb9-8303f1a820a8.png new file mode 100644 index 0000000000000000000000000000000000000000..908a7f954b4ceee1053237f3de17ed6a475b0f75 --- /dev/null +++ b/2430cdf3-cf42-4693-9fb9-8303f1a820a8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f4c258789596c1f0aa33842bd2aab8af3fdf5a47b1c17d57864281e260ff727 +size 12550 diff --git a/25f70d5a-6dc7-4e26-b18a-2ab68df896d7.png b/25f70d5a-6dc7-4e26-b18a-2ab68df896d7.png new file mode 100644 index 0000000000000000000000000000000000000000..bcc80fa03f6a4bec01d7fe10fb3929270c5f7c2b --- /dev/null +++ b/25f70d5a-6dc7-4e26-b18a-2ab68df896d7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce666fecd3309b31ecdd5dcf6deb53b109255c314e0825d67ed59c365a4897d0 +size 274499 diff --git a/263aa06e-1a97-40a3-b45a-23e1add9debf.png b/263aa06e-1a97-40a3-b45a-23e1add9debf.png new file mode 100644 index 0000000000000000000000000000000000000000..ee9a928579e3a36582b597bde83100e7dd4b4900 --- /dev/null +++ b/263aa06e-1a97-40a3-b45a-23e1add9debf.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c18b94d4d9e841e69db4bc71beb8952f4ad6334577e922d57c3d6d15a075b60a +size 263360 diff --git a/27c8ec55-6dfa-45eb-8b78-9084904fdbe3.png b/27c8ec55-6dfa-45eb-8b78-9084904fdbe3.png new file mode 100644 index 0000000000000000000000000000000000000000..5274a71aad420b625797fc521e3964dc5d603055 --- /dev/null +++ b/27c8ec55-6dfa-45eb-8b78-9084904fdbe3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f55b9db1c9005478d78263c77d6b5df2edc3b0b3fc8f71b3d9d14b96c5b48332 +size 164234 diff --git a/2d76ec47-24ba-4562-83e7-986514f002ee.png b/2d76ec47-24ba-4562-83e7-986514f002ee.png new file mode 100644 index 0000000000000000000000000000000000000000..4df07b3542be90eab7913ef8829a682c67c2137d --- /dev/null +++ b/2d76ec47-24ba-4562-83e7-986514f002ee.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f3313dc5e87ceb430e989d52b7c703443cf250ec76f721f67a36d0d4f1643bb +size 29402 diff --git a/31f1c6f7-6fdd-4c40-bc32-a20091397c3d.png b/31f1c6f7-6fdd-4c40-bc32-a20091397c3d.png new file mode 100644 index 0000000000000000000000000000000000000000..3e074e22cda4951c4aa1cd7e06e2e44f5ac324c0 --- /dev/null +++ b/31f1c6f7-6fdd-4c40-bc32-a20091397c3d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec31a824c7f109aa13d7726bb7b6e35852e7a4bcc5481bf682831022dde8a138 +size 140706 diff --git a/34355514-b296-4bc1-b7c0-28e03982ff11.png b/34355514-b296-4bc1-b7c0-28e03982ff11.png new file mode 100644 index 0000000000000000000000000000000000000000..d741a6f860c90f4404401c8f11ad06f4a35d79e3 --- /dev/null +++ b/34355514-b296-4bc1-b7c0-28e03982ff11.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a17fe2aea73547df93746e80582a2b0d65e732c14fc7c92157290a536f10fcb +size 336167 diff --git a/376afefd-0fee-43e4-99b2-c4a8ffde952e.png b/376afefd-0fee-43e4-99b2-c4a8ffde952e.png new file mode 100644 index 0000000000000000000000000000000000000000..40ed192ab6ee87a22d59710390f6ecc628fa22f1 --- /dev/null +++ b/376afefd-0fee-43e4-99b2-c4a8ffde952e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d52b12f122a750e2169abcce05244a34185787432e5a670ebd414ec012675a69 +size 233725 diff --git a/39958705-bbd3-4c03-b36f-bd418711b914.png b/39958705-bbd3-4c03-b36f-bd418711b914.png new file mode 100644 index 0000000000000000000000000000000000000000..6151875140e10a26fb2991c3c2a8e07854650bd5 --- /dev/null +++ b/39958705-bbd3-4c03-b36f-bd418711b914.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:913976342911a5ac0ee78a803a8fe63011db2a1b55d5fb37c84d069fdcc7f118 +size 94538 diff --git a/3b26fe45-c580-48f4-917d-a0ab012f1a42.png b/3b26fe45-c580-48f4-917d-a0ab012f1a42.png new file mode 100644 index 0000000000000000000000000000000000000000..fc458c877f418800b21a2c5320b5b84bffbc1d63 --- /dev/null +++ b/3b26fe45-c580-48f4-917d-a0ab012f1a42.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6de30b1857fa726d408b9ff31f7ed7b0f627ce1c1ecc44c3295557d69a46ee01 +size 380565 diff --git a/40764a53-08c8-4eb5-85f1-003f969f7021.png b/40764a53-08c8-4eb5-85f1-003f969f7021.png new file mode 100644 index 0000000000000000000000000000000000000000..693b6435cc5a10817ef44801d7162758c87ef864 --- /dev/null +++ b/40764a53-08c8-4eb5-85f1-003f969f7021.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2722c6101eab205f1c51d7f1194e54616bab1000ae2adf17d4ccfd80195f4249 +size 12478 diff --git a/429b3af4-d627-4a9a-a056-6102ab63fea5.png b/429b3af4-d627-4a9a-a056-6102ab63fea5.png new file mode 100644 index 0000000000000000000000000000000000000000..ab873aa5c4af291ed3ef60b16613762091ad989e --- /dev/null +++ b/429b3af4-d627-4a9a-a056-6102ab63fea5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdf974f3d9d3c7a467baa7dc1a109be75232f4a450f9bbd46b685f8655d6bf99 +size 266567 diff --git a/44daa32f-0dd7-4158-ac9f-3267906909e9.png b/44daa32f-0dd7-4158-ac9f-3267906909e9.png new file mode 100644 index 0000000000000000000000000000000000000000..d105fc949648f026a343db6ecc523cabae1182e6 --- /dev/null +++ b/44daa32f-0dd7-4158-ac9f-3267906909e9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ca0ef5b200aa7a2535f9287416c4ed96d1991ed3ea92ede8be0c0043f5f0e67 +size 301769 diff --git a/4558f146-cd8a-4cfe-a3db-12d5122221c9.png b/4558f146-cd8a-4cfe-a3db-12d5122221c9.png new file mode 100644 index 0000000000000000000000000000000000000000..73d8f5c965941507eb60734719a8e4af549b0ea6 --- /dev/null +++ b/4558f146-cd8a-4cfe-a3db-12d5122221c9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6992f5f67a1a69268b66f7ec220f95e947d92535dd6eefb26d255a88b2c38975 +size 393103 diff --git a/4ce9ffcb-405e-4691-bcd2-645fdc98452c.png b/4ce9ffcb-405e-4691-bcd2-645fdc98452c.png new file mode 100644 index 0000000000000000000000000000000000000000..dd48b76538dd642b8390db00de162e463f5beec0 --- /dev/null +++ b/4ce9ffcb-405e-4691-bcd2-645fdc98452c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f41f3be0060c18973bc951e0411d02adf5ea9579875aa79b9c3f4c84c40182d7 +size 302581 diff --git a/527f9771-12a2-4840-a258-6f3a73b91c16.png b/527f9771-12a2-4840-a258-6f3a73b91c16.png new file mode 100644 index 0000000000000000000000000000000000000000..d431c3e4b727af2c0e3b63faf12b711277630195 --- /dev/null +++ b/527f9771-12a2-4840-a258-6f3a73b91c16.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24402b709733fa43d4d10b4dd5e3a11011f2ce444e928745426773f86ab3a6cd +size 265854 diff --git a/5786f422-f30c-4ba7-bd37-85e8be3d45e4.png b/5786f422-f30c-4ba7-bd37-85e8be3d45e4.png new file mode 100644 index 0000000000000000000000000000000000000000..552d7a6dd7194c5b515d1e2da688943d119d0190 --- /dev/null +++ b/5786f422-f30c-4ba7-bd37-85e8be3d45e4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b54592ae4792bf6c399ac41b5119c366dfd6287bd7c66f487af486f3686d925 +size 308433 diff --git a/5855ad74-18bc-47e5-a444-886a95ed8be4.png b/5855ad74-18bc-47e5-a444-886a95ed8be4.png new file mode 100644 index 0000000000000000000000000000000000000000..213583fd729459c7f153b2b97bb54deb6986561b --- /dev/null +++ b/5855ad74-18bc-47e5-a444-886a95ed8be4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:383de0f404cdc4d25e2a7a56fd93c6fda613066d29186dfd87cc181d2b7e2a4c +size 200528 diff --git a/597da4c1-bdfe-4c0b-9eaa-49532c53d1d3.png b/597da4c1-bdfe-4c0b-9eaa-49532c53d1d3.png new file mode 100644 index 0000000000000000000000000000000000000000..e309b2705d13ff1f3ae0fb34d743a4632eabeb3a --- /dev/null +++ b/597da4c1-bdfe-4c0b-9eaa-49532c53d1d3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e55aefe14484f4526fc5cfca348f75700443d5ca805c29e386b771b424d9f2a0 +size 70548 diff --git a/5ce82cea-c1b6-4c4c-b7cb-465b1536bb1d.png b/5ce82cea-c1b6-4c4c-b7cb-465b1536bb1d.png new file mode 100644 index 0000000000000000000000000000000000000000..030d9965e92f3bff353916addc149aa7002e315e --- /dev/null +++ b/5ce82cea-c1b6-4c4c-b7cb-465b1536bb1d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96254dcec36b037faca0602e050dff96359a19eee4f6fb3112a1993ace654bef +size 285395 diff --git a/5e023350-1df4-4f15-8366-5db9dc90579f.png b/5e023350-1df4-4f15-8366-5db9dc90579f.png new file mode 100644 index 0000000000000000000000000000000000000000..ac05dd2e1848c761ef71720871ef73e944b7c088 --- /dev/null +++ b/5e023350-1df4-4f15-8366-5db9dc90579f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd634725763ce9cad0ff35d1cfca2c0b5ca8a00baca00c2d4d26a36e18710eab +size 317616 diff --git a/606316eb-c095-4e21-9902-ea8f8f194b70.png b/606316eb-c095-4e21-9902-ea8f8f194b70.png new file mode 100644 index 0000000000000000000000000000000000000000..ef0b0b37f8a5508bc3545f1fa1c6aca49692d8a6 --- /dev/null +++ b/606316eb-c095-4e21-9902-ea8f8f194b70.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c8cb0029a9c9926ea3776dee8f1783e788f42226f5de6d7fd019bb07941e249 +size 16397 diff --git a/61a81c02-8337-4deb-826b-e5b2313d231f.png b/61a81c02-8337-4deb-826b-e5b2313d231f.png new file mode 100644 index 0000000000000000000000000000000000000000..83c7eff21662c59ce9886d8d94912f856231134d --- /dev/null +++ b/61a81c02-8337-4deb-826b-e5b2313d231f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf96064cc5253f87cb763d0d7438fae0b8292f967ca2a785b3f78c535ff375ed +size 258265 diff --git a/643d59e3-dfa3-4117-9505-7738dc6b8b4a.png b/643d59e3-dfa3-4117-9505-7738dc6b8b4a.png new file mode 100644 index 0000000000000000000000000000000000000000..e7727094d67fa7575a4c2078cba6a3c0d083d8bf --- /dev/null +++ b/643d59e3-dfa3-4117-9505-7738dc6b8b4a.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:401b492933e9557821e16b065642d7fdaddde3c72e7b056c02cbf5279314d6eb +size 140123 diff --git a/648edaf3-42db-4d98-9ac1-d8270702c36a.png b/648edaf3-42db-4d98-9ac1-d8270702c36a.png new file mode 100644 index 0000000000000000000000000000000000000000..5ad48e2db3b255c0cfc9d6ea3b105366284728d9 --- /dev/null +++ b/648edaf3-42db-4d98-9ac1-d8270702c36a.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e33eea49c321370855f8411102e47ea6689287cec6105b9077a1cea15ef15de4 +size 82838 diff --git a/6c1e43fb-924b-4656-9794-719a53358a0e.png b/6c1e43fb-924b-4656-9794-719a53358a0e.png new file mode 100644 index 0000000000000000000000000000000000000000..8a3863cee6b3aee260738d015fa8696a272df5b6 --- /dev/null +++ b/6c1e43fb-924b-4656-9794-719a53358a0e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c0edc2cc104e09dd894f26b5411be4dad9b2f1fa875b85842025a93c2aee969 +size 72099 diff --git a/6f200232-31cf-4397-b2ef-d13863e84c9a.png b/6f200232-31cf-4397-b2ef-d13863e84c9a.png new file mode 100644 index 0000000000000000000000000000000000000000..52887fe2c647392754676f3f781fcd1c97d07e38 --- /dev/null +++ b/6f200232-31cf-4397-b2ef-d13863e84c9a.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d587802e8148bacfb1407c362b11dfd40a3b37f5318390ad8aed73a970990081 +size 250857 diff --git a/70bd2949-f16e-4a84-b293-78091948b201.png b/70bd2949-f16e-4a84-b293-78091948b201.png new file mode 100644 index 0000000000000000000000000000000000000000..87a8b611e6feb9f18dcd1f234fe7a2307474c8ef --- /dev/null +++ b/70bd2949-f16e-4a84-b293-78091948b201.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebb3c9d14c7a6fda046a5e1f214a77730a0e0a5293d19b29280e2fb249905194 +size 74041 diff --git a/754b9c53-79e7-494f-9b56-10e413e326a5.png b/754b9c53-79e7-494f-9b56-10e413e326a5.png new file mode 100644 index 0000000000000000000000000000000000000000..ced8ba887b5f21450fc7920915e0667469c6f72c --- /dev/null +++ b/754b9c53-79e7-494f-9b56-10e413e326a5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be45d4cf70215cd01cf478f1db5764d15dc02456b837510254d14fafcbe91ede +size 103043 diff --git a/767cfb6b-c3a0-41d8-a5d8-9770c862abd0.png b/767cfb6b-c3a0-41d8-a5d8-9770c862abd0.png new file mode 100644 index 0000000000000000000000000000000000000000..5274a71aad420b625797fc521e3964dc5d603055 --- /dev/null +++ b/767cfb6b-c3a0-41d8-a5d8-9770c862abd0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f55b9db1c9005478d78263c77d6b5df2edc3b0b3fc8f71b3d9d14b96c5b48332 +size 164234 diff --git a/7dcbc7a0-a774-4088-ba2b-5ae4f953d3b3.png b/7dcbc7a0-a774-4088-ba2b-5ae4f953d3b3.png new file mode 100644 index 0000000000000000000000000000000000000000..6f64418e0cc47af40da21f1ab0e71763786d4af3 --- /dev/null +++ b/7dcbc7a0-a774-4088-ba2b-5ae4f953d3b3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20e97de02907d020a5e441c410051aa89781a8ecd5cbecd650a53a121b684c64 +size 265237 diff --git a/808f9d41-dc8a-4f35-8550-f6fc7db84d6c.png b/808f9d41-dc8a-4f35-8550-f6fc7db84d6c.png new file mode 100644 index 0000000000000000000000000000000000000000..44aed1e0802020a68f603b43ac4acf777226ca0c --- /dev/null +++ b/808f9d41-dc8a-4f35-8550-f6fc7db84d6c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6334d0fdfa1a2cfc9c21c6d5a29ec9fab105e4fd303c9104e1ea5f98c05d7ed0 +size 217278 diff --git a/8280a34a-e190-4d75-8464-5e0570e529d9.png b/8280a34a-e190-4d75-8464-5e0570e529d9.png new file mode 100644 index 0000000000000000000000000000000000000000..37bb5d43c7c599efe8db89426c7e8c5108d2f051 --- /dev/null +++ b/8280a34a-e190-4d75-8464-5e0570e529d9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bed643cbbe160e414b8aa9de049fa251102c0623f0c9333dbb46933ddc05f37 +size 105685 diff --git a/828c464a-051c-4246-b47a-b22004c816e4.png b/828c464a-051c-4246-b47a-b22004c816e4.png new file mode 100644 index 0000000000000000000000000000000000000000..033382d75545251fc4c671f50f981a05188fcfe7 --- /dev/null +++ b/828c464a-051c-4246-b47a-b22004c816e4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46adc2589c2429cbb2e8f10c838b8f942cedbd1f112c1983f4a052d29a93b624 +size 284254 diff --git a/8536bd89-260b-470a-b3d0-e2fcf35c2fb7.png b/8536bd89-260b-470a-b3d0-e2fcf35c2fb7.png new file mode 100644 index 0000000000000000000000000000000000000000..caf3105f9df86f7411f1fee6db641c6f081c8b02 --- /dev/null +++ b/8536bd89-260b-470a-b3d0-e2fcf35c2fb7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0dfe5bfd7ec2ca6632f19799f1c2a50774f03f5c22468d4523362d2474ddb46 +size 151232 diff --git a/87ccac0e-f279-49d1-ba96-05785c305716.png b/87ccac0e-f279-49d1-ba96-05785c305716.png new file mode 100644 index 0000000000000000000000000000000000000000..8fc29002956c80bb3274b91ac4946776885b7c6a --- /dev/null +++ b/87ccac0e-f279-49d1-ba96-05785c305716.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8efef0b034f97df1cac09d2964edfc4a683ef1f811c95e7a1610b3e329a2bdb7 +size 121555 diff --git a/8d9aff23-9575-4df6-aa39-54eb480ddf6d.png b/8d9aff23-9575-4df6-aa39-54eb480ddf6d.png new file mode 100644 index 0000000000000000000000000000000000000000..633d2dd3270fabc7c1fccaa56d185739222b3149 --- /dev/null +++ b/8d9aff23-9575-4df6-aa39-54eb480ddf6d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb9ccf6266dc11a3748df2be07d7b04c6f651babbcbcfb166bf14a7a0c226b25 +size 295846 diff --git a/8efe0fdd-4c8c-4eca-ab61-554df2b114ae.png b/8efe0fdd-4c8c-4eca-ab61-554df2b114ae.png new file mode 100644 index 0000000000000000000000000000000000000000..c1c10bb89b085d6ba3ad806b4a5f517ee4ebf6bb --- /dev/null +++ b/8efe0fdd-4c8c-4eca-ab61-554df2b114ae.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b1d3f1c17cff4e71e754fa9841d47a9c8b930facb45359f901ced250bc13c3d +size 328462 diff --git a/92d2b3b9-0220-4956-8ef0-c63b28e2f373.png b/92d2b3b9-0220-4956-8ef0-c63b28e2f373.png new file mode 100644 index 0000000000000000000000000000000000000000..935a04e0924eb407b7faee48342b9b83b0016a34 --- /dev/null +++ b/92d2b3b9-0220-4956-8ef0-c63b28e2f373.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:565737647ac00f3579d675afcc0d2c29a9e8e77b915edfebdf254ea6f12361d2 +size 267531 diff --git a/94651707-bb2c-4154-ac3b-df809883b2fd.png b/94651707-bb2c-4154-ac3b-df809883b2fd.png new file mode 100644 index 0000000000000000000000000000000000000000..4e4d0cf1b88833c8e17bd184c8e708573e340e01 --- /dev/null +++ b/94651707-bb2c-4154-ac3b-df809883b2fd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e54275603338186f71cec0d0f1430e7156f29d528253203b3ffc3f64ae975cf4 +size 204682 diff --git a/949dcf79-e580-48b0-8b36-fcccb84b001f.png b/949dcf79-e580-48b0-8b36-fcccb84b001f.png new file mode 100644 index 0000000000000000000000000000000000000000..ed3317fc576dcd4634745d4025c50152401b4baf --- /dev/null +++ b/949dcf79-e580-48b0-8b36-fcccb84b001f.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19a33f5b909844d73a7871223929a998a48a7ca44cef957417d91a65e93d3660 +size 280288 diff --git a/99894b20-5c96-436c-91f0-474ad0fe8708.png b/99894b20-5c96-436c-91f0-474ad0fe8708.png new file mode 100644 index 0000000000000000000000000000000000000000..b4c1c786f5b7c0dc50cb783fd8040370e2e8f979 --- /dev/null +++ b/99894b20-5c96-436c-91f0-474ad0fe8708.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d8c2acdbb5cfeae5fe22188058fcd9f2ffc8450f64f8f3b460d11f7b6216922 +size 300117 diff --git a/9b417b32-3584-4516-8c8e-18986f817867.png b/9b417b32-3584-4516-8c8e-18986f817867.png new file mode 100644 index 0000000000000000000000000000000000000000..bd4bf9d405c2420d9e79dd7cc78174c8f0d2f891 --- /dev/null +++ b/9b417b32-3584-4516-8c8e-18986f817867.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3522e2d52df143ce76b843883b3aa799146e66765f58518117ed0d3521936520 +size 146160 diff --git a/a055d760-607b-480b-bcbe-2e096bd97ec8.png b/a055d760-607b-480b-bcbe-2e096bd97ec8.png new file mode 100644 index 0000000000000000000000000000000000000000..157ea8453fe734bcb384540aaa4c4249c5c34c36 --- /dev/null +++ b/a055d760-607b-480b-bcbe-2e096bd97ec8.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d85068c35c46a1536b74d2b8635454115d93c50e20f0fce59d8b309048eaeee +size 273021 diff --git a/a0f999d1-4f87-473b-b52a-de6b6786794d.png b/a0f999d1-4f87-473b-b52a-de6b6786794d.png new file mode 100644 index 0000000000000000000000000000000000000000..44cf35ea2e10c4cd9155b79c6a5ca954611eadda --- /dev/null +++ b/a0f999d1-4f87-473b-b52a-de6b6786794d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44d88804bd45df887defb6b0043e0b54cec15a1b426d3c0174f8bbc7f85c489d +size 266580 diff --git a/a2844097-313d-475b-a7bd-803879d85faf.png b/a2844097-313d-475b-a7bd-803879d85faf.png new file mode 100644 index 0000000000000000000000000000000000000000..b8eefccfb9ab77613a8a9f02ad6c739dd92fb34b --- /dev/null +++ b/a2844097-313d-475b-a7bd-803879d85faf.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aef7aeb741cf92e0c114799a6589845694e7968d53f66554071ccd11cd6537be +size 112525 diff --git a/a3d16e91-4bc9-4f0a-b420-fdb6a24be189.png b/a3d16e91-4bc9-4f0a-b420-fdb6a24be189.png new file mode 100644 index 0000000000000000000000000000000000000000..8462f127d7c391d79ceb2ddc622c80a311670749 --- /dev/null +++ b/a3d16e91-4bc9-4f0a-b420-fdb6a24be189.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c0abea4a21d919723d788d1e1b4cc7adc32f7f77c7e919b98a08cce7c0ba9ac +size 81332 diff --git a/a3e5c6a1-9650-4627-83bc-5deb41d13c96.png b/a3e5c6a1-9650-4627-83bc-5deb41d13c96.png new file mode 100644 index 0000000000000000000000000000000000000000..1a11fe6a97a2d6aa932d010497906664f3753047 --- /dev/null +++ b/a3e5c6a1-9650-4627-83bc-5deb41d13c96.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2b827d9800954afef25ec7ed574a313b8d3cd8abebdf2fa454285864427f11b +size 32152 diff --git a/a693f3d8-aaf8-40ea-a78a-43a41b7d538e.png b/a693f3d8-aaf8-40ea-a78a-43a41b7d538e.png new file mode 100644 index 0000000000000000000000000000000000000000..908a7f954b4ceee1053237f3de17ed6a475b0f75 --- /dev/null +++ b/a693f3d8-aaf8-40ea-a78a-43a41b7d538e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f4c258789596c1f0aa33842bd2aab8af3fdf5a47b1c17d57864281e260ff727 +size 12550 diff --git a/ab3bc119-6d65-4f72-ad96-c135a6071b4c.png b/ab3bc119-6d65-4f72-ad96-c135a6071b4c.png new file mode 100644 index 0000000000000000000000000000000000000000..d7fb2df7d7392739c69287fba6a8b44543e2a3af --- /dev/null +++ b/ab3bc119-6d65-4f72-ad96-c135a6071b4c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa019ef04e01b65e21ba8f907df3d6375db4604d30f6ba4200d74d0a51f754ec +size 281092 diff --git a/ae01713b-f5a8-4017-8689-6a1c5418cf44.png b/ae01713b-f5a8-4017-8689-6a1c5418cf44.png new file mode 100644 index 0000000000000000000000000000000000000000..f5fa95b83ef95043927ce01807ad94a0821763a8 --- /dev/null +++ b/ae01713b-f5a8-4017-8689-6a1c5418cf44.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fae64cf31b1699ee0f0752437252eab2dcfa98bf7f3d9400e26ea47a08c8dfeb +size 327397 diff --git a/b103d655-6661-4cbf-9a31-c9a704254b65.png b/b103d655-6661-4cbf-9a31-c9a704254b65.png new file mode 100644 index 0000000000000000000000000000000000000000..d6d3b7f28dfd39ae7061cbe9008aa32f83284de8 --- /dev/null +++ b/b103d655-6661-4cbf-9a31-c9a704254b65.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f577dbf2f8ad6cf052e93b3cfa58af24565f9b67acdbd935ae494d52a151eefe +size 265115 diff --git a/b156ef88-a4b2-42e4-90b0-4f875c83eaa9.png b/b156ef88-a4b2-42e4-90b0-4f875c83eaa9.png new file mode 100644 index 0000000000000000000000000000000000000000..fefe2f726c96caed8ceab49cde2c14cbb9dbb03e --- /dev/null +++ b/b156ef88-a4b2-42e4-90b0-4f875c83eaa9.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8c3d6b0058e3372aaf13d2c6a18fe34975fd831c1050fbb0d79bbb09063758b +size 266284 diff --git a/b9375bbe-f997-4040-bc9e-c66f7976ca9e.png b/b9375bbe-f997-4040-bc9e-c66f7976ca9e.png new file mode 100644 index 0000000000000000000000000000000000000000..5274a71aad420b625797fc521e3964dc5d603055 --- /dev/null +++ b/b9375bbe-f997-4040-bc9e-c66f7976ca9e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f55b9db1c9005478d78263c77d6b5df2edc3b0b3fc8f71b3d9d14b96c5b48332 +size 164234 diff --git a/b9686337-60c3-4578-9b2b-535bae1d7e8d.png b/b9686337-60c3-4578-9b2b-535bae1d7e8d.png new file mode 100644 index 0000000000000000000000000000000000000000..b5b4e5b16072960a1c56f7e108c556cb2917ae5f --- /dev/null +++ b/b9686337-60c3-4578-9b2b-535bae1d7e8d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2581b500355ab07bfc80a9c1863deb518a9d977cef7f4966c24bd02f9fb25a8 +size 348682 diff --git a/bc6614fd-65d8-4d72-82dc-dc357323191d.png b/bc6614fd-65d8-4d72-82dc-dc357323191d.png new file mode 100644 index 0000000000000000000000000000000000000000..4433fd90f9e34460fdb286a3875ba739cd2b3fc2 --- /dev/null +++ b/bc6614fd-65d8-4d72-82dc-dc357323191d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bfa78b55c40c9c8b5d194eaf04abb26c52ff6e8280ef2745c5cf73e56a8a546 +size 313166 diff --git a/bed002a1-e7e5-44c1-a765-e9e252339d80.png b/bed002a1-e7e5-44c1-a765-e9e252339d80.png new file mode 100644 index 0000000000000000000000000000000000000000..ee6d2780e18e3460089cb61f0101755494041886 --- /dev/null +++ b/bed002a1-e7e5-44c1-a765-e9e252339d80.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5eddb290871fcbaf9f392fc71399c28e604b5b7a243dea58a49c283d55d4c21 +size 31550 diff --git a/bfb4b3a4-361f-4135-a7ab-22cb16c7228c.png b/bfb4b3a4-361f-4135-a7ab-22cb16c7228c.png new file mode 100644 index 0000000000000000000000000000000000000000..aee11d4a7bbfa5b22d57e5fbe11b7645dfe5ff4c --- /dev/null +++ b/bfb4b3a4-361f-4135-a7ab-22cb16c7228c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51e46c5a3fd83c5b50399087576fb691b9844efd0bc3307633dd1c59ef37b9a2 +size 74173 diff --git a/c0d26ca1-2db5-48a1-a35b-aed6b30146f5.png b/c0d26ca1-2db5-48a1-a35b-aed6b30146f5.png new file mode 100644 index 0000000000000000000000000000000000000000..0501bffab777f01abaac44e0a6da64eaee2d7b64 --- /dev/null +++ b/c0d26ca1-2db5-48a1-a35b-aed6b30146f5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24242080c80f6af55936538a75f77f8de1d5be80b294554f0682ef29c63c2388 +size 231263 diff --git a/c1eefa8f-efb9-4e07-91fa-5dbd3d60328e.png b/c1eefa8f-efb9-4e07-91fa-5dbd3d60328e.png new file mode 100644 index 0000000000000000000000000000000000000000..88c4fe6fcd0833e544d120ad2e24723932bb7a17 --- /dev/null +++ b/c1eefa8f-efb9-4e07-91fa-5dbd3d60328e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d12346dd30235ed954d914c705e50b1e75f8822620bcc6eaaf17c22d51ea54b1 +size 129812 diff --git a/c406a13e-d7de-4127-8a56-61c3c4b01272.png b/c406a13e-d7de-4127-8a56-61c3c4b01272.png new file mode 100644 index 0000000000000000000000000000000000000000..b1c37eb2deee82747cf9fcb9006d0258a6e5ce6f --- /dev/null +++ b/c406a13e-d7de-4127-8a56-61c3c4b01272.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db03fe4eac55ef53c75176e9ec3b3b04f08ee8c2b90009fecc2000c9887412f8 +size 269202 diff --git a/c5fba16f-618d-470f-ae4a-101907caecfb.png b/c5fba16f-618d-470f-ae4a-101907caecfb.png new file mode 100644 index 0000000000000000000000000000000000000000..f13622d964638e799fa54433bff300c8953f218a --- /dev/null +++ b/c5fba16f-618d-470f-ae4a-101907caecfb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:782a42377fb8bb90f1349465f36b1e853d8d6d3a0a10dd02a982c60c0921ffd4 +size 264267 diff --git a/c7b7070e-17e8-4b79-bd75-3a38bedd3310.png b/c7b7070e-17e8-4b79-bd75-3a38bedd3310.png new file mode 100644 index 0000000000000000000000000000000000000000..665c03587ee2c46e3d6001285a9cfb489f082c2d --- /dev/null +++ b/c7b7070e-17e8-4b79-bd75-3a38bedd3310.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de7cd6cebdce5ef9a0a1b0aadb01d18a782ab3e1c6ccdbd77af9c8ce05906b17 +size 176218 diff --git a/c86e1cf6-9dda-492d-ac09-9eee2c2c2fa2.png b/c86e1cf6-9dda-492d-ac09-9eee2c2c2fa2.png new file mode 100644 index 0000000000000000000000000000000000000000..5d0552fa38403be26f0ed71e11b8450edc70d893 --- /dev/null +++ b/c86e1cf6-9dda-492d-ac09-9eee2c2c2fa2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1dcd2dc826e54842a51f0cc1f180e3abcc40b3b0b26e8f707e33826a54b23fa +size 294839 diff --git a/c9ab96a9-96d0-466a-a41e-132b7c3246af.png b/c9ab96a9-96d0-466a-a41e-132b7c3246af.png new file mode 100644 index 0000000000000000000000000000000000000000..82ae94bbdd370703d7f34c8de17585ab2d0faf19 --- /dev/null +++ b/c9ab96a9-96d0-466a-a41e-132b7c3246af.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2038de49e468861ce6c563da1f231f332e48e64aacc00c984953657a16511cf1 +size 291678 diff --git a/ca285420-b552-4545-9c07-68d00d2865ae.png b/ca285420-b552-4545-9c07-68d00d2865ae.png new file mode 100644 index 0000000000000000000000000000000000000000..31c28ae6f7926a24b14070fe102aa21231c60c3b --- /dev/null +++ b/ca285420-b552-4545-9c07-68d00d2865ae.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19b579250c0b6dffd3373916427cd93af91d206e290240f0a4a66b7051d24794 +size 244977 diff --git a/caf77f22-f58a-4689-8ffe-74b0c4de581c.png b/caf77f22-f58a-4689-8ffe-74b0c4de581c.png new file mode 100644 index 0000000000000000000000000000000000000000..656e87d2c3f5e322804b1a4fc1a2634c5cda7ab6 --- /dev/null +++ b/caf77f22-f58a-4689-8ffe-74b0c4de581c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc64c19f2e1ff0423b7224f7cbb5faeec4b9cb9cb637610f5ddfc7761b17fd48 +size 325864 diff --git a/cd9112a5-6c9e-4fa3-bfd8-e4ba87eec0f7.png b/cd9112a5-6c9e-4fa3-bfd8-e4ba87eec0f7.png new file mode 100644 index 0000000000000000000000000000000000000000..8f8fd02ead0654b1ce2bbc03b918d6b751c86e9e --- /dev/null +++ b/cd9112a5-6c9e-4fa3-bfd8-e4ba87eec0f7.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff8602fe651a9f3a54f971a093500661bd92e463d7e2e07613d4fcae760b78fe +size 233875 diff --git a/d0fe7235-6564-43f4-8c27-dd84a8bcf4ee.png b/d0fe7235-6564-43f4-8c27-dd84a8bcf4ee.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c2eb74343188ba590dcec79c722d4cd8325d4f --- /dev/null +++ b/d0fe7235-6564-43f4-8c27-dd84a8bcf4ee.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f50d3533ee4dc217585fdb89bcd4117acdf64646725d1f75176a4cbc9704fc95 +size 137617 diff --git a/d8efacfe-8c59-49c8-9202-a941c227e8e0.png b/d8efacfe-8c59-49c8-9202-a941c227e8e0.png new file mode 100644 index 0000000000000000000000000000000000000000..6fb860c8ec737675c1337b7a3a6d61535acd922b --- /dev/null +++ b/d8efacfe-8c59-49c8-9202-a941c227e8e0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:846d9607a58b2acdad2c2dcaae3f04b690977785155d4525cb1367c384f2305a +size 125811 diff --git a/daadd15b-52b4-47b7-b0cf-cffbdc8d7947.png b/daadd15b-52b4-47b7-b0cf-cffbdc8d7947.png new file mode 100644 index 0000000000000000000000000000000000000000..a1098ec9c1725f13316816d7e0f78f562f6555ae --- /dev/null +++ b/daadd15b-52b4-47b7-b0cf-cffbdc8d7947.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e3dddded88ba998c7521cd17959027360077c17777572250c22c7fd25866079 +size 297380 diff --git a/db4d9efa-26ca-4524-85de-fa87a1164b97.png b/db4d9efa-26ca-4524-85de-fa87a1164b97.png new file mode 100644 index 0000000000000000000000000000000000000000..d0928ea30d093ed6297dccd9121057d92715c218 --- /dev/null +++ b/db4d9efa-26ca-4524-85de-fa87a1164b97.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61b434c555d4aad7716eda4fd3a015acfa33d413a9b63d42ac294c4c90013120 +size 242965 diff --git a/dc7a9ebd-a7c7-4a73-9a6a-29bca3c6164c.png b/dc7a9ebd-a7c7-4a73-9a6a-29bca3c6164c.png new file mode 100644 index 0000000000000000000000000000000000000000..76f2366afc12b0192c3479cb9c4fc1350c522137 --- /dev/null +++ b/dc7a9ebd-a7c7-4a73-9a6a-29bca3c6164c.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b68f8f1352fff19b687f0fe50334dac41d655b52524ff3bee230e5e06004a77 +size 248945 diff --git a/df40d779-49e7-4e43-a344-7543c2520799.png b/df40d779-49e7-4e43-a344-7543c2520799.png new file mode 100644 index 0000000000000000000000000000000000000000..3fab98164d536b43cf5f74ead1492a9b2b9b682e --- /dev/null +++ b/df40d779-49e7-4e43-a344-7543c2520799.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b6fc22c503bce02cca470e4f338f1496374b1bf8fb6bc9e5a58ea9cce937b72 +size 162641 diff --git a/e34ec6d9-73c5-4da0-8b63-a51f3d674d07.png b/e34ec6d9-73c5-4da0-8b63-a51f3d674d07.png new file mode 100644 index 0000000000000000000000000000000000000000..6df088e8dfb8ef9ea5280a0fe376adedbb61e176 --- /dev/null +++ b/e34ec6d9-73c5-4da0-8b63-a51f3d674d07.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e543abf0938741319d66150ab65581194c797b0b23822cc3a9d5deaf8bd9558 +size 7446 diff --git a/e429fb50-e460-436d-b44b-220fefcde069.png b/e429fb50-e460-436d-b44b-220fefcde069.png new file mode 100644 index 0000000000000000000000000000000000000000..87d24a4a9162ca000d48515cd66fc44960678559 --- /dev/null +++ b/e429fb50-e460-436d-b44b-220fefcde069.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ce546fe31e1fd2fac8c8650545b4522ffb9867bf59628f00046f2b1ac83c2a6 +size 404578 diff --git a/e470ac8d-d10b-4426-8c7e-8253d24afbcb.png b/e470ac8d-d10b-4426-8c7e-8253d24afbcb.png new file mode 100644 index 0000000000000000000000000000000000000000..34496a5212c74d7b0183179ff2aead594292e01a --- /dev/null +++ b/e470ac8d-d10b-4426-8c7e-8253d24afbcb.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dacbdd01b357c33d01eb5c558389fc40ca315530182433854bb5d6c4f9ceaaf +size 319274 diff --git a/ea911fb0-135c-4e30-af8b-84c6035ad0a0.png b/ea911fb0-135c-4e30-af8b-84c6035ad0a0.png new file mode 100644 index 0000000000000000000000000000000000000000..65ad48ede90b23fb9917709a9a8ce79a874d11ee --- /dev/null +++ b/ea911fb0-135c-4e30-af8b-84c6035ad0a0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:533c10d77af3c1c2f7a2b443efa05ec34f61a170f0b16e242873f0525564b2e4 +size 298623 diff --git a/f2a85140-ca10-45d4-bf96-1b5c3b9ee79e.png b/f2a85140-ca10-45d4-bf96-1b5c3b9ee79e.png new file mode 100644 index 0000000000000000000000000000000000000000..27dafe285587350daf6fe938729c9c77cfdc58dd --- /dev/null +++ b/f2a85140-ca10-45d4-bf96-1b5c3b9ee79e.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24c9e735e9f6a26ac5e0a6fe844a346d190f7ac3f550f4fb6b062367a33d1bbf +size 25604 diff --git a/f45ae49f-0150-4b4d-bc49-dcde3a153dae.png b/f45ae49f-0150-4b4d-bc49-dcde3a153dae.png new file mode 100644 index 0000000000000000000000000000000000000000..95a5db1de51ad33787276c43d52dee773cb7b448 --- /dev/null +++ b/f45ae49f-0150-4b4d-bc49-dcde3a153dae.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c9068552932587688515f49a66d0d9965900ae719654261135319d1421188d3 +size 260407 diff --git a/f5930a98-a686-465e-8fa5-868fb668ec6b.png b/f5930a98-a686-465e-8fa5-868fb668ec6b.png new file mode 100644 index 0000000000000000000000000000000000000000..3e081db6ab38e5d2428d5fbf23df1e58da6a5187 --- /dev/null +++ b/f5930a98-a686-465e-8fa5-868fb668ec6b.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8536383ee0576c21087ecda6728d02c276eb0042803a4a16ee1e6939032825d1 +size 84811 diff --git a/f5d876a5-9c93-471c-bcbe-f1dd88d681f5.png b/f5d876a5-9c93-471c-bcbe-f1dd88d681f5.png new file mode 100644 index 0000000000000000000000000000000000000000..25b2064d2ca56a6482fc377a07198be6dcb41586 --- /dev/null +++ b/f5d876a5-9c93-471c-bcbe-f1dd88d681f5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65ebd00f2f3f6b648641386fd237949aadaca2a6c4ecc93e94df1f52f52a2d2a +size 39197 diff --git a/f6c28d56-6e27-4bed-9ba8-7a2d3696559d.png b/f6c28d56-6e27-4bed-9ba8-7a2d3696559d.png new file mode 100644 index 0000000000000000000000000000000000000000..03a8809931018608351386935d86048881891749 --- /dev/null +++ b/f6c28d56-6e27-4bed-9ba8-7a2d3696559d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd821ce0218c4464c322af9288ed60a28e00042532ffa56b08547126dabba8ce +size 14403 diff --git a/f73d883d-850d-49a2-a2de-d7a6805a5369.png b/f73d883d-850d-49a2-a2de-d7a6805a5369.png new file mode 100644 index 0000000000000000000000000000000000000000..4a32ebdb2bb068fa9cbb3de7db83ee6808f761f8 --- /dev/null +++ b/f73d883d-850d-49a2-a2de-d7a6805a5369.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4c9f0f51d7ed208dcb7cf7468097f510d351b5662bb247312c27c7322ad7104 +size 437509 diff --git a/faff5031-e675-45d2-8be6-a9084ff4cfbd.png b/faff5031-e675-45d2-8be6-a9084ff4cfbd.png new file mode 100644 index 0000000000000000000000000000000000000000..bc25c100bd7a9c884d042781c4355a95afca07c3 --- /dev/null +++ b/faff5031-e675-45d2-8be6-a9084ff4cfbd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f33fe951b8f4d4067e8979842bf0683f34a979f8834dc1d21f8436597aeb573 +size 297551 diff --git a/fb4eecb6-d407-454d-8852-cd1315606c8d.png b/fb4eecb6-d407-454d-8852-cd1315606c8d.png new file mode 100644 index 0000000000000000000000000000000000000000..818a0f67c46ab33f6bf98a2fd2c90b310ef4ed66 --- /dev/null +++ b/fb4eecb6-d407-454d-8852-cd1315606c8d.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48aaf07328c117f592e01fd0bb64114e25a53c276871fe5420aa1568d7bb1369 +size 37751 diff --git a/metadata.jsonl b/metadata.jsonl index e023bc6f3cf2164a549bba414eba7c5e7d2fcd7a..8acf60a0e52a3f31bc87f95ff68fb10aa254135e 100644 --- a/metadata.jsonl +++ b/metadata.jsonl @@ -141,3 +141,108 @@ {"file_name": "7591c83b-c6b6-4bd4-9af0-b727942431c1.png", "code": "from data_utils import extract_archive\r\nfrom dotenv import load_dotenv\r\nimport os\r\n\r\n\r\nload_dotenv()\r\n\r\nDOWNLOAD_PATH: str = os.environ[\"DOWNLOAD_PATH\"]\r\nEXTRACT_PATH: str = os.environ[\"EXTRACT_PATH\"]\r\nARCHIVE_NAME: str = \"archive (2).zip\"\r\n\r\nextract_archive(\r\n archive_path=DOWNLOAD_PATH, \r\n archive_name=ARCHIVE_NAME, \r\n extract_path=EXTRACT_PATH\r\n)\r\n\r\n"} {"file_name": "f438116f-9cf4-439b-a79d-b4a49ea84d76.png", "code": "import torch\r\nimport torchvision.transforms as transforms\r\nfrom PIL import Image\r\n\r\n\r\ndef print_examples(model, device, dataset):\r\n transform = transforms.Compose(\r\n [\r\n transforms.Resize((299, 299)),\r\n transforms.ToTensor(),\r\n transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),\r\n ]\r\n )\r\n\r\n model.eval()\r\n test_img1 = transform(Image.open(\"test_examples/dog.jpg\").convert(\"RGB\")).unsqueeze(\r\n 0\r\n )\r\n print(\"Example 1 CORRECT: Dog on a beach by the ocean\")\r\n print(\r\n \"Example 1 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img1.to(device), dataset.vocabulary))\r\n )\r\n test_img2 = transform(\r\n Image.open(\"test_examples/child.jpg\").convert(\"RGB\")\r\n ).unsqueeze(0)\r\n print(\"Example 2 CORRECT: Child holding red frisbee outdoors\")\r\n print(\r\n \"Example 2 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img2.to(device), dataset.vocabulary))\r\n )\r\n test_img3 = transform(Image.open(\"test_examples/bus.png\").convert(\"RGB\")).unsqueeze(\r\n 0\r\n )\r\n print(\"Example 3 CORRECT: Bus driving by parked cars\")\r\n print(\r\n \"Example 3 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img3.to(device), dataset.vocabulary))\r\n )\r\n test_img4 = transform(\r\n"} {"file_name": "8ab6a8f3-a4e2-4e36-8b83-c19528cbcef5.png", "code": "import torch\r\nfrom tqdm import tqdm\r\nfrom torch.nn import CrossEntropyLoss\r\nfrom torch import optim\r\nfrom torchvision.transforms import Compose, Resize, RandomCrop, ToTensor, Normalize\r\nfrom torch.utils.tensorboard import SummaryWriter\r\nfrom utils import save_checkpoint, load_checkpoint, print_examples\r\nfrom create_dataset import get_loader\r\nfrom model import CNNToRNN\r\n\r\n\r\ndef train():\r\n transforms = Compose(\r\n [\r\n Resize((356, 356)),\r\n RandomCrop((299, 299)),\r\n ToTensor(),\r\n Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),\r\n ]\r\n )\r\n\r\n train_loader, dataset = get_loader(\r\n images_dir=\"raw-data/Images\",\r\n captions_file=\"raw-data/captions.txt\",\r\n transforms=transforms,\r\n num_workers=2,\r\n )\r\n\r\n torch.backends.cudnn.benchmark = True\r\n device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\r\n load_model = False\r\n save_model = False\r\n train_CNN = False\r\n\r\n # Hyperparameters\r\n embed_size = 256\r\n hidden_size = 256\r\n vocab_size = len(dataset.vocabulary)\r\n num_layers = 1\r\n learning_rate = 3e-4\r\n"} +{"file_name": "093c67de-dbc4-4921-bc66-17c94b854eec.png", "code": "from selenium import webdriver\r\nfrom selenium.webdriver.common.keys import Keys\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium.webdriver.chrome.service import Service as ChromeService\r\nfrom webdriver_manager.chrome import ChromeDriverManager\r\nfrom selenium.webdriver.chrome.options import Options\r\ni\r\n\r\noptions = Options()\r\noptions.add_argument(\"--headless=new\")\r\ndriver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=options)\r\ndriver.get(\"https://leetcode.com/problems/remove-linked-list-elements\")\r\nparagraphs = driver.find_elements(By.TAG_NAME, \"p\")\r\nprint(paragraphs)\r\ndriver.quit()"} +{"file_name": "faff5031-e675-45d2-8be6-a9084ff4cfbd.png", "code": "from youtube import YouTube\r\nfrom youtube.models import Search\r\nfrom youtube.schemas import (\r\n YouTubeRequest, YouTubeListResponse, YouTubeResponse,\r\n SearchFilter, SearchOptionalParameters, SearchPart\r\n)\r\nfrom typing import Iterator\r\n\r\n\r\nclient_secrets_file = \"/home/lyle/oryks/backend/api/libraries/youtube.json\"\r\ndef get_youtube_client(client_secrets_file: str = client_secrets_file) -> YouTube:\r\n youtube: YouTube = YouTube(client_secret_file=client_secrets_file)\r\n client = youtube.authenticate()\r\n youtube.youtube_client = client\r\n return youtube\r\n\r\nyoutube: YouTube = get_youtube_client(client_secrets_file=\"/home/lyle/Downloads/test.json\")\r\n\r\n\r\n# query: str = ''\r\n# part: SearchPart = SearchPart()\r\n# optional_parameters: SearchOptionalParameters = SearchOptionalParameters(\r\n# q=query,\r\n# type=['video'],\r\n# channelId=\"UCtAcpQcYerN8xxZJYTfWBMw\"\r\n# )\r\n# search_request: YouTubeRequest = YouTubeRequest(\r\n# part=part, \r\n# optional_parameters=optional_parameters\r\n# )\r\n# search_results: YouTubeResponse = youtube.search(search_request)\r\n# search_iterator: Iterator = youtube.get_search_iterator(search_request)\r\n# # res: YouTubeResponse = youtube.find_channel_by_name(display_name=\"Umar Jamil\")\r\n# # print(res.items[0])\r\n# res = next(search_iterator)\r\n# final = []\r\n# for x in search_iterator:\r\n# for search in x:\r\n# final.append(\r\n# dict(\r\n"} +{"file_name": "f2a85140-ca10-45d4-bf96-1b5c3b9ee79e.png", "code": "# id=search.resource_id,\r\n# title=search.title\r\n# )\r\n# )\r\n# print(final) "} +{"file_name": "ea911fb0-135c-4e30-af8b-84c6035ad0a0.png", "code": "from langchain_community.document_loaders.generic import GenericLoader\r\nfrom langchain_community.document_loaders.parsers import OpenAIWhisperParser\r\nfrom langchain_community.document_loaders.blob_loaders.youtube_audio import (\r\n YoutubeAudioLoader,\r\n)\r\nfrom langchain_core.documents import Document\r\nfrom os import path\r\n\r\n# Two Karpathy lecture videos\r\nurls = [\"https://www.youtube.com/watch?v=altvPR7x9IA\"]\r\n\r\n# Directory to save audio files\r\ndata_dir = \"data\"\r\nvideo_data_dir = \"video\"\r\ntranscribed_data = \"transcriptions\"\r\nvideo_title = \"sample\"\r\nsave_video_dir = path.join(data_dir, video_data_dir, video_title)\r\nsave_transcript_dir = path.join(data_dir, transcribed_data, video_title + \".txt\")\r\n\r\napi_key: str = \"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\"\r\n\r\nloader = GenericLoader(\r\n YoutubeAudioLoader(urls, save_video_dir), OpenAIWhisperParser(api_key=api_key)\r\n)\r\ndocs = loader.load()\r\n\r\nfull_transcript = \"\"\r\nfor doc in docs:\r\n full_transcript += doc.page_content\r\n\r\nwith open(save_transcript_dir, \"w\", encoding=\"utf-8\") as f:\r\n f.write(full_transcript)\r\n\r\nprint(full_transcript)\r\n\r\n\r\ndef transcribe_video(video_id: str, save_video_dir: str, api_key: str) -> str:\r\n url: str = f\"https://www.youtube.com/watch?v={video_id}\"\r\n loader: GenericLoader = GenericLoader(\r\n YoutubeAudioLoader([url], save_video_dir), OpenAIWhisperParser(api_key=api_key)\r\n"} +{"file_name": "d8efacfe-8c59-49c8-9202-a941c227e8e0.png", "code": " )\r\n documents: list[Document] = loader.load()\r\n full_transcript: str = \"\"\r\n for document in documents:\r\n full_transcript += document.page_content\r\n return full_transcript\r\n\r\ndef analayze_video(video_transcript: str):\r\n \"\"\"Break a video into the slide components.\r\n \r\n The video is to be broken down into:\r\n 1. The Cover - summary details about this video\r\n 2. Index - a shortcut to other slides\r\n 3. The slides\r\n \r\n The cover\r\n ---------\r\n Contains the video name and channel presenting the video\r\n \r\n Index\r\n -----\r\n Contains links to the other slides and their titles\r\n \r\n The slides\r\n -----------\r\n Consist of the slide title and a bullet of points\r\n \"\"\"\r\n pass\r\n"} +{"file_name": "1c1bf83e-9cf8-4437-bf51-708e6d0cfa08.png", "code": "from dotenv import load_dotenv\r\nload_dotenv()\r\nfrom flask.cli import FlaskGroup\r\nfrom api import create_app\r\n\r\napp = create_app()\r\ncli = FlaskGroup(create_app=create_app)\r\n\r\n\r\n\r\nif __name__ == \"__main__\":\r\n cli()"} +{"file_name": "0f74aa54-c2e0-4571-8110-aefecc8618e2.png", "code": "from dotenv import load_dotenv\r\nload_dotenv()\r\nfrom flask.cli import FlaskGroup\r\nfrom api import create_app\r\n\r\napp = create_app()\r\ncli = FlaskGroup(create_app=create_app)\r\n\r\n\r\n\r\nif __name__ == \"__main__\":\r\n cli()"} +{"file_name": "fb4eecb6-d407-454d-8852-cd1315606c8d.png", "code": "import whisper\r\n\r\nmodel = whisper.load_model(\"medium.en\")\r\nresult = model.transcribe(\"code.wav\")\r\nprint(result[\"text\"])"} +{"file_name": "754b9c53-79e7-494f-9b56-10e413e326a5.png", "code": "from zipfile import ZipFile\r\nfrom os import path, mkdir\r\nimport os\r\n\r\n\r\ndef download_data():\r\n pass\r\n\r\n\r\ndef extract_archive(archive_path: str, archive_name: str, extract_path: str = None) -> None:\r\n if not extract_path:\r\n extract_path: str = \"raw-data\"\r\n if not path.exists(extract_path):\r\n mkdir(extract_path)\r\n archive_path: str = path.join(archive_path, archive_name)\r\n with ZipFile(file=archive_path, mode=\"r\") as z_object:\r\n z_object.extractall(path=extract_path)\r\n \r\n "} +{"file_name": "39958705-bbd3-4c03-b36f-bd418711b914.png", "code": "from data_utils import extract_archive\r\nfrom dotenv import load_dotenv\r\nimport os\r\n\r\n\r\nload_dotenv()\r\n\r\nDOWNLOAD_PATH: str = os.environ[\"DOWNLOAD_PATH\"]\r\nEXTRACT_PATH: str = os.environ[\"EXTRACT_PATH\"]\r\nARCHIVE_NAME: str = \"archive (2).zip\"\r\n\r\nextract_archive(\r\n archive_path=DOWNLOAD_PATH, \r\n archive_name=ARCHIVE_NAME, \r\n extract_path=EXTRACT_PATH\r\n)\r\n\r\n"} +{"file_name": "25f70d5a-6dc7-4e26-b18a-2ab68df896d7.png", "code": "import torch\r\nimport torchvision.transforms as transforms\r\nfrom PIL import Image\r\n\r\n\r\ndef print_examples(model, device, dataset):\r\n transform = transforms.Compose(\r\n [\r\n transforms.Resize((299, 299)),\r\n transforms.ToTensor(),\r\n transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),\r\n ]\r\n )\r\n\r\n model.eval()\r\n test_img1 = transform(Image.open(\"test_examples/dog.jpg\").convert(\"RGB\")).unsqueeze(\r\n 0\r\n )\r\n print(\"Example 1 CORRECT: Dog on a beach by the ocean\")\r\n print(\r\n \"Example 1 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img1.to(device), dataset.vocabulary))\r\n )\r\n test_img2 = transform(\r\n Image.open(\"test_examples/child.jpg\").convert(\"RGB\")\r\n ).unsqueeze(0)\r\n print(\"Example 2 CORRECT: Child holding red frisbee outdoors\")\r\n print(\r\n \"Example 2 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img2.to(device), dataset.vocabulary))\r\n )\r\n test_img3 = transform(Image.open(\"test_examples/bus.png\").convert(\"RGB\")).unsqueeze(\r\n 0\r\n )\r\n print(\"Example 3 CORRECT: Bus driving by parked cars\")\r\n print(\r\n \"Example 3 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img3.to(device), dataset.vocabulary))\r\n )\r\n test_img4 = transform(\r\n"} +{"file_name": "c0d26ca1-2db5-48a1-a35b-aed6b30146f5.png", "code": " Image.open(\"test_examples/boat.png\").convert(\"RGB\")\r\n ).unsqueeze(0)\r\n print(\"Example 4 CORRECT: A small boat in the ocean\")\r\n print(\r\n \"Example 4 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img4.to(device), dataset.vocabulary))\r\n )\r\n test_img5 = transform(\r\n Image.open(\"test_examples/horse.png\").convert(\"RGB\")\r\n ).unsqueeze(0)\r\n print(\"Example 5 CORRECT: A cowboy riding a horse in the desert\")\r\n print(\r\n \"Example 5 OUTPUT: \"\r\n + \" \".join(model.caption_image(test_img5.to(device), dataset.vocabulary))\r\n )\r\n model.train()\r\n\r\n\r\ndef save_checkpoint(state, filename=\"my_checkpoint.pth.tar\"):\r\n print(\"=> Saving checkpoint\")\r\n torch.save(state, filename)\r\n\r\n\r\ndef load_checkpoint(checkpoint, model, optimizer):\r\n print(\"=> Loading checkpoint\")\r\n model.load_state_dict(checkpoint[\"state_dict\"])\r\n optimizer.load_state_dict(checkpoint[\"optimizer\"])\r\n step = checkpoint[\"step\"]\r\n return step"} +{"file_name": "0223dd9e-0445-4b5f-82c5-a76be3cf5892.png", "code": "import torch\r\nfrom tqdm import tqdm\r\nfrom torch.nn import CrossEntropyLoss\r\nfrom torch import optim\r\nfrom torchvision.transforms import Compose, Resize, RandomCrop, ToTensor, Normalize\r\nfrom torch.utils.tensorboard import SummaryWriter\r\nfrom utils import save_checkpoint, load_checkpoint, print_examples\r\nfrom create_dataset import get_loader\r\nfrom model import CNNToRNN\r\n\r\n\r\ndef train():\r\n transforms = Compose(\r\n [\r\n Resize((356, 356)),\r\n RandomCrop((299, 299)),\r\n ToTensor(),\r\n Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),\r\n ]\r\n )\r\n\r\n train_loader, dataset = get_loader(\r\n images_dir=\"raw-data/Images\",\r\n captions_file=\"raw-data/captions.txt\",\r\n transforms=transforms,\r\n num_workers=2,\r\n )\r\n\r\n torch.backends.cudnn.benchmark = True\r\n device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\r\n load_model = False\r\n save_model = False\r\n train_CNN = False\r\n\r\n # Hyperparameters\r\n embed_size = 256\r\n hidden_size = 256\r\n vocab_size = len(dataset.vocabulary)\r\n num_layers = 1\r\n learning_rate = 3e-4\r\n"} +{"file_name": "c5fba16f-618d-470f-ae4a-101907caecfb.png", "code": " num_epochs = 100\r\n\r\n # for tensorboard\r\n writer = SummaryWriter(\"runs/flickr\")\r\n step = 0\r\n\r\n # initialize model, loss etc\r\n model = CNNToRNN(embed_size, hidden_size, vocab_size, num_layers).to(device)\r\n criterion = CrossEntropyLoss(ignore_index=dataset.vocabulary.stoi[\"\"])\r\n optimizer = optim.Adam(model.parameters(), lr=learning_rate)\r\n\r\n # Only finetune the CNN\r\n for name, param in model.encoder_cnn.inception.named_parameters():\r\n if \"fc.weight\" in name or \"fc.bias\" in name:\r\n param.requires_grad = True\r\n else:\r\n param.requires_grad = False\r\n\r\n if load_model:\r\n step = load_checkpoint(torch.load(\"my_checkpoint.pth.tar\"), model, optimizer)\r\n\r\n model.train()\r\n\r\n for epoch in range(num_epochs):\r\n # Uncomment the line below to see a couple of test cases\r\n print_examples(model, device, dataset)\r\n\r\n if save_model:\r\n checkpoint = {\r\n \"state_dict\": model.state_dict(),\r\n \"optimizer\": optimizer.state_dict(),\r\n \"step\": step,\r\n }\r\n save_checkpoint(checkpoint)\r\n\r\n for idx, (imgs, captions) in tqdm(\r\n enumerate(train_loader), total=len(train_loader), leave=False\r\n ):\r\n imgs = imgs.to(device)\r\n captions = captions.to(device)\r\n"} +{"file_name": "bfb4b3a4-361f-4135-a7ab-22cb16c7228c.png", "code": "\r\n outputs = model(imgs, captions[:-1])\r\n loss = criterion(\r\n outputs.reshape(-1, outputs.shape[2]), captions.reshape(-1)\r\n )\r\n\r\n writer.add_scalar(\"Training loss\", loss.item(), global_step=step)\r\n step += 1\r\n\r\n optimizer.zero_grad()\r\n loss.backward(loss)\r\n optimizer.step()\r\n\r\n\r\nif __name__ == \"__main__\":\r\n train()"} +{"file_name": "bc6614fd-65d8-4d72-82dc-dc357323191d.png", "code": "from create_dataset import dataloader, FlickrDataset, Dataset\r\nfrom torchvision.transforms import Compose, ToTensor, Resize\r\nfrom model import EncoderCNN, DecoderRNN, CNNToRNN\r\nfrom torch.nn import Module\r\nimport torch\r\nfrom PIL import Image\r\n\r\nembed_size: int = 256\r\nhidden_size: int = 256\r\nnum_layers: int = 3\r\nvocab_size: int = 2994\r\n\r\nencoder: Module = EncoderCNN(embed_size=embed_size)\r\ndecoder: Module = DecoderRNN(embed_size=embed_size, hidden_size=hidden_size, vocab_size=vocab_size, \r\n num_layers=num_layers)\r\nmodel: Module = CNNToRNN(embed_size=embed_size, hidden_size=hidden_size, vocab_size=vocab_size, \r\n num_layers=num_layers)\r\n\r\n\r\nfor i, (images, captions) in enumerate(dataloader):\r\n print(images.shape)\r\n print(captions.shape)\r\n break\r\n# print(captions)\r\n\r\ndataset: Dataset = FlickrDataset(\r\n images_dir=\"raw-data/Images\", \r\n captions_file=\"raw-data/captions.txt\", \r\n transforms=Compose([\r\n Resize((299, 299)),\r\n ToTensor()\r\n ]))\r\n \r\n# features = encoder(images)\r\n# print(features.shape)\r\n# print(features.unsqueeze(0).shape)\r\n# embedings = decoder.embed(captions)\r\n# print(embedings.size())\r\n# x = torch.cat((features.unsqueeze(0), embedings), dim=0)\r\n# print(x.shape)\r\n"} +{"file_name": "df40d779-49e7-4e43-a344-7543c2520799.png", "code": "# hiddens, _ = decoder.lstm(x)\r\n# print(hiddens.shape)\r\n# output = decoder.linear(hiddens)\r\n# print(output.shape)\r\n# outputs = model(images, captions)\r\n# print(outputs.shape)\r\n\r\n# transforms=Compose([\r\n# Resize((299, 299)),\r\n# ToTensor()\r\n# ])\r\n# img_path = \"/home/lyle/oryks/finetune-image-captioning-model/raw-data/Images/667626_18933d713e.jpg\"\r\n# img = Image.open(img_path)\r\n# trans = transforms(img)\r\n# print(trans.unsqueeze(0).shape)\r\n# res = model.caption_image(image=trans.unsqueeze(0), vocabulary=dataset.vocabulary)\r\n"} +{"file_name": "808f9d41-dc8a-4f35-8550-f6fc7db84d6c.png", "code": "import os\r\nimport pandas as pd\r\nfrom spacy.lang.en import English\r\nimport torch\r\nfrom torch.nn.utils.rnn import pad_sequence\r\nfrom torch.utils.data import Dataset, DataLoader\r\nfrom PIL import Image\r\nfrom collections import defaultdict\r\nfrom torchvision.transforms import Compose, ToTensor, Resize\r\n\r\n\r\nnlp = English()\r\n# Create a Tokenizer with the default settings for English\r\n# including punctuation rules and exceptions\r\ntokenizer = nlp.tokenizer\r\n\r\ntransforms = Compose([\r\n ToTensor()\r\n])\r\n\r\nclass Vocabulary:\r\n def __init__(self, freq_threshold: int) -> None:\r\n self.freq_threshold: int = freq_threshold\r\n self.itos: dict[int, str] = {\r\n 0: \"\",\r\n 1: \"\",\r\n 2: \"\",\r\n 3: \"\"\r\n }\r\n self.stoi: dict[str, int] = self.invert_dict(self.itos)\r\n \r\n def __len__(self) -> int:\r\n return len(self.itos)\r\n \r\n @staticmethod\r\n def tokenize(text: str) -> list[str]:\r\n return [token.text.lower() for token in tokenizer(text)]\r\n \r\n @staticmethod\r\n def invert_dict(dct: dict) -> dict:\r\n"} +{"file_name": "c406a13e-d7de-4127-8a56-61c3c4b01272.png", "code": " inverted_dict: dict = {value: key for key, value in dct.items()}\r\n return inverted_dict\r\n \r\n def build_vocab(self, sentence_list: list[list[str]]) -> None:\r\n idx: int = max(self.itos.keys())\r\n word_frequencies: dict[str, int] = defaultdict(int)\r\n\r\n for sentence in sentence_list:\r\n for word in self.tokenize(sentence):\r\n word_frequencies[word] += 1\r\n if word not in self.stoi and word_frequencies[word] == self.freq_threshold:\r\n idx += 1\r\n self.stoi[word] = idx\r\n self.itos[idx] = word\r\n \r\n def numericalize(self, text: str) -> list[int]:\r\n tokenized_txt: list[str] = self.tokenize(text)\r\n \r\n return [\r\n self.stoi[token] if token in self.stoi else self.stoi[\"\"]\r\n for token in tokenized_txt\r\n ]\r\n \r\n def textualize(self, vector: list[int]) -> list[str]:\r\n return [\r\n self.itos[i.item()] if i.item() in self.itos else self.itos[3]\r\n for i in vector\r\n ]\r\n \r\n\r\n\r\nclass FlickrDataset(Dataset):\r\n def __init__(self, images_dir: str, captions_file: str, freq_threshold: int = 5, transforms = None) -> None:\r\n super().__init__()\r\n self.images_dir: str = images_dir\r\n self.df: pd.DataFrame = pd.read_csv(captions_file)\r\n self.transforms = transforms\r\n \r\n # Get the image, captions\r\n self.images: pd.Series = self.df[\"image\"]\r\n"} +{"file_name": "8d9aff23-9575-4df6-aa39-54eb480ddf6d.png", "code": " self.captions: pd.Series = self.df[\"caption\"]\r\n \r\n # Build vocabulary\r\n self.vocabulary: Vocabulary = Vocabulary(freq_threshold=freq_threshold)\r\n self.vocabulary.build_vocab(self.captions.tolist())\r\n \r\n def __len__(self) -> int:\r\n return len(self.df)\r\n \r\n def __getitem__(self, index: int) -> tuple[torch.Tensor, torch.Tensor]:\r\n caption: str = self.captions[index]\r\n img_id: str = self.images[index]\r\n \r\n image: Image = Image.open(os.path.join(self.images_dir, img_id)).convert(\"RGB\")\r\n if self.transforms:\r\n image = self.transforms(image)\r\n \r\n numericalized_caption: list[int] = [self.vocabulary.stoi[\"\"]]\r\n numericalized_caption += self.vocabulary.numericalize(caption)\r\n numericalized_caption.append(self.vocabulary.stoi[\"\"])\r\n \r\n return image, torch.tensor(numericalized_caption)\r\n \r\n\r\nclass MyCollate:\r\n def __init__(self, pad_idx: int) -> None:\r\n self.pad_idx: int = pad_idx\r\n \r\n def __call__(self, batch: tuple[torch.Tensor, torch.Tensor]) -> tuple[torch.Tensor, torch.Tensor]:\r\n imgs = [item[0].unsqueeze(dim=0) for item in batch]\r\n imgs = torch.cat(tensors=imgs, dim=0)\r\n targets = [item[1] for item in batch]\r\n targets = pad_sequence(sequences=targets, batch_first=False, padding_value=self.pad_idx)\r\n \r\n return imgs, targets\r\n \r\n \r\ndef get_loader(\r\n images_dir: str,\r\n captions_file: str,\r\n"} +{"file_name": "c9ab96a9-96d0-466a-a41e-132b7c3246af.png", "code": " transforms,\r\n batch_size: int = 8,\r\n num_workers: int = 2,\r\n shuffle: bool = True,\r\n pin_memory: bool = True,\r\n ) -> DataLoader:\r\n dataset: Dataset = FlickrDataset(images_dir=images_dir, captions_file=captions_file, transforms=transforms)\r\n pad_idx: int = dataset.vocabulary.stoi[\"\"]\r\n loader: DataLoader = DataLoader(\r\n dataset=dataset, \r\n batch_size=batch_size, \r\n shuffle=shuffle, \r\n num_workers=num_workers, \r\n pin_memory=pin_memory, \r\n collate_fn=MyCollate(pad_idx=pad_idx)\r\n )\r\n return loader, dataset\r\n\r\n\r\ndataloader: DataLoader = get_loader(\r\n images_dir=\"raw-data/Images\",\r\n captions_file=\"raw-data/captions.txt\",\r\n transforms=Compose([\r\n Resize((299, 299)),\r\n ToTensor()\r\n ])\r\n)\r\n\r\n# for i, (images, captions) in enumerate(dataloader):\r\n# print(images.shape)\r\n# print(captions.shape)\r\n# break\r\n# print(captions[0])\r\n# dataset: Dataset = FlickrDataset(\r\n# images_dir=\"raw-data/Images\", \r\n# captions_file=\"raw-data/captions.txt\", \r\n# transforms=Compose([\r\n# Resize((224, 224)),\r\n# ToTensor()\r\n# ]))\r\n"} +{"file_name": "2d76ec47-24ba-4562-83e7-986514f002ee.png", "code": "# for caption in captions[:5]:\r\n# res = dataset.vocabulary.textualize(caption)\r\n# print(res)"} +{"file_name": "b9686337-60c3-4578-9b2b-535bae1d7e8d.png", "code": "from torch.nn import Module, Linear, ReLU, Embedding, LSTM, Dropout\r\nfrom torchvision.models import inception_v3, Inception_V3_Weights\r\nfrom torch import Tensor\r\nimport torch\r\n\r\n\r\nclass EncoderCNN(Module):\r\n def __init__(self, embed_size: int, train_cnn: bool = False, dropout: float = 0.5) -> None:\r\n super().__init__()\r\n self.train_cnn: bool = train_cnn\r\n self.inception = inception_v3(weights=Inception_V3_Weights.DEFAULT, aux_logits=True)\r\n self.inception.fc = Linear(in_features=self.inception.fc.in_features, out_features=embed_size)\r\n self.relu = ReLU()\r\n self.dropout = Dropout(p=dropout)\r\n \r\n def forward(self, images: Tensor) -> Tensor:\r\n features = self.inception(images)\r\n for name, param in self.inception.named_parameters():\r\n if \"fc.name\" in name or \"fc.bias\" in name:\r\n param.requires_grad = True\r\n else:\r\n param.requires_grad = self.train_cnn\r\n \r\n return self.dropout(self.relu(features.logits))\r\n \r\n\r\nclass DecoderRNN(Module):\r\n def __init__(self, embed_size: int, hidden_size: int, vocab_size: int, num_layers: int, dropout: float = 0.5) -> None:\r\n super().__init__()\r\n self.embed = Embedding(num_embeddings=vocab_size, embedding_dim=embed_size)\r\n self.lstm = LSTM(input_size=embed_size, hidden_size=hidden_size, num_layers=num_layers)\r\n self.linear = Linear(in_features=embed_size, out_features=vocab_size)\r\n self.dropout = Dropout(p=dropout)\r\n \r\n def forward(self, features, captions):\r\n embeddings = self.dropout(self.embed(captions))\r\n embeddings = torch.cat((features.unsqueeze(0), embeddings), dim=0)\r\n hiddens, _ = self.lstm(embeddings)\r\n outputs = self.linear(hiddens)\r\n return outputs\r\n"} +{"file_name": "263aa06e-1a97-40a3-b45a-23e1add9debf.png", "code": " \r\nclass CNNToRNN(Module):\r\n def __init__(self, embed_size, hidden_size, vocab_size, num_layers) -> None:\r\n super().__init__()\r\n self.encoder_cnn = EncoderCNN(embed_size=embed_size)\r\n self.decoder_rnn = DecoderRNN(embed_size=embed_size, hidden_size=hidden_size, vocab_size=vocab_size, num_layers=num_layers)\r\n \r\n def forward(self, images, captions):\r\n features = self.encoder_cnn(images)\r\n outputs = self.decoder_rnn(features, captions)\r\n return outputs\r\n \r\n def caption_image(self, image, vocabulary, max_length=50):\r\n result_caption = []\r\n\r\n with torch.no_grad():\r\n x = self.encoder_cnn(image).unsqueeze(0)\r\n # x = self.encoder_cnn(image)\r\n states = None\r\n\r\n for _ in range(max_length):\r\n hiddens, states = self.decoder_rnn.lstm(x, states)\r\n output = self.decoder_rnn.linear(hiddens.squeeze(0))\r\n predicted = output.argmax(1)\r\n result_caption.append(predicted.item())\r\n x = self.decoder_rnn.embed(predicted).unsqueeze(0)\r\n\r\n if vocabulary.itos[predicted.item()] == \"\":\r\n break\r\n\r\n return [vocabulary.itos[idx] for idx in result_caption]"} +{"file_name": "b103d655-6661-4cbf-9a31-c9a704254b65.png", "code": "import torch\r\nimport torch.nn as nn\r\nimport torch.optim as optim\r\nfrom torchtext.datasets import Multi30k\r\nfrom torchtext.data import Field, BucketIterator\r\nimport numpy as np\r\nimport spacy\r\nimport random\r\nfrom torch.utils.tensorboard import SummaryWriter # to print to tensorboard\r\nfrom utils import translate_sentence, bleu, save_checkpoint, load_checkpoint\r\n\r\nspacy_ger = spacy.load(\"de\")\r\nspacy_eng = spacy.load(\"en\")\r\n\r\n\r\ndef tokenize_ger(text):\r\n return [tok.text for tok in spacy_ger.tokenizer(text)]\r\n\r\n\r\ndef tokenize_eng(text):\r\n return [tok.text for tok in spacy_eng.tokenizer(text)]\r\n\r\n\r\ngerman = Field(tokenize=tokenize_ger, lower=True, init_token=\"\", eos_token=\"\")\r\n\r\nenglish = Field(\r\n tokenize=tokenize_eng, lower=True, init_token=\"\", eos_token=\"\"\r\n)\r\n\r\ntrain_data, valid_data, test_data = Multi30k.splits(\r\n exts=(\".de\", \".en\"), fields=(german, english)\r\n)\r\n\r\ngerman.build_vocab(train_data, max_size=10000, min_freq=2)\r\nenglish.build_vocab(train_data, max_size=10000, min_freq=2)\r\n\r\n\r\n# class Encoder(nn.Module):\r\n# def __init__(self, input_size, embedding_size, hidden_size, num_layers, p):\r\n# super(Encoder, self).__init__()\r\n"} +{"file_name": "44daa32f-0dd7-4158-ac9f-3267906909e9.png", "code": "# self.dropout = nn.Dropout(p)\r\n# self.hidden_size = hidden_size\r\n# self.num_layers = num_layers\r\n\r\n# self.embedding = nn.Embedding(input_size, embedding_size)\r\n# self.rnn = nn.LSTM(embedding_size, hidden_size, num_layers, dropout=p)\r\n\r\n# def forward(self, x):\r\n# # x shape: (seq_length, N) where N is batch size\r\n\r\n# embedding = self.dropout(self.embedding(x))\r\n# # embedding shape: (seq_length, N, embedding_size)\r\n\r\n# outputs, (hidden, cell) = self.rnn(embedding)\r\n# # outputs shape: (seq_length, N, hidden_size)\r\n\r\n# return hidden, cell\r\n\r\n\r\n# class Decoder(nn.Module):\r\n# def __init__(\r\n# self, input_size, embedding_size, hidden_size, output_size, num_layers, p\r\n# ):\r\n# super(Decoder, self).__init__()\r\n# self.dropout = nn.Dropout(p)\r\n# self.hidden_size = hidden_size\r\n# self.num_layers = num_layers\r\n\r\n# self.embedding = nn.Embedding(input_size, embedding_size)\r\n# self.rnn = nn.LSTM(embedding_size, hidden_size, num_layers, dropout=p)\r\n# self.fc = nn.Linear(hidden_size, output_size)\r\n\r\n# def forward(self, x, hidden, cell):\r\n# # x shape: (N) where N is for batch size, we want it to be (1, N), seq_length\r\n# # is 1 here because we are sending in a single word and not a sentence\r\n# x = x.unsqueeze(0)\r\n\r\n# embedding = self.dropout(self.embedding(x))\r\n# # embedding shape: (1, N, embedding_size)\r\n\r\n"} +{"file_name": "99894b20-5c96-436c-91f0-474ad0fe8708.png", "code": "# outputs, (hidden, cell) = self.rnn(embedding, (hidden, cell))\r\n# # outputs shape: (1, N, hidden_size)\r\n\r\n# predictions = self.fc(outputs)\r\n\r\n# # predictions shape: (1, N, length_target_vocabulary) to send it to\r\n# # loss function we want it to be (N, length_target_vocabulary) so we're\r\n# # just gonna remove the first dim\r\n# predictions = predictions.squeeze(0)\r\n\r\n# return predictions, hidden, cell\r\n\r\n\r\n# class Seq2Seq(nn.Module):\r\n# def __init__(self, encoder, decoder):\r\n# super(Seq2Seq, self).__init__()\r\n# self.encoder = encoder\r\n# self.decoder = decoder\r\n\r\n# def forward(self, source, target, teacher_force_ratio=0.5):\r\n# batch_size = source.shape[1]\r\n# target_len = target.shape[0]\r\n# target_vocab_size = len(english.vocab)\r\n\r\n# outputs = torch.zeros(target_len, batch_size, target_vocab_size).to(device)\r\n\r\n# hidden, cell = self.encoder(source)\r\n\r\n# # Grab the first input to the Decoder which will be token\r\n# x = target[0]\r\n\r\n# for t in range(1, target_len):\r\n# # Use previous hidden, cell as context from encoder at start\r\n# output, hidden, cell = self.decoder(x, hidden, cell)\r\n\r\n# # Store next output prediction\r\n# outputs[t] = output\r\n\r\n# # Get the best word the Decoder predicted (index in the vocabulary)\r\n# best_guess = output.argmax(1)\r\n"} +{"file_name": "ae01713b-f5a8-4017-8689-6a1c5418cf44.png", "code": "\r\n# # With probability of teacher_force_ratio we take the actual next word\r\n# # otherwise we take the word that the Decoder predicted it to be.\r\n# # Teacher Forcing is used so that the model gets used to seeing\r\n# # similar inputs at training and testing time, if teacher forcing is 1\r\n# # then inputs at test time might be completely different than what the\r\n# # network is used to. This was a long comment.\r\n# x = target[t] if random.random() < teacher_force_ratio else best_guess\r\n\r\n# return outputs\r\n\r\n\r\n# ### We're ready to define everything we need for training our Seq2Seq model ###\r\n\r\n# # Training hyperparameters\r\n# num_epochs = 100\r\n# learning_rate = 0.001\r\n# batch_size = 64\r\n\r\n# # Model hyperparameters\r\n# load_model = False\r\n# device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\r\n# input_size_encoder = len(german.vocab)\r\n# input_size_decoder = len(english.vocab)\r\n# output_size = len(english.vocab)\r\n# encoder_embedding_size = 300\r\n# decoder_embedding_size = 300\r\n# hidden_size = 1024 # Needs to be the same for both RNN's\r\n# num_layers = 2\r\n# enc_dropout = 0.5\r\n# dec_dropout = 0.5\r\n\r\n# # Tensorboard to get nice loss plot\r\n# writer = SummaryWriter(f\"runs/loss_plot\")\r\n# step = 0\r\n\r\n# train_iterator, valid_iterator, test_iterator = BucketIterator.splits(\r\n# (train_data, valid_data, test_data),\r\n# batch_size=batch_size,\r\n# sort_within_batch=True,\r\n"} +{"file_name": "1cd59ada-19fc-4cc7-9d67-21767fbc0e10.png", "code": "# sort_key=lambda x: len(x.src),\r\n# device=device,\r\n# )\r\n\r\n# encoder_net = Encoder(\r\n# input_size_encoder, encoder_embedding_size, hidden_size, num_layers, enc_dropout\r\n# ).to(device)\r\n\r\n# decoder_net = Decoder(\r\n# input_size_decoder,\r\n# decoder_embedding_size,\r\n# hidden_size,\r\n# output_size,\r\n# num_layers,\r\n# dec_dropout,\r\n# ).to(device)\r\n\r\n# model = Seq2Seq(encoder_net, decoder_net).to(device)\r\n# optimizer = optim.Adam(model.parameters(), lr=learning_rate)\r\n\r\n# pad_idx = english.vocab.stoi[\"\"]\r\n# criterion = nn.CrossEntropyLoss(ignore_index=pad_idx)\r\n\r\n# if load_model:\r\n# load_checkpoint(torch.load(\"my_checkpoint.pth.tar\"), model, optimizer)\r\n\r\n\r\n# sentence = \"ein boot mit mehreren m\u00e4nnern darauf wird von einem gro\u00dfen pferdegespann ans ufer gezogen.\"\r\n\r\n# for epoch in range(num_epochs):\r\n# print(f\"[Epoch {epoch} / {num_epochs}]\")\r\n\r\n# checkpoint = {\"state_dict\": model.state_dict(), \"optimizer\": optimizer.state_dict()}\r\n# save_checkpoint(checkpoint)\r\n\r\n# model.eval()\r\n\r\n# translated_sentence = translate_sentence(\r\n# model, sentence, german, english, device, max_length=50\r\n# )\r\n"} +{"file_name": "daadd15b-52b4-47b7-b0cf-cffbdc8d7947.png", "code": "\r\n# print(f\"Translated example sentence: \\n {translated_sentence}\")\r\n\r\n# model.train()\r\n\r\n# for batch_idx, batch in enumerate(train_iterator):\r\n# # Get input and targets and get to cuda\r\n# inp_data = batch.src.to(device)\r\n# target = batch.trg.to(device)\r\n\r\n# # Forward prop\r\n# output = model(inp_data, target)\r\n\r\n# # Output is of shape (trg_len, batch_size, output_dim) but Cross Entropy Loss\r\n# # doesn't take input in that form. For example if we have MNIST we want to have\r\n# # output to be: (N, 10) and targets just (N). Here we can view it in a similar\r\n# # way that we have output_words * batch_size that we want to send in into\r\n# # our cost function, so we need to do some reshapin. While we're at it\r\n# # Let's also remove the start token while we're at it\r\n# output = output[1:].reshape(-1, output.shape[2])\r\n# target = target[1:].reshape(-1)\r\n\r\n# optimizer.zero_grad()\r\n# loss = criterion(output, target)\r\n\r\n# # Back prop\r\n# loss.backward()\r\n\r\n# # Clip to avoid exploding gradient issues, makes sure grads are\r\n# # within a healthy range\r\n# torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1)\r\n\r\n# # Gradient descent step\r\n# optimizer.step()\r\n\r\n# # Plot to tensorboard\r\n# writer.add_scalar(\"Training loss\", loss, global_step=step)\r\n# step += 1\r\n\r\n\r\n"} +{"file_name": "bed002a1-e7e5-44c1-a765-e9e252339d80.png", "code": "# score = bleu(test_data[1:100], model, german, english, device)\r\n# print(f\"Bleu score {score*100:.2f}\")"} +{"file_name": "f6c28d56-6e27-4bed-9ba8-7a2d3696559d.png", "code": "from api import create_app\r\n\r\n\r\napp = create_app()"} +{"file_name": "6c1e43fb-924b-4656-9794-719a53358a0e.png", "code": "# Define here the models for your scraped items\r\n#\r\n# See documentation in:\r\n# https://docs.scrapy.org/en/latest/topics/items.html\r\n\r\nimport scrapy\r\n\r\n\r\nclass SlidesgoItem(scrapy.Item):\r\n # define the fields for your item here like:\r\n # name = scrapy.Field()\r\n pass\r\n"} +{"file_name": "648edaf3-42db-4d98-9ac1-d8270702c36a.png", "code": "# Define your item pipelines here\r\n#\r\n# Don't forget to add your pipeline to the ITEM_PIPELINES setting\r\n# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html\r\n\r\n\r\n# useful for handling different item types with a single interface\r\nfrom itemadapter import ItemAdapter\r\n\r\n\r\nclass SlidesgoPipeline:\r\n def process_item(self, item, spider):\r\n return item\r\n"} +{"file_name": "429b3af4-d627-4a9a-a056-6102ab63fea5.png", "code": "# Define here the models for your spider middleware\r\n#\r\n# See documentation in:\r\n# https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n\r\nfrom scrapy import signals\r\n\r\n# useful for handling different item types with a single interface\r\nfrom itemadapter import is_item, ItemAdapter\r\n\r\n\r\nclass SlidesgoSpiderMiddleware:\r\n # Not all methods need to be defined. If a method is not defined,\r\n # scrapy acts as if the spider middleware does not modify the\r\n # passed objects.\r\n\r\n @classmethod\r\n def from_crawler(cls, crawler):\r\n # This method is used by Scrapy to create your spiders.\r\n s = cls()\r\n crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\r\n return s\r\n\r\n def process_spider_input(self, response, spider):\r\n # Called for each response that goes through the spider\r\n # middleware and into the spider.\r\n\r\n # Should return None or raise an exception.\r\n return None\r\n\r\n def process_spider_output(self, response, result, spider):\r\n # Called with the results returned from the Spider, after\r\n # it has processed the response.\r\n\r\n # Must return an iterable of Request, or item objects.\r\n for i in result:\r\n yield i\r\n\r\n def process_spider_exception(self, response, exception, spider):\r\n # Called when a spider or process_spider_input() method\r\n"} +{"file_name": "1434f146-c714-48e2-beef-4e2623729b5c.png", "code": " # (from other spider middleware) raises an exception.\r\n\r\n # Should return either None or an iterable of Request or item objects.\r\n pass\r\n\r\n def process_start_requests(self, start_requests, spider):\r\n # Called with the start requests of the spider, and works\r\n # similarly to the process_spider_output() method, except\r\n # that it doesn\u2019t have a response associated.\r\n\r\n # Must return only requests (not items).\r\n for r in start_requests:\r\n yield r\r\n\r\n def spider_opened(self, spider):\r\n spider.logger.info(\"Spider opened: %s\" % spider.name)\r\n\r\n\r\nclass SlidesgoDownloaderMiddleware:\r\n # Not all methods need to be defined. If a method is not defined,\r\n # scrapy acts as if the downloader middleware does not modify the\r\n # passed objects.\r\n\r\n @classmethod\r\n def from_crawler(cls, crawler):\r\n # This method is used by Scrapy to create your spiders.\r\n s = cls()\r\n crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\r\n return s\r\n\r\n def process_request(self, request, spider):\r\n # Called for each request that goes through the downloader\r\n # middleware.\r\n\r\n # Must either:\r\n # - return None: continue processing this request\r\n # - or return a Response object\r\n # - or return a Request object\r\n # - or raise IgnoreRequest: process_exception() methods of\r\n # installed downloader middleware will be called\r\n"} +{"file_name": "767cfb6b-c3a0-41d8-a5d8-9770c862abd0.png", "code": " return None\r\n\r\n def process_response(self, request, response, spider):\r\n # Called with the response returned from the downloader.\r\n\r\n # Must either;\r\n # - return a Response object\r\n # - return a Request object\r\n # - or raise IgnoreRequest\r\n return response\r\n\r\n def process_exception(self, request, exception, spider):\r\n # Called when a download handler or a process_request()\r\n # (from other downloader middleware) raises an exception.\r\n\r\n # Must either:\r\n # - return None: continue processing this exception\r\n # - return a Response object: stops process_exception() chain\r\n # - return a Request object: stops process_exception() chain\r\n pass\r\n\r\n def spider_opened(self, spider):\r\n spider.logger.info(\"Spider opened: %s\" % spider.name)\r\n"} +{"file_name": "caf77f22-f58a-4689-8ffe-74b0c4de581c.png", "code": "# Scrapy settings for slidesgo project\r\n#\r\n# For simplicity, this file contains only settings considered important or\r\n# commonly used. You can find more settings consulting the documentation:\r\n#\r\n# https://docs.scrapy.org/en/latest/topics/settings.html\r\n# https://docs.scrapy.org/en/latest/topics/downloader-middleware.html\r\n# https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n\r\nBOT_NAME = \"slidesgo\"\r\n\r\nSPIDER_MODULES = [\"slidesgo.spiders\"]\r\nNEWSPIDER_MODULE = \"slidesgo.spiders\"\r\n\r\n\r\n# Crawl responsibly by identifying yourself (and your website) on the user-agent\r\n#USER_AGENT = \"slidesgo (+http://www.yourdomain.com)\"\r\n\r\n# Obey robots.txt rules\r\nROBOTSTXT_OBEY = True\r\n\r\n# Configure maximum concurrent requests performed by Scrapy (default: 16)\r\n#CONCURRENT_REQUESTS = 32\r\n\r\n# Configure a delay for requests for the same website (default: 0)\r\n# See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay\r\n# See also autothrottle settings and docs\r\n#DOWNLOAD_DELAY = 3\r\n# The download delay setting will honor only one of:\r\n#CONCURRENT_REQUESTS_PER_DOMAIN = 16\r\n#CONCURRENT_REQUESTS_PER_IP = 16\r\n\r\n# Disable cookies (enabled by default)\r\n#COOKIES_ENABLED = False\r\n\r\n# Disable Telnet Console (enabled by default)\r\n#TELNETCONSOLE_ENABLED = False\r\n\r\n# Override the default request headers:\r\n#DEFAULT_REQUEST_HEADERS = {\r\n"} +{"file_name": "34355514-b296-4bc1-b7c0-28e03982ff11.png", "code": "# \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\r\n# \"Accept-Language\": \"en\",\r\n#}\r\n\r\n# Enable or disable spider middlewares\r\n# See https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n#SPIDER_MIDDLEWARES = {\r\n# \"slidesgo.middlewares.SlidesgoSpiderMiddleware\": 543,\r\n#}\r\n\r\n# Enable or disable downloader middlewares\r\n# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html\r\n#DOWNLOADER_MIDDLEWARES = {\r\n# \"slidesgo.middlewares.SlidesgoDownloaderMiddleware\": 543,\r\n#}\r\n\r\n# Enable or disable extensions\r\n# See https://docs.scrapy.org/en/latest/topics/extensions.html\r\n#EXTENSIONS = {\r\n# \"scrapy.extensions.telnet.TelnetConsole\": None,\r\n#}\r\n\r\n# Configure item pipelines\r\n# See https://docs.scrapy.org/en/latest/topics/item-pipeline.html\r\n#ITEM_PIPELINES = {\r\n# \"slidesgo.pipelines.SlidesgoPipeline\": 300,\r\n#}\r\n\r\n# Enable and configure the AutoThrottle extension (disabled by default)\r\n# See https://docs.scrapy.org/en/latest/topics/autothrottle.html\r\n#AUTOTHROTTLE_ENABLED = True\r\n# The initial download delay\r\n#AUTOTHROTTLE_START_DELAY = 5\r\n# The maximum download delay to be set in case of high latencies\r\n#AUTOTHROTTLE_MAX_DELAY = 60\r\n# The average number of requests Scrapy should be sending in parallel to\r\n# each remote server\r\n#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0\r\n# Enable showing throttling stats for every response received:\r\n#AUTOTHROTTLE_DEBUG = False\r\n"} +{"file_name": "d0fe7235-6564-43f4-8c27-dd84a8bcf4ee.png", "code": "\r\n# Enable and configure HTTP caching (disabled by default)\r\n# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings\r\n#HTTPCACHE_ENABLED = True\r\n#HTTPCACHE_EXPIRATION_SECS = 0\r\n#HTTPCACHE_DIR = \"httpcache\"\r\n#HTTPCACHE_IGNORE_HTTP_CODES = []\r\n#HTTPCACHE_STORAGE = \"scrapy.extensions.httpcache.FilesystemCacheStorage\"\r\n\r\n# Set settings whose default value is deprecated to a future-proof value\r\nREQUEST_FINGERPRINTER_IMPLEMENTATION = \"2.7\"\r\nTWISTED_REACTOR = \"twisted.internet.asyncioreactor.AsyncioSelectorReactor\"\r\nFEED_EXPORT_ENCODING = \"utf-8\"\r\n"} +{"file_name": "597da4c1-bdfe-4c0b-9eaa-49532c53d1d3.png", "code": "# Define here the models for your scraped items\r\n#\r\n# See documentation in:\r\n# https://docs.scrapy.org/en/latest/topics/items.html\r\n\r\nimport scrapy\r\n\r\n\r\nclass LeetcodeItem(scrapy.Item):\r\n # define the fields for your item here like:\r\n # name = scrapy.Field()\r\n pass\r\n"} +{"file_name": "a3d16e91-4bc9-4f0a-b420-fdb6a24be189.png", "code": "# Define your item pipelines here\r\n#\r\n# Don't forget to add your pipeline to the ITEM_PIPELINES setting\r\n# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html\r\n\r\n\r\n# useful for handling different item types with a single interface\r\nfrom itemadapter import ItemAdapter\r\n\r\n\r\nclass LeetcodePipeline:\r\n def process_item(self, item, spider):\r\n return item\r\n"} +{"file_name": "527f9771-12a2-4840-a258-6f3a73b91c16.png", "code": "# Define here the models for your spider middleware\r\n#\r\n# See documentation in:\r\n# https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n\r\nfrom scrapy import signals\r\n\r\n# useful for handling different item types with a single interface\r\nfrom itemadapter import is_item, ItemAdapter\r\n\r\n\r\nclass LeetcodeSpiderMiddleware:\r\n # Not all methods need to be defined. If a method is not defined,\r\n # scrapy acts as if the spider middleware does not modify the\r\n # passed objects.\r\n\r\n @classmethod\r\n def from_crawler(cls, crawler):\r\n # This method is used by Scrapy to create your spiders.\r\n s = cls()\r\n crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\r\n return s\r\n\r\n def process_spider_input(self, response, spider):\r\n # Called for each response that goes through the spider\r\n # middleware and into the spider.\r\n\r\n # Should return None or raise an exception.\r\n return None\r\n\r\n def process_spider_output(self, response, result, spider):\r\n # Called with the results returned from the Spider, after\r\n # it has processed the response.\r\n\r\n # Must return an iterable of Request, or item objects.\r\n for i in result:\r\n yield i\r\n\r\n def process_spider_exception(self, response, exception, spider):\r\n # Called when a spider or process_spider_input() method\r\n"} +{"file_name": "828c464a-051c-4246-b47a-b22004c816e4.png", "code": " # (from other spider middleware) raises an exception.\r\n\r\n # Should return either None or an iterable of Request or item objects.\r\n pass\r\n\r\n def process_start_requests(self, start_requests, spider):\r\n # Called with the start requests of the spider, and works\r\n # similarly to the process_spider_output() method, except\r\n # that it doesn\u2019t have a response associated.\r\n\r\n # Must return only requests (not items).\r\n for r in start_requests:\r\n yield r\r\n\r\n def spider_opened(self, spider):\r\n spider.logger.info(\"Spider opened: %s\" % spider.name)\r\n\r\n\r\nclass LeetcodeDownloaderMiddleware:\r\n # Not all methods need to be defined. If a method is not defined,\r\n # scrapy acts as if the downloader middleware does not modify the\r\n # passed objects.\r\n\r\n @classmethod\r\n def from_crawler(cls, crawler):\r\n # This method is used by Scrapy to create your spiders.\r\n s = cls()\r\n crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\r\n return s\r\n\r\n def process_request(self, request, spider):\r\n # Called for each request that goes through the downloader\r\n # middleware.\r\n\r\n # Must either:\r\n # - return None: continue processing this request\r\n # - or return a Response object\r\n # - or return a Request object\r\n # - or raise IgnoreRequest: process_exception() methods of\r\n # installed downloader middleware will be called\r\n"} +{"file_name": "27c8ec55-6dfa-45eb-8b78-9084904fdbe3.png", "code": " return None\r\n\r\n def process_response(self, request, response, spider):\r\n # Called with the response returned from the downloader.\r\n\r\n # Must either;\r\n # - return a Response object\r\n # - return a Request object\r\n # - or raise IgnoreRequest\r\n return response\r\n\r\n def process_exception(self, request, exception, spider):\r\n # Called when a download handler or a process_request()\r\n # (from other downloader middleware) raises an exception.\r\n\r\n # Must either:\r\n # - return None: continue processing this exception\r\n # - return a Response object: stops process_exception() chain\r\n # - return a Request object: stops process_exception() chain\r\n pass\r\n\r\n def spider_opened(self, spider):\r\n spider.logger.info(\"Spider opened: %s\" % spider.name)\r\n"} +{"file_name": "4558f146-cd8a-4cfe-a3db-12d5122221c9.png", "code": "# Scrapy settings for leetcode project\r\n#\r\n# For simplicity, this file contains only settings considered important or\r\n# commonly used. You can find more settings consulting the documentation:\r\n#\r\n# https://docs.scrapy.org/en/latest/topics/settings.html\r\n# https://docs.scrapy.org/en/latest/topics/downloader-middleware.html\r\n# https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n\r\nBOT_NAME = \"leetcode\"\r\n\r\nSPIDER_MODULES = [\"leetcode.spiders\"]\r\nNEWSPIDER_MODULE = \"leetcode.spiders\"\r\n\r\n\r\n# Crawl responsibly by identifying yourself (and your website) on the user-agent\r\nUSER_AGENT = 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'\r\n\r\n# Obey robots.txt rules\r\nROBOTSTXT_OBEY = False\r\n\r\n# Configure maximum concurrent requests performed by Scrapy (default: 16)\r\n#CONCURRENT_REQUESTS = 32\r\n\r\n# Configure a delay for requests for the same website (default: 0)\r\n# See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay\r\n# See also autothrottle settings and docs\r\n#DOWNLOAD_DELAY = 3\r\n# The download delay setting will honor only one of:\r\n#CONCURRENT_REQUESTS_PER_DOMAIN = 16\r\n#CONCURRENT_REQUESTS_PER_IP = 16\r\n\r\n# Disable cookies (enabled by default)\r\n#COOKIES_ENABLED = False\r\n\r\n# Disable Telnet Console (enabled by default)\r\n#TELNETCONSOLE_ENABLED = False\r\n\r\n# Override the default request headers:\r\n#DEFAULT_REQUEST_HEADERS = {\r\n"} +{"file_name": "f73d883d-850d-49a2-a2de-d7a6805a5369.png", "code": "# \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\r\n# \"Accept-Language\": \"en\",\r\n#}\r\n\r\n# Enable or disable spider middlewares\r\n# See https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n#SPIDER_MIDDLEWARES = {\r\n# \"leetcode.middlewares.LeetcodeSpiderMiddleware\": 543,\r\n#}\r\n\r\n# Enable or disable downloader middlewares\r\n# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html\r\nDOWNLOADER_MIDDLEWARES = {\r\n 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,\r\n 'scrapy.downloadermiddlewares.retry.RetryMiddleware': None,\r\n 'scrapy_fake_useragent.middleware.RandomUserAgentMiddleware': 400,\r\n 'scrapy_fake_useragent.middleware.RetryUserAgentMiddleware': 401,\r\n}\r\nFAKEUSERAGENT_PROVIDERS = [\r\n 'scrapy_fake_useragent.providers.FakeUserAgentProvider', # This is the first provider we'll try\r\n 'scrapy_fake_useragent.providers.FakerProvider', # If FakeUserAgentProvider fails, we'll use faker to generate a user-agent string for us\r\n 'scrapy_fake_useragent.providers.FixedUserAgentProvider', # Fall back to USER_AGENT value\r\n]\r\n\r\n# Enable or disable extensions\r\n# See https://docs.scrapy.org/en/latest/topics/extensions.html\r\n#EXTENSIONS = {\r\n# \"scrapy.extensions.telnet.TelnetConsole\": None,\r\n#}\r\n\r\n# Configure item pipelines\r\n# See https://docs.scrapy.org/en/latest/topics/item-pipeline.html\r\n#ITEM_PIPELINES = {\r\n# \"leetcode.pipelines.LeetcodePipeline\": 300,\r\n#}\r\n\r\n# Enable and configure the AutoThrottle extension (disabled by default)\r\n# See https://docs.scrapy.org/en/latest/topics/autothrottle.html\r\n#AUTOTHROTTLE_ENABLED = True\r\n# The initial download delay\r\n"} +{"file_name": "dc7a9ebd-a7c7-4a73-9a6a-29bca3c6164c.png", "code": "#AUTOTHROTTLE_START_DELAY = 5\r\n# The maximum download delay to be set in case of high latencies\r\n#AUTOTHROTTLE_MAX_DELAY = 60\r\n# The average number of requests Scrapy should be sending in parallel to\r\n# each remote server\r\n#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0\r\n# Enable showing throttling stats for every response received:\r\n#AUTOTHROTTLE_DEBUG = False\r\n\r\n# Enable and configure HTTP caching (disabled by default)\r\n# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings\r\n#HTTPCACHE_ENABLED = True\r\n#HTTPCACHE_EXPIRATION_SECS = 0\r\n#HTTPCACHE_DIR = \"httpcache\"\r\n#HTTPCACHE_IGNORE_HTTP_CODES = []\r\n#HTTPCACHE_STORAGE = \"scrapy.extensions.httpcache.FilesystemCacheStorage\"\r\n\r\n# Set settings whose default value is deprecated to a future-proof value\r\nREQUEST_FINGERPRINTER_IMPLEMENTATION = \"2.7\"\r\nTWISTED_REACTOR = \"twisted.internet.asyncioreactor.AsyncioSelectorReactor\"\r\nFEED_EXPORT_ENCODING = \"utf-8\"\r\n"} +{"file_name": "376afefd-0fee-43e4-99b2-c4a8ffde952e.png", "code": "from flask import Flask, jsonify, redirect, url_for\r\nfrom http import HTTPStatus\r\nfrom .blueprints import register_blueprints\r\nfrom .config import set_configuration\r\nfrom oauthlib.oauth2.rfc6749.errors import InvalidGrantError, TokenExpiredError\r\nfrom flask_dance.contrib.google import google\r\n\r\n\r\ndef create_app() -> Flask:\r\n \"\"\"Create the Flask App instance.\"\"\"\r\n app = Flask(__name__)\r\n set_configuration(app=app)\r\n register_blueprints(app=app)\r\n \r\n \r\n @app.route(\"/login\")\r\n def login():\r\n try:\r\n if not google.authorized:\r\n return redirect(url_for(\"google.login\"))\r\n resp = google.get(\"/oauth2/v1/userinfo\")\r\n if resp.ok:\r\n return redirect(url_for(\"home.home_page\"))\r\n return redirect(url_for(\"login\"))\r\n except (TokenExpiredError, InvalidGrantError):\r\n return redirect(url_for(\"google.login\"))\r\n \r\n @app.route(\"/health\")\r\n def health():\r\n return jsonify({\"Up\": True}), HTTPStatus.OK\r\n\r\n app.shell_context_processor({\"app\": app})\r\n\r\n return app"} +{"file_name": "6f200232-31cf-4397-b2ef-d13863e84c9a.png", "code": "# utils.py\r\n\r\nfrom playwright.sync_api import sync_playwright\r\nimport uuid\r\nfrom PIL import Image\r\nfrom PIL import Image\r\nimport io\r\nfrom os import path\r\nimport json\r\n\r\nindex: int = 1\r\n\r\ndef take_screenshot_from_url(url, session_data):\r\n with sync_playwright() as playwright:\r\n webkit = playwright.webkit\r\n browser = webkit.launch()\r\n browser_context = browser.new_context(device_scale_factor=2)\r\n browser_context.add_cookies([session_data])\r\n page = browser_context.new_page()\r\n page.goto(url)\r\n screenshot_bytes = page.locator(\".code\").screenshot()\r\n browser.close()\r\n return screenshot_bytes\r\n \r\n \r\ndef save_data(image_bytes: bytes, code: str) -> None:\r\n file_name: str = str(uuid.uuid4())\r\n image: Image = Image.open(io.BytesIO(image_bytes))\r\n file_path: str = \"data\"\r\n image_path: str = path.join(file_path, f\"{file_name}.png\")\r\n image.save(image_path)\r\n code_path: str = path.join(file_path, \"metadata.jsonl\")\r\n metadata: dict = {\r\n \"file_name\": f\"{file_name}.png\",\r\n \"code\": code\r\n }\r\n with open(code_path, \"a+\", encoding=\"utf-8\") as f:\r\n f.write(json.dumps(metadata) + \"\\n\")"} +{"file_name": "e34ec6d9-73c5-4da0-8b63-a51f3d674d07.png", "code": "\r\n return app"} +{"file_name": "94651707-bb2c-4154-ac3b-df809883b2fd.png", "code": "from scrapy import Item, Field\r\nfrom itemloaders.processors import TakeFirst, MapCompose, Join\r\nimport re\r\n\r\n\r\ndef remove_html_tags(description: str) -> str:\r\n html_pattern = \"<(?:\\\"[^\\\"]*\\\"['\\\"]*|'[^']*'['\\\"]*|[^'\\\">])+>\" \r\n return re.sub(html_pattern, '', description)\r\n\r\ndef remove_unicode_chars(text: str) -> str:\r\n return text.replace(u\"\\xa0\", \"\")\r\n\r\ndef num_of_slides(text: str) -> int:\r\n vals = [val for val in list(text) if val.isdigit()]\r\n return \"\".join(vals)\r\n\r\n\r\nclass SlidesModelItem(Item):\r\n title = Field(output_processor=TakeFirst())\r\n category = Field(output_processor=TakeFirst())\r\n description = Field(\r\n input_processor=MapCompose(remove_html_tags, remove_unicode_chars),\r\n output_processor=Join()\r\n )\r\n tags = Field()\r\n slides_count = Field(\r\n input_processor=MapCompose(num_of_slides),\r\n output_processor=TakeFirst()\r\n )\r\n colors = Field()\r\n image_urls = Field()\r\n images = Field()\r\n"} +{"file_name": "92d2b3b9-0220-4956-8ef0-c63b28e2f373.png", "code": "from itemadapter import ItemAdapter\r\nfrom scrapy.pipelines.images import ImagesPipeline\r\nfrom scrapy.exceptions import DropItem\r\nfrom os import path, mkdir\r\nfrom scrapy.http import Response\r\nfrom scrapy import Request, Spider\r\nfrom scrapy import Item\r\nfrom pathlib import PurePosixPath\r\nfrom urllib.parse import urlparse\r\nfrom slidesmodel.models import db_connect, Tag, Category, Slide, create_table, create_engine\r\nfrom sqlalchemy.orm import sessionmaker\r\nimport uuid\r\nimport logging\r\n\r\n\r\nclass SlidesmodelPipeline:\r\n def process_item(self, item: Item, spider: Spider):\r\n return item\r\n \r\nclass MyImagesPipeline(ImagesPipeline):\r\n def file_path(self, request: Request, response: Response = None, info=None, *, item=None):\r\n slide_name: str = request.meta['title']\r\n return f\"{slide_name}/\" + PurePosixPath(urlparse(request.url).path).name\r\n \r\n def get_media_requests(self, item: Item, info):\r\n for image_url in item[\"image_urls\"]:\r\n yield Request(image_url, meta={\"title\": item[\"title\"]})\r\n \r\n\r\nclass SaveSlidesPipeline(object):\r\n def __init__(self):\r\n \"\"\"\r\n Initializes database connection and sessionmaker\r\n Creates tables\r\n \"\"\"\r\n engine = db_connect()\r\n create_table(engine)\r\n self.Session = sessionmaker(bind=engine)\r\n\r\n\r\n"} +{"file_name": "ab3bc119-6d65-4f72-ad96-c135a6071b4c.png", "code": " def process_item(self, item: Item, spider: Spider):\r\n \"\"\"Save quotes in the database\r\n This method is called for every item pipeline component\r\n \"\"\"\r\n session = self.Session()\r\n \r\n category = Category()\r\n slide = Slide()\r\n tag = Tag()\r\n \r\n slide.id = str(uuid.uuid4())\r\n slide.description = item[\"description\"]\r\n slide.title = item[\"title\"]\r\n slide.image_urls = item[\"image_urls\"]\r\n slide.image_paths = [image[\"path\"] for image in item[\"images\"]]\r\n slide.colors = item[\"colors\"]\r\n \r\n category.id = str(uuid.uuid4())\r\n if item.get(\"category\"):\r\n category.name = item[\"category\"]\r\n else:\r\n category.name = \"\"\r\n\r\n # check whether the category exists\r\n exist_category = session.query(Category).filter_by(name=category.name).first()\r\n if exist_category is not None: # the current category exists\r\n slide.category = exist_category\r\n else:\r\n slide.category = category\r\n\r\n # check whether the current quote has tags or not\r\n for tag_name in item[\"tags\"]:\r\n tag = Tag(name=tag_name, id=str(uuid.uuid4()))\r\n # check whether the current tag already exists in the database\r\n exist_tag = session.query(Tag).filter_by(name=tag.name).first()\r\n if exist_tag is not None: # the current tag exists\r\n tag = exist_tag\r\n slide.tags.append(tag)\r\n\r\n try:\r\n"} +{"file_name": "21bf760e-9d9d-4a2b-8842-cb6c10e58885.png", "code": " session.add(slide)\r\n session.commit()\r\n\r\n except:\r\n session.rollback()\r\n raise\r\n\r\n finally:\r\n session.close()\r\n\r\n return item\r\n\r\n\r\nclass DuplicatesPipeline(object):\r\n\r\n def __init__(self):\r\n \"\"\"\r\n Initializes database connection and sessionmaker.\r\n Creates tables.\r\n \"\"\"\r\n engine = db_connect()\r\n create_table(engine)\r\n self.Session = sessionmaker(bind=engine)\r\n logging.info(\"****DuplicatesPipeline: database connected****\")\r\n\r\n def process_item(self, item: Item, spider: Spider):\r\n session = self.Session()\r\n exist_slide = session.query(Slide).filter_by(title=item[\"title\"]).first()\r\n session.close()\r\n if exist_slide is not None: # the current slide exists\r\n raise DropItem(\"Duplicate item found: %s\" % item[\"title\"])\r\n else:\r\n return item"} +{"file_name": "b156ef88-a4b2-42e4-90b0-4f875c83eaa9.png", "code": "# Define here the models for your spider middleware\r\n#\r\n# See documentation in:\r\n# https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n\r\nfrom scrapy import signals\r\n\r\n# useful for handling different item types with a single interface\r\nfrom itemadapter import is_item, ItemAdapter\r\n\r\n\r\nclass SlidesmodelSpiderMiddleware:\r\n # Not all methods need to be defined. If a method is not defined,\r\n # scrapy acts as if the spider middleware does not modify the\r\n # passed objects.\r\n\r\n @classmethod\r\n def from_crawler(cls, crawler):\r\n # This method is used by Scrapy to create your spiders.\r\n s = cls()\r\n crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\r\n return s\r\n\r\n def process_spider_input(self, response, spider):\r\n # Called for each response that goes through the spider\r\n # middleware and into the spider.\r\n\r\n # Should return None or raise an exception.\r\n return None\r\n\r\n def process_spider_output(self, response, result, spider):\r\n # Called with the results returned from the Spider, after\r\n # it has processed the response.\r\n\r\n # Must return an iterable of Request, or item objects.\r\n for i in result:\r\n yield i\r\n\r\n def process_spider_exception(self, response, exception, spider):\r\n # Called when a spider or process_spider_input() method\r\n"} +{"file_name": "5ce82cea-c1b6-4c4c-b7cb-465b1536bb1d.png", "code": " # (from other spider middleware) raises an exception.\r\n\r\n # Should return either None or an iterable of Request or item objects.\r\n pass\r\n\r\n def process_start_requests(self, start_requests, spider):\r\n # Called with the start requests of the spider, and works\r\n # similarly to the process_spider_output() method, except\r\n # that it doesn\u2019t have a response associated.\r\n\r\n # Must return only requests (not items).\r\n for r in start_requests:\r\n yield r\r\n\r\n def spider_opened(self, spider):\r\n spider.logger.info(\"Spider opened: %s\" % spider.name)\r\n\r\n\r\nclass SlidesmodelDownloaderMiddleware:\r\n # Not all methods need to be defined. If a method is not defined,\r\n # scrapy acts as if the downloader middleware does not modify the\r\n # passed objects.\r\n\r\n @classmethod\r\n def from_crawler(cls, crawler):\r\n # This method is used by Scrapy to create your spiders.\r\n s = cls()\r\n crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)\r\n return s\r\n\r\n def process_request(self, request, spider):\r\n # Called for each request that goes through the downloader\r\n # middleware.\r\n\r\n # Must either:\r\n # - return None: continue processing this request\r\n # - or return a Response object\r\n # - or return a Request object\r\n # - or raise IgnoreRequest: process_exception() methods of\r\n # installed downloader middleware will be called\r\n"} +{"file_name": "b9375bbe-f997-4040-bc9e-c66f7976ca9e.png", "code": " return None\r\n\r\n def process_response(self, request, response, spider):\r\n # Called with the response returned from the downloader.\r\n\r\n # Must either;\r\n # - return a Response object\r\n # - return a Request object\r\n # - or raise IgnoreRequest\r\n return response\r\n\r\n def process_exception(self, request, exception, spider):\r\n # Called when a download handler or a process_request()\r\n # (from other downloader middleware) raises an exception.\r\n\r\n # Must either:\r\n # - return None: continue processing this exception\r\n # - return a Response object: stops process_exception() chain\r\n # - return a Request object: stops process_exception() chain\r\n pass\r\n\r\n def spider_opened(self, spider):\r\n spider.logger.info(\"Spider opened: %s\" % spider.name)\r\n"} +{"file_name": "c86e1cf6-9dda-492d-ac09-9eee2c2c2fa2.png", "code": "\r\nfrom sqlalchemy import create_engine, Column, Table, ForeignKey, MetaData\r\nfrom sqlalchemy.orm import relationship\r\nfrom sqlalchemy.ext.declarative import declarative_base\r\nfrom sqlalchemy import (\r\n Integer, String, Date, DateTime, Float, Boolean, Text)\r\nfrom scrapy.utils.project import get_project_settings\r\nfrom sqlalchemy_utils import ScalarListType\r\n\r\n\r\nBase = declarative_base()\r\n\r\ndef db_connect():\r\n \"\"\"\r\n Performs database connection using database settings from settings.py.\r\n Returns sqlalchemy engine instance\r\n \"\"\"\r\n settings: dict = get_project_settings()\r\n connection_string: str = settings.get(\"CONNECTION_STRING\")\r\n return create_engine(connection_string)\r\n\r\ndef create_table(engine):\r\n Base.metadata.create_all(engine)\r\n \r\n \r\nslide_tag = Table('slide_tag', Base.metadata,\r\n Column('slide_id', Integer, ForeignKey('slide.id')),\r\n Column('tag_id', Integer, ForeignKey('tag.id'))\r\n)\r\n\r\nclass Slide(Base):\r\n __tablename__ = \"slide\"\r\n\r\n id = Column(String(), primary_key=True)\r\n title = Column('title', String())\r\n description = Column('description', Text())\r\n category_id = Column(String(), ForeignKey('category.id'))\r\n tags = relationship('Tag', secondary='slide_tag',\r\n lazy='dynamic', backref=\"slide\") # M-to-M for quote and tag\r\n colors = Column(ScalarListType())\r\n"} +{"file_name": "8536bd89-260b-470a-b3d0-e2fcf35c2fb7.png", "code": " image_paths = Column(ScalarListType())\r\n image_urls = Column(ScalarListType())\r\n \r\n\r\nclass Tag(Base):\r\n __tablename__ = \"tag\"\r\n\r\n id = Column(String(), primary_key=True)\r\n name = Column('name', String(30), unique=True)\r\n slides = relationship('Slide', secondary='slide_tag',\r\n lazy='dynamic', backref=\"tag\") # M-to-M for quote and tag\r\n \r\n \r\nclass Category(Base):\r\n __tablename__ = \"category\"\r\n\r\n id = Column(String(), primary_key=True)\r\n name = Column('name', String(50), unique=True)\r\n slides = relationship('Slide', backref='category')"} +{"file_name": "02857791-1c2f-4048-a3ee-1bcd71ef58df.png", "code": "# Scrapy settings for slidesmodel project\r\n#\r\n# For simplicity, this file contains only settings considered important or\r\n# commonly used. You can find more settings consulting the documentation:\r\n#\r\n# https://docs.scrapy.org/en/latest/topics/settings.html\r\n# https://docs.scrapy.org/en/latest/topics/downloader-middleware.html\r\n# https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n\r\nBOT_NAME = \"slidesmodel\"\r\n\r\nSPIDER_MODULES = [\"slidesmodel.spiders\"]\r\nNEWSPIDER_MODULE = \"slidesmodel.spiders\"\r\n\r\n\r\n# Crawl responsibly by identifying yourself (and your website) on the user-agent\r\n#USER_AGENT = \"slidesmodel (+http://www.yourdomain.com)\"\r\n\r\n# Obey robots.txt rules\r\nROBOTSTXT_OBEY = False\r\n\r\n# Configure maximum concurrent requests performed by Scrapy (default: 16)\r\n#CONCURRENT_REQUESTS = 32\r\n\r\n# Configure a delay for requests for the same website (default: 0)\r\n# See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay\r\n# See also autothrottle settings and docs\r\n#DOWNLOAD_DELAY = 3\r\n# The download delay setting will honor only one of:\r\n#CONCURRENT_REQUESTS_PER_DOMAIN = 16\r\n#CONCURRENT_REQUESTS_PER_IP = 16\r\n\r\n# Disable cookies (enabled by default)\r\n#COOKIES_ENABLED = False\r\n\r\n# Disable Telnet Console (enabled by default)\r\n#TELNETCONSOLE_ENABLED = False\r\n\r\n# Override the default request headers:\r\n#DEFAULT_REQUEST_HEADERS = {\r\n"} +{"file_name": "8efe0fdd-4c8c-4eca-ab61-554df2b114ae.png", "code": "# \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\r\n# \"Accept-Language\": \"en\",\r\n#}\r\n\r\n# Enable or disable spider middlewares\r\n# See https://docs.scrapy.org/en/latest/topics/spider-middleware.html\r\n#SPIDER_MIDDLEWARES = {\r\n# \"slidesmodel.middlewares.SlidesmodelSpiderMiddleware\": 543,\r\n#}\r\n\r\n# Enable or disable downloader middlewares\r\n# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html\r\n#DOWNLOADER_MIDDLEWARES = {\r\n# \"slidesmodel.middlewares.SlidesmodelDownloaderMiddleware\": 543,\r\n#}\r\n\r\n# Enable or disable extensions\r\n# See https://docs.scrapy.org/en/latest/topics/extensions.html\r\n#EXTENSIONS = {\r\n# \"scrapy.extensions.telnet.TelnetConsole\": None,\r\n#}\r\n\r\n# Configure item pipelines\r\n# See https://docs.scrapy.org/en/latest/topics/item-pipeline.html\r\nITEM_PIPELINES = {\r\n \"slidesmodel.pipelines.SlidesmodelPipeline\": 300,\r\n \"slidesmodel.pipelines.MyImagesPipeline\": 1,\r\n \"slidesmodel.pipelines.SaveSlidesPipeline\": 200,\r\n \"slidesmodel.pipelines.DuplicatesPipeline\": 100,\r\n}\r\n\r\n# Enable and configure the AutoThrottle extension (disabled by default)\r\n# See https://docs.scrapy.org/en/latest/topics/autothrottle.html\r\n#AUTOTHROTTLE_ENABLED = True\r\n# The initial download delay\r\n#AUTOTHROTTLE_START_DELAY = 5\r\n# The maximum download delay to be set in case of high latencies\r\n#AUTOTHROTTLE_MAX_DELAY = 60\r\n# The average number of requests Scrapy should be sending in parallel to\r\n# each remote server\r\n"} +{"file_name": "1891f188-3fd4-4cad-8cec-272be05973b9.png", "code": "#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0\r\n# Enable showing throttling stats for every response received:\r\n#AUTOTHROTTLE_DEBUG = False\r\n\r\n# Enable and configure HTTP caching (disabled by default)\r\n# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings\r\n#HTTPCACHE_ENABLED = True\r\n#HTTPCACHE_EXPIRATION_SECS = 0\r\n#HTTPCACHE_DIR = \"httpcache\"\r\n#HTTPCACHE_IGNORE_HTTP_CODES = []\r\n#HTTPCACHE_STORAGE = \"scrapy.extensions.httpcache.FilesystemCacheStorage\"\r\n\r\n# Set settings whose default value is deprecated to a future-proof value\r\nREQUEST_FINGERPRINTER_IMPLEMENTATION = \"2.7\"\r\nTWISTED_REACTOR = \"twisted.internet.asyncioreactor.AsyncioSelectorReactor\"\r\nFEED_EXPORT_ENCODING = \"utf-8\"\r\n\r\nIMAGES_URLS_FIELD = \"image_urls\"\r\nIMAGES_RESULT_FIELD = \"images\"\r\nIMAGES_STORE = \"/home/lyle/oryks/scrapy-tutorial/slidesmodel/images\"\r\nCONNECTION_STRING = \"sqlite:////home/lyle/oryks/scrapy-tutorial/data/slides.db\"\r\nSTART_URLS_PATH = \"/home/lyle/oryks/scrapy-tutorial/links.json\"\r\n"} +{"file_name": "c1eefa8f-efb9-4e07-91fa-5dbd3d60328e.png", "code": "from fastapi import FastAPI\r\nfrom fastapi.middleware.cors import CORSMiddleware\r\nfrom .routers import register_routers\r\n\r\n\r\norigins = [\r\n \"http://localhost\",\r\n \"http://localhost:8080\",\r\n]\r\n\r\ndef create_app():\r\n app = FastAPI()\r\n app.add_middleware(\r\n CORSMiddleware,\r\n allow_origins=[\"*\"],\r\n allow_credentials=True,\r\n allow_methods=[\"*\"],\r\n allow_headers=[\"*\"],\r\n )\r\n register_routers(app=app)\r\n \r\n @app.get('/health', tags=['Health'])\r\n async def get():\r\n return {'Success': 'Up!'}\r\n \r\n return app"} +{"file_name": "9b417b32-3584-4516-8c8e-18986f817867.png", "code": "from typing import Any\r\nfrom scrapy import Spider\r\nfrom scrapy.http import Response\r\nfrom scrapy.linkextractors import LinkExtractor \r\n\r\n\r\nclass SlidesLinkExtractor(Spider):\r\n name: str = \"links-extractor\"\r\n \r\n start_urls: list[str] = [\r\n \"https://slidesgo.com/\"\r\n ]\r\n \r\n def __init__(self, name=None, **kwargs): \r\n super().__init__(name, **kwargs) \r\n \r\n self.link_extractor = LinkExtractor(unique=True) \r\n \r\n def parse(self, response: Response, **kwargs: Any) -> Any: \r\n self.logger.info(\"Links spider\")\r\n links = response.css('li.w-1\\/2 a::attr(href)') \r\n \r\n for link in links: \r\n yield {\r\n \"url\": link.get(), \r\n }"} +{"file_name": "125b1456-78d6-4f86-a8c9-b20f0f18be6c.png", "code": "# This package will contain the spiders of your Scrapy project\r\n#\r\n# Please refer to the documentation for information on how to create and manage\r\n# your spiders.\r\n"} +{"file_name": "5786f422-f30c-4ba7-bd37-85e8be3d45e4.png", "code": "from typing import Any\r\nfrom scrapy import Spider\r\nfrom scrapy.http import Response\r\nfrom scrapy import Request\r\n# from slidesmodel.items import SlidesModelItem\r\nfrom scrapy.loader import ItemLoader\r\nfrom scrapy.utils.project import get_project_settings\r\nimport json\r\n\r\n\r\nclass SlidesGospider(Spider):\r\n name: str = \"slides\"\r\n \r\n def __init__(self, name: str | None = None, **kwargs: Any):\r\n super().__init__(name, **kwargs)\r\n # self.start_urls: list[str] = self.load_start_urls()\r\n self.start_urls: list[str] = [\r\n \"https://slidesgo.com/food#rs=home\"\r\n ]\r\n \r\n \r\n def parse(self, response: Response, **kwargs: Any) -> Any:\r\n self.logger.info(\"This is my first spider.\")\r\n slide_links = response.css('div.theme_post a::attr(href)')\r\n for slide_link in slide_links:\r\n # title = problem_link.css('a::text')[0].get()\r\n link = slide_link.get()\r\n yield{\r\n \"link\": link,\r\n }\r\n # yield Request(link, callback=self.parse_problem)\r\n # for slide in slides:\r\n # loader: ItemLoader = ItemLoader(item=SlidesModelItem(), selector=slide)\r\n # loader.add_css(\"title\", \".item a::text\")\r\n # loader.add_css(\"category\", \".category::text\")\r\n # slide_item = loader.load_item()\r\n # link = slide.css(\".item a::attr(href)\").get()\r\n # self.logger.info(\"Parsing the slide\")\r\n # yield Request(link, callback=self.parse_slide, meta={\"slide_item\": slide_item})\r\n \r\n"} +{"file_name": "a0f999d1-4f87-473b-b52a-de6b6786794d.png", "code": " \r\n def parse_link(self, response: Response, **kwargs: Any) -> Any:\r\n # slide_item = response.meta[\"slide_item\"]\r\n # loader = ItemLoader(item=slide_item, response=response)\r\n # loader.add_css(field_name=\"tags\", css=\".Sm-tags a.mr-2::text\")\r\n # loader.add_css(field_name=\"description\", css=\".product-text p\")\r\n # loader.add_css(field_name=\"slides_count\", css='h4 small::text')\r\n # loader.add_css(field_name=\"colors\", css='li.color a::text')\r\n # loader.add_css(field_name=\"image_urls\", css='a.preview-link img::attr(src)')\r\n # add slide link\r\n # yield loader.load_item()\r\n categories: list[dict] = []\r\n cats = response.css('span.cat-links a')\r\n for cat in cats:\r\n category = cat.css('::text').get()\r\n category_link = cat.css('::attr(href)').get()\r\n categories.append({\r\n \"category\": category,\r\n \"link\": category_link\r\n })\r\n \r\n yield {\r\n \"categories\": categories,\r\n \"title\": response.css('h1::text').get(),\r\n \"problem\": response.css('.post-content p').getall(),\r\n \"io\": response.css('.io').get(),\r\n \"solutions\": response.css('h2::text').getall(), \r\n \"link\": response.url,\r\n \"code\": response.css('.c-line').getall()\r\n }"} +{"file_name": "08b215b4-048b-4967-99c8-b9474acd35d5.png", "code": "# This package will contain the spiders of your Scrapy project\r\n#\r\n# Please refer to the documentation for information on how to create and manage\r\n# your spiders.\r\n"} +{"file_name": "31f1c6f7-6fdd-4c40-bc32-a20091397c3d.png", "code": "from typing import Any\r\nfrom scrapy import Spider\r\nfrom scrapy.http import Response\r\nfrom scrapy.linkextractors import LinkExtractor \r\n\r\n\r\nclass SlidesLinkExtractor(Spider):\r\n name: str = \"leetcode\"\r\n \r\n start_urls: list[str] = [\r\n \"https://www.techiedelight.com/data-structures-and-algorithms-problems/\"\r\n ]\r\n \r\n def __init__(self, name=None, **kwargs): \r\n super().__init__(name, **kwargs) \r\n \r\n self.link_extractor = LinkExtractor(unique=True) \r\n \r\n def parse(self, response: Response, **kwargs: Any) -> Any: \r\n links = self.link_extractor.extract_links(response) \r\n \r\n for link in links: \r\n yield {\r\n \"url\": link.url, \r\n \"text\": link.text\r\n }"} +{"file_name": "0c1bd944-ff8c-4132-a612-a226d6b20ddd.png", "code": "from typing import Any\r\nfrom scrapy import Spider\r\nfrom scrapy.http import Response\r\nfrom scrapy import Request\r\n# from slidesmodel.items import SlidesModelItem\r\nfrom scrapy.loader import ItemLoader\r\nfrom scrapy.utils.project import get_project_settings\r\nimport json\r\n\r\n\r\nclass SlidesModelspider(Spider):\r\n name: str = \"problems\"\r\n \r\n def __init__(self, name: str | None = None, **kwargs: Any):\r\n super().__init__(name, **kwargs)\r\n # self.start_urls: list[str] = self.load_start_urls()\r\n self.start_urls: list[str] = [\r\n \"https://www.techiedelight.com/data-structures-and-algorithms-problems/\"\r\n ]\r\n \r\n \r\n def parse(self, response: Response, **kwargs: Any) -> Any:\r\n self.logger.info(\"This is my first spider.\")\r\n problem_links = response.css('.post-problems li')\r\n # from random import choices\r\n # problem_links = choices(population=problem_links, k=100)\r\n # for problem_link in problem_links:\r\n # # title = problem_link.css('a::text')[0].get()\r\n # link = problem_link.css('a::attr(href)')[0].get()\r\n # # yield{\r\n # # \"link\": link,\r\n # # \"problem\": problem\r\n # # }\r\n # yield Request(link, callback=self.parse_problem)\r\n link = \"https://www.techiedelight.com/single-source-shortest-paths-bellman-ford-algorithm/\"\r\n yield Request(link, callback=self.parse_problem)\r\n # for slide in slides:\r\n # loader: ItemLoader = ItemLoader(item=SlidesModelItem(), selector=slide)\r\n # loader.add_css(\"title\", \".item a::text\")\r\n # loader.add_css(\"category\", \".category::text\")\r\n"} +{"file_name": "1833d002-08dc-426d-bb7f-3e9a024df61f.png", "code": " # slide_item = loader.load_item()\r\n # link = slide.css(\".item a::attr(href)\").get()\r\n # self.logger.info(\"Parsing the slide\")\r\n # yield Request(link, callback=self.parse_slide, meta={\"slide_item\": slide_item})\r\n \r\n \r\n def parse_problem(self, response: Response, **kwargs: Any) -> Any:\r\n # slide_item = response.meta[\"slide_item\"]\r\n # loader = ItemLoader(item=slide_item, response=response)\r\n # loader.add_css(field_name=\"tags\", css=\".Sm-tags a.mr-2::text\")\r\n # loader.add_css(field_name=\"description\", css=\".product-text p\")\r\n # loader.add_css(field_name=\"slides_count\", css='h4 small::text')\r\n # loader.add_css(field_name=\"colors\", css='li.color a::text')\r\n # loader.add_css(field_name=\"image_urls\", css='a.preview-link img::attr(src)')\r\n # add slide link\r\n # yield loader.load_item()\r\n categories: list[dict] = []\r\n cats = response.css('span.cat-links a')\r\n for cat in cats:\r\n category = cat.css('::text').get()\r\n category_link = cat.css('::attr(href)').get()\r\n categories.append({\r\n \"category\": category,\r\n \"link\": category_link\r\n })\r\n \r\n yield {\r\n \"categories\": categories,\r\n \"title\": response.css('h1::text').get(),\r\n # \"problem\": response.css('.post-content p').getall(),\r\n \"conditions\": response.css('.post-content ol').get(),\r\n # \"io\": response.css('.io').get(),\r\n # \"solutions\": response.css('h2::text').getall(), \r\n # \"link\": response.url,\r\n # \"code\": response.css('.c-line').getall(),\r\n \"image\": response.css('.post-content p img::attr(src)').get()\r\n }"} +{"file_name": "a2844097-313d-475b-a7bd-803879d85faf.png", "code": "\"\"\"This module declares the extensions used by the application.\"\"\"\r\nfrom flask_bcrypt import Bcrypt\r\nfrom flask_cors import CORS\r\nfrom flask_login import LoginManager\r\nfrom flask_mail import Mail\r\nfrom flask_marshmallow import Marshmallow\r\nfrom flask_migrate import Migrate\r\nfrom flask_sqlalchemy import SQLAlchemy\r\n\r\ncors = CORS()\r\ndb = SQLAlchemy()\r\nmigrate = Migrate()\r\nma = Marshmallow()\r\nbcrypt = Bcrypt()\r\nlogin_manager = LoginManager()\r\nmail = Mail()\r\n"} +{"file_name": "1040b63f-e8b1-46a3-8028-8e57d4a50aec.png", "code": "import os\r\nfrom .config import Config\r\nfrom flask import Flask\r\n\r\n\r\ndef set_configuration(app: Flask):\r\n \"\"\"Set the application configuration.\r\n\r\n The application configuration will depend on the\r\n environment i.e Test, Development, Staging or Production.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether the config was set up successfully.\r\n \"\"\"\r\n config_name = os.environ.get(\"FLASK_ENV\")\r\n app.config.from_object(Config[config_name])\r\n\r\n return True"} +{"file_name": "1ecc87b7-5a7f-4541-bce4-49cc74604739.png", "code": "from .set_config import set_configuration"} +{"file_name": "e429fb50-e460-436d-b44b-220fefcde069.png", "code": "\"\"\"This module declares the app configuration.\r\n\r\nThe classes include:\r\n\r\nBaseConfig:\r\n Has all the configurations shared by all the environments.\r\n\r\n\"\"\"\r\nimport os\r\n\r\nfrom dotenv import load_dotenv\r\n\r\nload_dotenv()\r\n\r\n\r\nclass BaseConfig:\r\n \"\"\"Base configuration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n POSTGRES_HOST = os.environ[\"POSTGRES_HOST\"]\r\n POSTGRES_DB = os.environ[\"POSTGRES_DB\"]\r\n POSTGRES_PORT = os.environ[\"POSTGRES_PORT\"]\r\n POSTGRES_USER = os.environ[\"POSTGRES_USER\"]\r\n POSTGRES_PASSWORD = os.environ[\"POSTGRES_PASSWORD\"]\r\n # db_conn_string = f\"postgresql://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{POSTGRES_HOST}:{POSTGRES_PORT}/{POSTGRES_DB}\"\r\n db_conn_string = os.environ.get(\"SQLALCHEMY_DATABASE_URI\", 'sqlite:///./oryks.db')\r\n SQLALCHEMY_DATABASE_URI = db_conn_string\r\n SQLALCHEMY_TRACK_MODIFICATIONS = False\r\n MAIL_USERNAME = os.environ[\"MAIL_USERNAME\"]\r\n MAIL_PASSWORD = os.environ[\"MAIL_PASSWORD\"]\r\n MAIL_SERVER = os.environ[\"MAIL_SERVER\"]\r\n MAIL_PORT = os.environ[\"MAIL_PORT\"]\r\n MAIL_USE_SSL = os.environ[\"MAIL_USE_SSL\"]\r\n MAIL_DEFAULT_SENDER = os.environ[\"MAIL_DEFAULT_SENDER\"]\r\n PASSWORD_RESET_SALT = os.environ.get(\"PASSWORD_RESET_SALT\", \"salt\")\r\n GOOGLE_OAUTH_CLIENT_ID = os.environ.get(\"GOOGLE_OAUTH_CLIENT_ID\")\r\n"} +{"file_name": "ca285420-b552-4545-9c07-68d00d2865ae.png", "code": " GOOGLE_OAUTH_CLIENT_SECRET = os.environ.get(\"GOOGLE_OAUTH_CLIENT_SECRET\")\r\n OAUTHLIB_INSECURE_TRANSPORT = os.environ.get(\"OAUTHLIB_INSECURE_TRANSPORT\")\r\n OAUTHLIB_RELAX_TOKEN_SCOPE = os.environ.get(\"OAUTHLIB_RELAX_TOKEN_SCOPE \" )\r\n\r\n\r\nclass DevelopmentConfig(BaseConfig):\r\n \"\"\"Development confuguration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass TestingConfig(BaseConfig):\r\n \"\"\"Testing configuration.\"\"\"\r\n\r\n TESTING = True\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nclass ProductionConfig(BaseConfig):\r\n \"\"\"Production configuration.\"\"\"\r\n\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nConfig = {\r\n \"development\": DevelopmentConfig,\r\n \"test\": TestingConfig,\r\n \"production\": ProductionConfig,\r\n \"staging\": ProductionConfig,\r\n}\r\n"} +{"file_name": "8280a34a-e190-4d75-8464-5e0570e529d9.png", "code": "from flask import Flask\r\nfrom .home import home\r\nfrom .oauth import auth, google_blueprint\r\n\r\n\r\ndef register_blueprints(app: Flask) -> bool:\r\n \"\"\"Register the application blueprints.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether all the blueprints were registered.\r\n \"\"\"\r\n app.register_blueprint(home)\r\n app.register_blueprint(auth, url_prefix=\"/auth\")\r\n app.register_blueprint(google_blueprint, url_prefix=\"/login\")\r\n return True"} +{"file_name": "2430cdf3-cf42-4693-9fb9-8303f1a820a8.png", "code": "from .register_blueprints import register_blueprints"} +{"file_name": "a3e5c6a1-9650-4627-83bc-5deb41d13c96.png", "code": "\"\"\"This module declares application exceptions.\"\"\"\r\n\r\n\r\nclass DatabaseNotConnectedException(Exception):\r\n \"\"\"Raised when the database is not connected.\"\"\"\r\n"} +{"file_name": "1c88e443-8542-49f0-8541-98b2d3db6bba.png", "code": "import os\r\nfrom .config import Config\r\nfrom flask import Flask\r\n\r\n\r\ndef set_configuration(app: Flask):\r\n \"\"\"Set the application configuration.\r\n\r\n The application configuration will depend on the\r\n environment i.e Test, Development, Staging or Production.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether the config was set up successfully.\r\n \"\"\"\r\n config_name = os.environ.get(\"FLASK_ENV\")\r\n app.config.from_object(Config[config_name])\r\n\r\n return True"} +{"file_name": "40764a53-08c8-4eb5-85f1-003f969f7021.png", "code": "from .set_config import set_configuration"} +{"file_name": "5855ad74-18bc-47e5-a444-886a95ed8be4.png", "code": "\"\"\"This module declares the app configuration.\r\n\r\nThe classes include:\r\n\r\nBaseConfig:\r\n Has all the configurations shared by all the environments.\r\n\r\n\"\"\"\r\nimport os\r\n\r\nfrom dotenv import load_dotenv\r\n\r\nload_dotenv()\r\n\r\n\r\nclass BaseConfig:\r\n \"\"\"Base configuration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass DevelopmentConfig(BaseConfig):\r\n \"\"\"Development confuguration.\"\"\"\r\n\r\n DEBUG = True\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\r\n \"SECRET_KEY\", \"df0331cefc6c2b9a5d0208a726a5d1c0fd37324feba25506\"\r\n )\r\n\r\n\r\nclass TestingConfig(BaseConfig):\r\n \"\"\"Testing configuration.\"\"\"\r\n\r\n TESTING = True\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n"} +{"file_name": "f5930a98-a686-465e-8fa5-868fb668ec6b.png", "code": "\r\n\r\nclass ProductionConfig(BaseConfig):\r\n \"\"\"Production configuration.\"\"\"\r\n\r\n TESTING = False\r\n SECRET_KEY = os.environ.get(\"SECRET_KEY\", \"secret-key\")\r\n\r\n\r\nConfig = {\r\n \"development\": DevelopmentConfig,\r\n \"test\": TestingConfig,\r\n \"production\": ProductionConfig,\r\n \"staging\": ProductionConfig,\r\n}\r\n"} +{"file_name": "70bd2949-f16e-4a84-b293-78091948b201.png", "code": "from flask import Flask\r\nfrom .home import code\r\n\r\n\r\ndef register_blueprints(app: Flask) -> bool:\r\n \"\"\"Register the application blueprints.\r\n\r\n Parameters\r\n ----------\r\n app: flask.Flask\r\n A flask app instance\r\n\r\n Returns\r\n -------\r\n bool:\r\n Whether all the blueprints were registered.\r\n \"\"\"\r\n app.register_blueprint(code)\r\n return True"} +{"file_name": "a693f3d8-aaf8-40ea-a78a-43a41b7d538e.png", "code": "from .register_blueprints import register_blueprints"} +{"file_name": "4ce9ffcb-405e-4691-bcd2-645fdc98452c.png", "code": "from typing import Any\r\nfrom scrapy import Spider\r\nfrom scrapy.http import Response\r\nfrom scrapy import Request\r\nfrom slidesmodel.items import SlidesModelItem\r\nfrom scrapy.loader import ItemLoader\r\nfrom scrapy.utils.project import get_project_settings\r\nimport json\r\n\r\n\r\nclass SlidesModelspider(Spider):\r\n name: str = \"slides\"\r\n \r\n def __init__(self, name: str | None = None, **kwargs: Any):\r\n super().__init__(name, **kwargs)\r\n self.start_urls: list[str] = self.load_start_urls()\r\n # self.start_urls: list[str] = [\r\n # \"https://slidemodel.com/templates/tag/process-flow/\"\r\n # ]\r\n \r\n @staticmethod\r\n def load_start_urls() -> list:\r\n settings: dict = get_project_settings()\r\n links_path: str = settings.get(\"START_URLS_PATH\")\r\n with open(links_path, \"r\") as f:\r\n start_urls_dict: list[dict] = json.load(f)\r\n return [\r\n link.get(\"url\") for link in start_urls_dict\r\n ]\r\n \r\n def parse(self, response: Response, **kwargs: Any) -> Any:\r\n self.logger.info(\"This is my first spider.\")\r\n slides = response.xpath(\"//div[@class='col-lg-3 col-sm-6 mt-4']\")\r\n for slide in slides:\r\n loader: ItemLoader = ItemLoader(item=SlidesModelItem(), selector=slide)\r\n loader.add_css(\"title\", \".item a::text\")\r\n loader.add_css(\"category\", \".category::text\")\r\n slide_item = loader.load_item()\r\n link = slide.css(\".item a::attr(href)\").get()\r\n self.logger.info(\"Parsing the slide\")\r\n"} +{"file_name": "05500f09-5cf6-4a2a-affb-0a7253166363.png", "code": " yield Request(link, callback=self.parse_slide, meta={\"slide_item\": slide_item})\r\n \r\n # next_page = response.css('a.next.page-numbers::attr(href)').get()\r\n # if next_page and int(next_page.split('/')[-2]) < 2:\r\n # self.logger.warning(f\"Crawling page number %d\", int(next_page.split('/')[-2]))\r\n # yield Request(next_page, callback=self.parse)\r\n next_page = response.css('a.next.page-numbers::attr(href)').get()\r\n if next_page:\r\n self.logger.warning(f\"Crawling page number %d\", int(next_page.split('/')[-2]))\r\n yield Request(next_page, callback=self.parse)\r\n \r\n def parse_slide(self, response: Response, **kwargs: Any) -> Any:\r\n slide_item = response.meta[\"slide_item\"]\r\n loader = ItemLoader(item=slide_item, response=response)\r\n loader.add_css(field_name=\"tags\", css=\".Sm-tags a.mr-2::text\")\r\n loader.add_css(field_name=\"description\", css=\".product-text p\")\r\n loader.add_css(field_name=\"slides_count\", css='h4 small::text')\r\n loader.add_css(field_name=\"colors\", css='li.color a::text')\r\n loader.add_css(field_name=\"image_urls\", css='a.preview-link img::attr(src)')\r\n # add slide link\r\n yield loader.load_item()"} +{"file_name": "f5d876a5-9c93-471c-bcbe-f1dd88d681f5.png", "code": "# This package will contain the spiders of your Scrapy project\r\n#\r\n# Please refer to the documentation for information on how to create and manage\r\n# your spiders.\r\n"} +{"file_name": "643d59e3-dfa3-4117-9505-7738dc6b8b4a.png", "code": "from typing import Any\r\nfrom scrapy import Spider\r\nfrom scrapy.http import Response\r\nfrom scrapy.linkextractors import LinkExtractor \r\n\r\n\r\nclass SlidesLinkExtractor(Spider):\r\n name: str = \"links-extractor\"\r\n \r\n start_urls: list[str] = [\r\n \"https://slidemodel.com/templates/\"\r\n ]\r\n \r\n def __init__(self, name=None, **kwargs): \r\n super().__init__(name, **kwargs) \r\n \r\n self.link_extractor = LinkExtractor(unique=True) \r\n \r\n def parse(self, response: Response, **kwargs: Any) -> Any: \r\n links = self.link_extractor.extract_links(response) \r\n \r\n for link in links: \r\n if \"tag\" in link.url:\r\n yield {\r\n \"url\": link.url, \r\n \"text\": link.text\r\n }"} +{"file_name": "606316eb-c095-4e21-9902-ea8f8f194b70.png", "code": "from .extensions import drive_client, gslide_client, youtube_client"} +{"file_name": "04fc0a64-7b84-44d0-86fd-46f3f94c7724.png", "code": "from .helpers import create_gslide_client, create_drive_client\r\nfrom typing import Any\r\nfrom .helpers import get_youtube_client\r\nfrom ..libraries.youtube import YouTube\r\n\r\n\r\ngslide_client: Any = create_gslide_client()\r\ndrive_client: Any = create_drive_client()\r\nyoutube_client: YouTube = get_youtube_client()\r\n\r\n\r\n\r\n"} +{"file_name": "61a81c02-8337-4deb-826b-e5b2313d231f.png", "code": "from ..libraries.oryks_google_oauth import (\r\n GoogleSlidesScope, GoogleOAuth, GoogleDirectories, GoogleDriveScopes\r\n)\r\nfrom ..libraries.youtube import YouTube\r\nfrom typing import Optional, Any\r\n\r\n\r\ndef create_gslide_client() -> Any:\r\n secrets_file: str = \"/home/lyle/oryks/backend/api/libraries/slide.json\"\r\n scopes: list[str] = [\r\n GoogleSlidesScope.slides.value,\r\n GoogleSlidesScope.drive.value\r\n ]\r\n api_service_name: str = \"slides\"\r\n api_version: str = \"v1\"\r\n credentials_dir: str = GoogleDirectories.slides.value\r\n credentials_file_name: Optional[str] = 'credentials.json'\r\n\r\n auth: GoogleOAuth = GoogleOAuth(\r\n secrets_file=secrets_file,\r\n scopes=scopes,\r\n api_service_name=api_service_name,\r\n api_version=api_version,\r\n credentials_dir=credentials_dir,\r\n credentials_file_name=credentials_file_name\r\n )\r\n\r\n gslides_client = auth.authenticate_google_server()\r\n return gslides_client\r\n\r\n\r\ndef create_drive_client() -> Any:\r\n secrets_file: str = \"/home/lyle/oryks/backend/api/libraries/drive.json\"\r\n scopes: list[str] = [\r\n GoogleDriveScopes.metadata.value,\r\n GoogleDriveScopes.drive.value,\r\n GoogleDriveScopes.files.value\r\n ]\r\n api_service_name: str = \"drive\"\r\n api_version: str = \"v3\"\r\n"} +{"file_name": "87ccac0e-f279-49d1-ba96-05785c305716.png", "code": " credentials_dir: str = GoogleDirectories.drive.value\r\n credentials_file_name: Optional[str] = 'credentials.json'\r\n\r\n auth: GoogleOAuth = GoogleOAuth(\r\n secrets_file=secrets_file,\r\n scopes=scopes,\r\n api_service_name=api_service_name,\r\n api_version=api_version,\r\n credentials_dir=credentials_dir,\r\n credentials_file_name=credentials_file_name\r\n )\r\n\r\n drive_client = auth.authenticate_google_server()\r\n return drive_client\r\n\r\n\r\ndef get_youtube_client() -> YouTube:\r\n client_secrets_file: str = \"/home/lyle/oryks/backend/api/libraries/youtube.json\"\r\n youtube: YouTube = YouTube(client_secret_file=client_secrets_file)\r\n return youtube"} +{"file_name": "a055d760-607b-480b-bcbe-2e096bd97ec8.png", "code": "from .oryks_google_oauth import GoogleSlidesScope, GoogleOAuth, GoogleDirectories\r\nfrom typing import Optional\r\nfrom .ml import AnalyzedVideo, analayze_video, create_presentation\r\nfrom .ml.slide_requests import create_slide\r\n\r\nsecrets_file: str = \"/home/lyle/oryks/backend/api/libraries/slide.json\"\r\nscopes: list[str] = [\r\n GoogleSlidesScope.slides.value,\r\n GoogleSlidesScope.drive.value\r\n]\r\napi_service_name: str = \"slides\"\r\napi_version: str = \"v1\"\r\ncredentials_dir: str = GoogleDirectories.slides.value\r\ncredentials_file_name: Optional[str] = 'credentials.json'\r\n\r\nauth: GoogleOAuth = GoogleOAuth(\r\n secrets_file=secrets_file,\r\n scopes=scopes,\r\n api_service_name=api_service_name,\r\n api_version=api_version,\r\n credentials_dir=credentials_dir\r\n)\r\n\r\n# slide_client = auth.authenticate_google_server()\r\n\r\n# video_transcript: str = \"\"\r\n# analyzed_video: AnalyzedVideo = analayze_video(video_transcript=video_transcript)\r\n# presentation_name: str = \"YouTube Video\"\r\n# response: dict = create_presentation(presentation_name=presentation_name, \r\n# slide_client=slide_client, analyzed_video=analyzed_video)\r\n# presentation_id: str = \"1UutpJTI9VOp7u_5iBGCHnKV-YwljkV61HYrrvJMyVAg\"\r\n# response: dict = create_slide(presentation_id=presentation_id, slide_client=slide_client)\r\n\r\nfrom .youtube_helper import main\r\n\r\nmain()\r\n"} +{"file_name": "db4d9efa-26ca-4524-85de-fa87a1164b97.png", "code": "from typing import Any\r\nimport json\r\nfrom googleapiclient.errors import HttpError\r\n\r\n\r\ndef get_presentation(presentation_id: str, slide_client: Any) -> Any:\r\n presentation = (\r\n slide_client.presentations().get(presentationId=presentation_id).execute()\r\n )\r\n return presentation\r\n\r\n\r\ndef get_slides(presentation: Any) -> Any:\r\n slides = presentation.get(\"slides\")\r\n return slides\r\n\r\n\r\ndef create_blank_presentation(title: str, slide_client: Any) -> dict:\r\n body: dict = {\"title\": title}\r\n presentation = slide_client.presentations().create(body=body).execute()\r\n print(f\"Created blank presentation with the id: {presentation.get('presentationId')}\")\r\n presentation_name: str = f\"{title.casefold().strip().replace(' ', '_')}.json\"\r\n with open(presentation_name, \"w\") as f:\r\n json.dump(presentation, f)\r\n return presentation\r\n \r\n\r\ndef create_slide(presentation_id: str, page_id: str, slide_client: Any) -> dict:\r\n create_slides_request = [\r\n {\r\n \"createSlide\": {\r\n \"objectId\": page_id,\r\n \"insertionIndex\": \"1\",\r\n \"slideLayoutReference\": {\r\n \"predefinedLayout\": \"TITLE_AND_TWO_COLUMNS\"\r\n }\r\n }\r\n }\r\n ]\r\n request_body = {\r\n"} +{"file_name": "7dcbc7a0-a774-4088-ba2b-5ae4f953d3b3.png", "code": " \"requests\": create_slides_request\r\n }\r\n response = (\r\n slide_client.presentations()\r\n .batchUpdate(presentationId=presentation_id, body=request_body)\r\n .execute()\r\n )\r\n create_slide_response = response.get(\"replies\")[0].get(\"createSlide\")\r\n print(f\"Created slide with ID:{(create_slide_response.get('objectId'))}\")\r\n slide_name: str = f\"{page_id.casefold().strip().replace(' ', '_')}.json\"\r\n with open(slide_name, \"w\") as f:\r\n json.dump(response, f)\r\n return response\r\n\r\n\r\ndef create_textbox_with_text(presentation_id: str, page_id: str, slide_client: Any) -> dict:\r\n try:\r\n # Create a new square textbox, using the supplied element ID.\r\n element_id = \"MyTextBox_10\"\r\n pt350 = {\"magnitude\": 350, \"unit\": \"PT\"}\r\n requests = [\r\n {\r\n \"createShape\": {\r\n \"objectId\": element_id,\r\n \"shapeType\": \"TEXT_BOX\",\r\n \"elementProperties\": {\r\n \"pageObjectId\": page_id,\r\n \"size\": {\"height\": pt350, \"width\": pt350},\r\n \"transform\": {\r\n \"scaleX\": 1,\r\n \"scaleY\": 1,\r\n \"translateX\": 350,\r\n \"translateY\": 100,\r\n \"unit\": \"PT\",\r\n },\r\n },\r\n }\r\n },\r\n # Insert text into the box, using the supplied element ID.\r\n {\r\n"} +{"file_name": "cd9112a5-6c9e-4fa3-bfd8-e4ba87eec0f7.png", "code": " \"insertText\": {\r\n \"objectId\": element_id,\r\n \"insertionIndex\": 0,\r\n \"text\": \"New Box Text Inserted!\",\r\n }\r\n },\r\n ]\r\n\r\n # Execute the request.\r\n body = {\"requests\": requests}\r\n response = (\r\n slide_client.presentations()\r\n .batchUpdate(presentationId=presentation_id, body=body)\r\n .execute()\r\n )\r\n create_shape_response = response.get(\"replies\")[0].get(\"createShape\")\r\n print(f\"Created textbox with ID:{(create_shape_response.get('objectId'))}\")\r\n except HttpError as error:\r\n print(f\"An error occurred: {error}\")\r\n\r\n return error\r\n\r\n return response\r\n\r\n\r\ndef create_image(presentation_id: str, page_id: str, slide_client: Any):\r\n try:\r\n IMAGE_URL = (\r\n \"https://www.google.com/images/branding/\"\r\n \"googlelogo/2x/googlelogo_color_272x92dp.png\"\r\n )\r\n # pylint: disable=invalid-name\r\n requests = []\r\n image_id = \"MyImage_11\"\r\n emu4M = {\"magnitude\": 4000000, \"unit\": \"EMU\"}\r\n requests.append(\r\n {\r\n \"createImage\": {\r\n \"objectId\": image_id,\r\n \"url\": IMAGE_URL,\r\n"} +{"file_name": "c7b7070e-17e8-4b79-bd75-3a38bedd3310.png", "code": " \"elementProperties\": {\r\n \"pageObjectId\": page_id,\r\n \"size\": {\"height\": emu4M, \"width\": emu4M},\r\n \"transform\": {\r\n \"scaleX\": 1,\r\n \"scaleY\": 1,\r\n \"translateX\": 100000,\r\n \"translateY\": 100000,\r\n \"unit\": \"EMU\",\r\n },\r\n },\r\n }\r\n }\r\n )\r\n\r\n # Execute the request.\r\n body = {\"requests\": requests}\r\n response = (\r\n slide_client.presentations()\r\n .batchUpdate(presentationId=presentation_id, body=body)\r\n .execute()\r\n )\r\n create_image_response = response.get(\"replies\")[0].get(\"createImage\")\r\n print(f\"Created image with ID: {(create_image_response.get('objectId'))}\")\r\n\r\n return response\r\n except HttpError as error:\r\n print(f\"An error occurred: {error}\")\r\n print(\"Images not created\")\r\n return error"} +{"file_name": "5e023350-1df4-4f15-8366-5db9dc90579f.png", "code": "from .youtube import YouTube\r\nfrom .youtube.schemas import YouTubeListResponse, YouTubeResponse\r\nfrom .youtube.models import Video, Search, Playlist\r\nfrom os import path\r\nfrom langchain_core.language_models.base import BaseLanguageModel\r\nfrom langchain_openai import OpenAI\r\nfrom langchain_community.llms import Ollama\r\nfrom langchain_core.prompts import PromptTemplate\r\nfrom langchain_core.pydantic_v1 import BaseModel, Field\r\n# from pydantic import BaseModel, Field\r\nfrom langchain.output_parsers import PydanticOutputParser\r\n\r\nfrom .oryks_google_oauth import (\r\n GoogleSlidesScope, GoogleOAuth, GoogleDirectories, GoogleDriveScopes\r\n)\r\nfrom typing import Optional, Any\r\nimport json\r\n\r\n\r\napi_key: str = \"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\"\r\nopen_ai: BaseLanguageModel = OpenAI(temperature=0, api_key=api_key)\r\n\r\ngemma_2b: BaseLanguageModel = Ollama(model=\"gemma:2b\")\r\nllama_2b: BaseLanguageModel = Ollama(model=\"llama2\")\r\n\r\ndef create_gslide_client() -> Any:\r\n secrets_file: str = \"/home/lyle/oryks/backend/api/libraries/slide.json\"\r\n scopes: list[str] = [\r\n GoogleSlidesScope.slides.value,\r\n GoogleSlidesScope.drive.value\r\n ]\r\n api_service_name: str = \"slides\"\r\n api_version: str = \"v1\"\r\n credentials_dir: str = GoogleDirectories.slides.value\r\n credentials_file_name: Optional[str] = 'credentials.json'\r\n\r\n auth: GoogleOAuth = GoogleOAuth(\r\n secrets_file=secrets_file,\r\n scopes=scopes,\r\n api_service_name=api_service_name,\r\n"} +{"file_name": "18fedd11-51c3-4487-826d-ecc40508cf52.png", "code": " api_version=api_version,\r\n credentials_dir=credentials_dir,\r\n credentials_file_name=credentials_file_name\r\n )\r\n\r\n gslides_client = auth.authenticate_google_server()\r\n return gslides_client\r\n\r\n\r\ndef create_drive_client() -> Any:\r\n secrets_file: str = \"/home/lyle/oryks/backend/api/libraries/drive.json\"\r\n scopes: list[str] = [\r\n GoogleDriveScopes.metadata.value,\r\n GoogleDriveScopes.drive.value,\r\n GoogleDriveScopes.files.value\r\n ]\r\n api_service_name: str = \"drive\"\r\n api_version: str = \"v3\"\r\n credentials_dir: str = GoogleDirectories.drive.value\r\n credentials_file_name: Optional[str] = 'credentials.json'\r\n\r\n auth: GoogleOAuth = GoogleOAuth(\r\n secrets_file=secrets_file,\r\n scopes=scopes,\r\n api_service_name=api_service_name,\r\n api_version=api_version,\r\n credentials_dir=credentials_dir,\r\n credentials_file_name=credentials_file_name\r\n )\r\n\r\n drive_client = auth.authenticate_google_server()\r\n return drive_client\r\n\r\n\r\ndef get_youtube_client() -> YouTube:\r\n client_secrets_file: str = \"/home/lyle/oryks/backend/api/libraries/youtube.json\"\r\n youtube: YouTube = YouTube(client_secret_file=client_secrets_file)\r\n return youtube\r\n\r\nyoutube_client: YouTube = get_youtube_client()\r\n"} +{"file_name": "e470ac8d-d10b-4426-8c7e-8253d24afbcb.png", "code": "\r\ndata_dir: str = \"/home/lyle/oryks/backend/api/libraries/data\"\r\ndescriptions_dir: str = path.join(data_dir, \"descriptions\")\r\nsegments_dir: str = path.join(data_dir, \"segments\")\r\n\r\nclass TimeStamp(BaseModel):\r\n start_time: Optional[str] = Field(description=\"Start time\")\r\n end_time: Optional[str] = Field(description=\"End time\")\r\n title: Optional[str] = Field(description=\"The time stamp title\")\r\n \r\nclass TimeStamps(BaseModel):\r\n time_stamps: list[TimeStamp]\r\n\r\ndef save_description(description: str, video_id: str) -> None:\r\n video_path: str = path.join(descriptions_dir, f\"{video_id}.txt\")\r\n with open(video_path, \"w\", encoding=\"utf-8\") as f:\r\n f.write(description)\r\n \r\n \r\ndef save_timestamps(timestamps: TimeStamps, video_id: str) -> None:\r\n video_path: str = path.join(segments_dir, f\"{video_id}.json\")\r\n with open(video_path, \"w\", encoding=\"utf-8\") as f:\r\n json.dump(timestamps.dict(), f, indent=4)\r\n \r\n \r\ndef load_timestamps(video_id: str) -> TimeStamps:\r\n video_path: str = path.join(segments_dir, f\"{video_id}.json\")\r\n with open(video_path, \"r\", encoding=\"utf-8\") as f:\r\n timestamps: TimeStamps = TimeStamps(**json.load(f))\r\n return timestamps\r\n\r\n\r\ndef get_timestamps(video_id: str) -> TimeStamps:\r\n video_path: str = path.join(segments_dir, f\"{video_id}.json\")\r\n if not path.exists(video_path):\r\n description: str = get_description(video_id=video_id)\r\n timestamps: TimeStamps = get_video_segments(video_description=description)\r\n save_timestamps(timestamps=timestamps, video_id=video_id)\r\n else:\r\n timestamps: TimeStamps = load_timestamps(video_id=video_id)\r\n"} +{"file_name": "949dcf79-e580-48b0-8b36-fcccb84b001f.png", "code": " return timestamps\r\n\r\ndef partition_video_segments(video_id: str) -> TimeStamps:\r\n video_segments: TimeStamps = get_timestamps(video_id=video_id)\r\n return video_segments\r\n \r\ndef get_description(video_id: str) -> str:\r\n video_path: str = path.join(descriptions_dir, f\"{video_id}.txt\")\r\n if not path.exists(video_path):\r\n description: str = download_description(video_id=video_id)\r\n save_description(description=description, video_id=video_id)\r\n else:\r\n with open(video_path, \"r\", encoding=\"utf-8\") as f:\r\n description: str = f.read()\r\n return description\r\n\r\n\r\ndef download_description(video_id: str) -> None:\r\n response: YouTubeListResponse = youtube_client.find_video_by_id(video_id=video_id)\r\n video: Video = response.items[0]\r\n description: str = video.snippet.description\r\n return description\r\n \r\n \r\nparser = PydanticOutputParser(pydantic_object=TimeStamps)\r\n\r\nsegment_str: str = (\"\"\"Extract the time stamps and their titles from the following text. Only\"\"\" \r\n \"\"\" include valid time stamps.\\n{format_instructions}\\ntext: ```{text}```\"\"\"\r\n)\r\n\r\ndef get_video_segments(video_description: str, segment_str: str = segment_str, \r\n llm: BaseLanguageModel = gemma_2b):\r\n template: PromptTemplate = PromptTemplate(template=segment_str, \r\n input_variables=[\"text\"],\r\n partial_variables={\"format_instructions\": parser.get_format_instructions()}\r\n )\r\n chain = template | llm | parser\r\n inputs: dict[str, str] = {\r\n \"text\": video_description\r\n }\r\n"} +{"file_name": "3b26fe45-c580-48f4-917d-a0ab012f1a42.png", "code": " res: TimeStamps = chain.invoke(inputs)\r\n # res.time_stamps.sort(key=lambda x: x.start_time)\r\n return res\r\n\r\n\r\nids: dict[str, str] = {\r\n \"set_mismatch\": \"d-ulaeRBA64\",\r\n \"leaf_similar_tree\": \"Nr8dbnL0_cM\",\r\n \"mk_vld_par\": \"mgQ4O9iUEbg\",\r\n \"pams\": \"kWhy4ZUBdOY\",\r\n \"sapltk\": \"Cg6_nF7YIks\",\r\n \"smallest_str_leaf\": \"UvdWfxQ_ZDs\",\r\n \"sub_arr_k_diff_ints\": \"etI6HqWVa8U\",\r\n \"remv_nodes_lnkd_lst\": \"y783sRTezDg\",\r\n \"rvl_card_inc_order\": \"i2QrUdwWlak\",\r\n \"rmv_dup_srt_arr_2\": \"ycAq8iqh0TI\",\r\n \"town_jdg\": \"QiGaxdUINJ8\",\r\n \"rang_sm_bst\": \"uLVG45n4Sbg\",\r\n \"artmtc_slcs_2\": \"YIMwwT9JdIE\",\r\n \"lst_unq_ints_k_rmvl\": \"Nsp_ta7SlEk\",\r\n \"all_ppl_scrt\": \"1XujGRSU1bQ\",\r\n \"stdnts_mss_lnch\": \"d_cvtFwnOZg\",\r\n}\r\nvideo_id: str = ids[\"stdnts_mss_lnch\"]\r\n\r\nclass Segment(BaseModel):\r\n time_stamp: str = Field(description=\"The time stamp\")\r\n title: str = Field(description=\"The time stamp title\")\r\n \r\ngemma_parser = PydanticOutputParser(pydantic_object=Segment)\r\n\r\nsegment_str_gemma: str = (\"\"\"Extract all the time stamps and their titles from the following text. Only\"\"\" \r\n \"\"\" include valid time stamps.Return a json string only with the keys \"\"\"\r\n \"\"\"```time_stamp``` and ```title```.\\ntext: ```{text}```\"\"\"\r\n)\r\n\r\nsegment_str_gemma_v1: str = (\"\"\"Extract all the start time stamps, end time stamps and their titles from the following text. Only\"\"\" \r\n \"\"\" include valid time stamps.Return a json string only with the keys \"\"\"\r\n \"\"\"```start_time```, ```end_time``` and ```title```.\\ntext: ```{text}```\"\"\"\r\n)\r\n"} +{"file_name": "f45ae49f-0150-4b4d-bc49-dcde3a153dae.png", "code": "def gemma_extraction(video_id: str):\r\n description: str = get_description(video_id=video_id)\r\n template: PromptTemplate = PromptTemplate(template=segment_str_gemma, \r\n input_variables=[\"text\"]\r\n )\r\n chain = template | llama_2b \r\n inputs: dict[str, str] = {\r\n \"text\": description\r\n }\r\n res = chain.invoke(inputs)\r\n print(res)\r\n \r\n \r\ndef get_channel_id(channel_name: str, youtube: YouTube = get_youtube_client()) -> str:\r\n response: YouTubeResponse = youtube.find_channel_by_name(display_name=channel_name)\r\n search_result: Search = response.items[0]\r\n channel_id: str = search_result.channel_id\r\n return channel_id\r\n\r\ndef get_channel_playlists(channel_name: str, youtube: YouTube = get_youtube_client()) -> list[str]:\r\n # channel_id: str = get_channel_id(channel_name=channel_name, youtube=youtube)\r\n channel_id: str = \"UC_mYaQAE6-71rjSN6CeCA-g\"\r\n response: YouTubeListResponse = youtube.find_channel_playlists(channel_id=channel_id)\r\n playlists: list[Playlist] = response.items\r\n playlist_ids: list[str] = [playlist.id for playlist in playlists]\r\n return playlist_ids\r\n \r\n\r\ndef main(video_id: str = video_id):\r\n # output: TimeStamps = partition_video_segments(video_id=video_id)\r\n # print(output) \r\n # gemma_extraction(video_id=video_id)\r\n channel_name: str = \"neetcode\"\r\n playlist_ids: list[str] = get_channel_playlists(channel_name=channel_name)\r\n print(playlist_ids)\r\n \r\n "}