|
109 | 109 | "metadata": {}, |
110 | 110 | "outputs": [], |
111 | 111 | "source": [ |
112 | | - "print(\"Je vais dire plusieurs fois que la télédétection c'est super.\", \"Je vous propose de tenir un décompte, pour l'instant ça fait :\", 7)" |
| 112 | + "print(\n", |
| 113 | + " \"Je vais dire plusieurs fois que la télédétection c'est super.\",\n", |
| 114 | + " \"Je vous propose de tenir un décompte, pour l'instant ça fait :\",\n", |
| 115 | + " 7,\n", |
| 116 | + ")" |
113 | 117 | ] |
114 | 118 | }, |
115 | 119 | { |
|
214 | 218 | "outputs": [], |
215 | 219 | "source": [ |
216 | 220 | "age = 40\n", |
217 | | - "f'J\\'ai {age} ans'" |
| 221 | + "f\"J'ai {age} ans\"" |
218 | 222 | ] |
219 | 223 | }, |
220 | 224 | { |
|
484 | 488 | "pixel_rgb = [37, 150, 190]\n", |
485 | 489 | "pixel_nir = [0]\n", |
486 | 490 | "\n", |
487 | | - "pixel_rgbnir = pixel_rgb + pixel_nir \n", |
| 491 | + "pixel_rgbnir = pixel_rgb + pixel_nir\n", |
488 | 492 | "print(pixel_rgbnir)" |
489 | 493 | ] |
490 | 494 | }, |
|
507 | 511 | "outputs": [], |
508 | 512 | "source": [ |
509 | 513 | "pixel_nir = pixel_rgbnir.pop()\n", |
510 | | - "print(f'On récupère le pixel NIR : {pixel_nir} et le pixel RGB qui a perdu son NIR : {pixel_rgbnir}')" |
| 514 | + "print(\n", |
| 515 | + " f\"On récupère le pixel NIR : {pixel_nir} et le pixel RGB qui a perdu son NIR : {pixel_rgbnir}\"\n", |
| 516 | + ")" |
511 | 517 | ] |
512 | 518 | }, |
513 | 519 | { |
|
533 | 539 | "metadata": {}, |
534 | 540 | "outputs": [], |
535 | 541 | "source": [ |
536 | | - "mon_point = {\n", |
537 | | - " \"type\" : \"Point\",\n", |
538 | | - " \"coordonnees\" : [-71, 41]\n", |
539 | | - " }" |
| 542 | + "mon_point = {\"type\": \"Point\", \"coordonnees\": [-71, 41]}" |
540 | 543 | ] |
541 | 544 | }, |
542 | 545 | { |
|
608 | 611 | "metadata": {}, |
609 | 612 | "outputs": [], |
610 | 613 | "source": [ |
611 | | - "pixels = [[100, 100, 100, 100], [120, 100, 110, 20], [100, 50, 110, 120]]\n" |
| 614 | + "pixels = [[100, 100, 100, 100], [120, 100, 110, 20], [100, 50, 110, 120]]" |
612 | 615 | ] |
613 | 616 | }, |
614 | 617 | { |
|
650 | 653 | "source": [ |
651 | 654 | "pixel_rgbnir = [120, 100, 110, 20]\n", |
652 | 655 | "\n", |
653 | | - "for color in pixel_rgbnir :\n", |
| 656 | + "for color in pixel_rgbnir:\n", |
654 | 657 | " print(color)" |
655 | 658 | ] |
656 | 659 | }, |
|
691 | 694 | "metadata": {}, |
692 | 695 | "outputs": [], |
693 | 696 | "source": [ |
694 | | - "pixels = [[100, 100, 100, 100], [120, 100, 110, 20], [100, 50, 110, 120]]\n" |
| 697 | + "pixels = [[100, 100, 100, 100], [120, 100, 110, 20], [100, 50, 110, 120]]" |
695 | 698 | ] |
696 | 699 | }, |
697 | 700 | { |
|
715 | 718 | "def bravo_la_teledec():\n", |
716 | 719 | " print(\"La télédétection c'est vraiment super !\")\n", |
717 | 720 | "\n", |
| 721 | + "\n", |
718 | 722 | "bravo_le_sertit()" |
719 | 723 | ] |
720 | 724 | }, |
|
727 | 731 | "def bravo_le_(nom_entreprise):\n", |
728 | 732 | " print(\"Le\", nom_entreprise, \"c'est vraiment super !\")\n", |
729 | 733 | "\n", |
| 734 | + "\n", |
730 | 735 | "bravo_le_(\"sertit\")" |
731 | 736 | ] |
732 | 737 | }, |
|
805 | 810 | "def bravo_le_(nom_entreprise=\"sertit\"):\n", |
806 | 811 | " print(\"Le\", nom_entreprise, \"c'est vraiment super !\")\n", |
807 | 812 | "\n", |
| 813 | + "\n", |
808 | 814 | "bravo_le_()\n", |
809 | 815 | "bravo_le_(\"laboratoire icube\")" |
810 | 816 | ] |
|
826 | 832 | " nom_entreprise_caché = \"laboratoire icube\"\n", |
827 | 833 | " print(\"Le\", nom_entreprise, \"c'est vraiment super !\")\n", |
828 | 834 | "\n", |
| 835 | + "\n", |
829 | 836 | "bravo_le_()\n", |
830 | 837 | "print(nom_entreprise_caché)" |
831 | 838 | ] |
|
843 | 850 | "metadata": {}, |
844 | 851 | "outputs": [], |
845 | 852 | "source": [ |
846 | | - "nom_entreprise=\"sertit\"\n", |
| 853 | + "nom_entreprise = \"sertit\"\n", |
| 854 | + "\n", |
847 | 855 | "\n", |
848 | 856 | "def bravo_le_():\n", |
849 | 857 | " nom_entreprise = \"laboratoire icube\"\n", |
850 | 858 | "\n", |
| 859 | + "\n", |
851 | 860 | "print(\"Le\", nom_entreprise, \"c'est vraiment super !\")" |
852 | 861 | ] |
853 | 862 | }, |
|
864 | 873 | "metadata": {}, |
865 | 874 | "outputs": [], |
866 | 875 | "source": [ |
867 | | - "nom_entreprise=\"sertit\"\n", |
| 876 | + "nom_entreprise = \"sertit\"\n", |
| 877 | + "\n", |
868 | 878 | "\n", |
869 | 879 | "def bravo_le_(nom_entreprise):\n", |
870 | 880 | " nom_entreprise = \"laboratoire icube\"\n", |
871 | 881 | " return nom_entreprise\n", |
872 | 882 | "\n", |
| 883 | + "\n", |
873 | 884 | "nom_entreprise = bravo_le_(nom_entreprise)\n", |
874 | 885 | "print(\"Le\", nom_entreprise, \"c'est vraiment super !\")" |
875 | 886 | ] |
|
972 | 983 | "import numpy as np\n", |
973 | 984 | "\n", |
974 | 985 | "# Création d'une fonction de 2x3\n", |
975 | | - "m = np.arange(0, 6).reshape([2,3])\n", |
| 986 | + "m = np.arange(0, 6).reshape([2, 3])\n", |
976 | 987 | "print(m)" |
977 | 988 | ] |
978 | 989 | }, |
|
1111 | 1122 | "outputs": [], |
1112 | 1123 | "source": [ |
1113 | 1124 | "import matplotlib.pyplot as plt\n", |
1114 | | - "plt.imshow(image_rgbnir[:,:,:3])" |
| 1125 | + "\n", |
| 1126 | + "plt.imshow(image_rgbnir[:, :, :3])" |
1115 | 1127 | ] |
1116 | 1128 | }, |
1117 | 1129 | { |
|
1144 | 1156 | "source": [ |
1145 | 1157 | "# Pour afficher le résultat\n", |
1146 | 1158 | "\n", |
1147 | | - "#water_pixels = votre résultat\n", |
1148 | | - "#plt.imshow(water_pixels)" |
| 1159 | + "# water_pixels = votre résultat\n", |
| 1160 | + "# plt.imshow(water_pixels)" |
1149 | 1161 | ] |
1150 | 1162 | }, |
1151 | 1163 | { |
|
0 commit comments