|
105 | 105 | },
|
106 | 106 | {
|
107 | 107 | "cell_type": "code",
|
108 |
| - "execution_count": 1, |
| 108 | + "execution_count": null, |
109 | 109 | "metadata": {
|
110 | 110 | "colab": {
|
111 | 111 | "base_uri": "https://localhost:8080/"
|
|
131 | 131 | },
|
132 | 132 | {
|
133 | 133 | "cell_type": "code",
|
134 |
| - "execution_count": 3, |
| 134 | + "execution_count": null, |
135 | 135 | "metadata": {
|
136 | 136 | "id": "BxTy_B8NtN9t"
|
137 | 137 | },
|
|
151 | 151 | },
|
152 | 152 | {
|
153 | 153 | "cell_type": "code",
|
154 |
| - "execution_count": 4, |
| 154 | + "execution_count": null, |
155 | 155 | "metadata": {
|
156 | 156 | "colab": {
|
157 | 157 | "base_uri": "https://localhost:8080/"
|
|
188 | 188 | },
|
189 | 189 | {
|
190 | 190 | "cell_type": "code",
|
191 |
| - "execution_count": 5, |
| 191 | + "execution_count": null, |
192 | 192 | "metadata": {
|
193 | 193 | "id": "bo8FyvIg6bGL"
|
194 | 194 | },
|
|
231 | 231 | "id": "HIFFxI1vy90M",
|
232 | 232 | "outputId": "fed560e5-1b49-4b98-d377-77b8d3d694c0"
|
233 | 233 | },
|
234 |
| - "execution_count": 51, |
| 234 | + "execution_count": null, |
235 | 235 | "outputs": [
|
236 | 236 | {
|
237 | 237 | "output_type": "stream",
|
|
268 | 268 | "metadata": {
|
269 | 269 | "id": "u68MNVVH2Rbt"
|
270 | 270 | },
|
271 |
| - "execution_count": 17, |
| 271 | + "execution_count": null, |
272 | 272 | "outputs": []
|
273 | 273 | },
|
274 | 274 | {
|
|
293 | 293 | "id": "AuXqx1L_2eOg",
|
294 | 294 | "outputId": "141215db-7a04-4638-a4a9-ffe34e2cf4b7"
|
295 | 295 | },
|
296 |
| - "execution_count": 13, |
| 296 | + "execution_count": null, |
297 | 297 | "outputs": [
|
298 | 298 | {
|
299 | 299 | "output_type": "stream",
|
|
336 | 336 | "metadata": {
|
337 | 337 | "id": "xXIgX_g9276d"
|
338 | 338 | },
|
339 |
| - "execution_count": 19, |
| 339 | + "execution_count": null, |
340 | 340 | "outputs": []
|
341 | 341 | },
|
342 | 342 | {
|
|
445 | 445 | "https://maps.googleapis.com/maps/api/staticmap?key={key}¢er={center}&zoom={zoom}&maptype={maptype}&size={size}\"\n",
|
446 | 446 | "```\n",
|
447 | 447 | "\n",
|
448 |
| - "The values inside the {} need to be replaced" |
| 448 | + "The values inside the {} need to be replaced." |
449 | 449 | ],
|
450 | 450 | "metadata": {
|
451 | 451 | "id": "G7BpldHgHRbO"
|
|
484 | 484 | {
|
485 | 485 | "cell_type": "code",
|
486 | 486 | "source": [
|
487 |
| - "response = requests.get(url)\n", |
488 |
| - "image_content = response.content\n", |
489 |
| - "image_file = open(\"test.jpg\", \"wb\")\n", |
490 |
| - "image_file.write(image_content)\n", |
491 |
| - "image_file.close()" |
| 487 | + "response = requests.get(url) # fetch the image\n", |
| 488 | + "image_content = response.content # save the response in a variable\n", |
| 489 | + "image_file = open(\"test.jpg\", \"wb\") # open a file-handler\n", |
| 490 | + "image_file.write(image_content) # write the saved image into the file\n", |
| 491 | + "image_file.close() # close the file-handler" |
492 | 492 | ],
|
493 | 493 | "metadata": {
|
494 | 494 | "id": "ksVfOdJywzq2"
|
|
499 | 499 | {
|
500 | 500 | "cell_type": "markdown",
|
501 | 501 | "source": [
|
502 |
| - "Combining this with `locations.csv` creates following code:" |
| 502 | + "Combining this with `locations.csv` creates following code (in case you don't have the locations file in your drive please make sure you have downloaded it by executing following cell:" |
503 | 503 | ],
|
504 | 504 | "metadata": {
|
505 | 505 | "id": "eSY_TMghxZV3"
|
506 | 506 | }
|
507 | 507 | },
|
| 508 | + { |
| 509 | + "cell_type": "code", |
| 510 | + "source": [ |
| 511 | + "!wget https://raw.githubusercontent.com/fleshgordo/scrapinghub/main/data/locations.csv -O sample_data/locations.csv " |
| 512 | + ], |
| 513 | + "metadata": { |
| 514 | + "id": "kEkqeLoWPsFP" |
| 515 | + }, |
| 516 | + "execution_count": null, |
| 517 | + "outputs": [] |
| 518 | + }, |
508 | 519 | {
|
509 | 520 | "cell_type": "code",
|
510 | 521 | "source": [
|
|
559 | 570 | "metadata": {
|
560 | 571 | "id": "GQV1VrlRyXYz"
|
561 | 572 | },
|
562 |
| - "execution_count": 22, |
| 573 | + "execution_count": null, |
563 | 574 | "outputs": []
|
564 | 575 | },
|
565 | 576 | {
|
|
0 commit comments