├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── .vscode ├── embeds.code-snippets ├── icons.code-snippets ├── tabs.code-snippets └── tags.code-snippets ├── LICENSE.txt ├── README.md ├── docs ├── computer │ ├── bestsoftware.md │ ├── filesystem.md │ ├── img │ │ ├── apt_example.png │ │ ├── chocolatey_example.png │ │ ├── filepermissions.png │ │ ├── homebrew_example1.png │ │ ├── homebrew_example2.png │ │ ├── powershell_admin.png │ │ └── windows_disable_alias.png │ ├── index.md │ ├── packagemanager.md │ ├── perfectsetup.md │ └── terminal.md ├── contribute.md ├── cpp │ ├── cmake.md │ ├── img │ │ ├── bootstrap.png │ │ ├── clion_settings.jpg │ │ ├── cmake_location.jpg │ │ ├── cmake_version.jpg │ │ ├── gdb_version.jpg │ │ ├── go_home_dir.jpg │ │ ├── install_cgal.jpg │ │ ├── settings.jpg │ │ ├── sudo_update.jpg │ │ └── wsl_default.jpg │ ├── install.md │ ├── installlibs.md │ ├── python2cpp.md │ ├── vcpkgwindows.md │ ├── wslclion.md │ └── xcode.md ├── git │ ├── githubactions.md │ ├── gitintro.md │ ├── goodgit.md │ ├── index.md │ └── install.md ├── img │ ├── editpage.png │ ├── tud.png │ └── tudblue.png ├── index.md ├── js │ └── extra.js ├── linux │ ├── files │ │ ├── Linux_Introduction.pdf │ │ └── VirtualBox_Kubuntu_Installation_Guide.pdf │ ├── img │ │ ├── WinSCP0.jpeg │ │ ├── WinSCP1.jpeg │ │ ├── cmd-2.jpg │ │ ├── copy_ubuntu.jpg │ │ └── setup-3.jpg │ ├── index.md │ ├── intro.md │ ├── ssh.md │ ├── virtualbox.md │ └── wsl.md ├── misc │ └── delftblue.md ├── programming │ ├── _decision_tree │ │ ├── .pages │ │ ├── local │ │ │ ├── desktop │ │ │ │ ├── compiled │ │ │ │ │ └── index.md │ │ │ │ ├── index.md │ │ │ │ └── interpreted │ │ │ │ │ └── index.md │ │ │ ├── index.md │ │ │ └── mobile │ │ │ │ └── index.md │ │ └── web │ │ │ └── index.md │ ├── chooselanguage.md │ ├── collabcode.md │ └── debugging.md ├── python │ ├── img │ │ ├── activate.png │ │ ├── cli.png │ │ ├── jupyter-1.png │ │ ├── jupyter-2.png │ │ ├── jupyter-3.png │ │ ├── jupyter-pycharm-install.png │ │ ├── jupyter-pycharm-run.png │ │ ├── pyenvpycharm-1.png │ │ ├── pyenvpycharm-2.png │ │ ├── pyenvpycharm-3.png │ │ └── xkcd.png │ ├── index.md │ ├── install.md │ ├── jupyter.md │ ├── pip.md │ ├── pypackages.md │ └── venv.md ├── research │ ├── img │ │ ├── ellie.png │ │ ├── fabian.png │ │ ├── noortje.png │ │ └── zhaiyu.png │ ├── msccode.md │ └── researchtips.md ├── styleguide.md ├── stylesheets │ └── extra.css └── writing │ ├── files │ ├── intro_latex_tudelft3d.pdf │ ├── latex_result.pdf │ ├── latex_result.tex │ ├── md_result.html │ └── md_result.md.txt │ ├── img │ ├── chatgpt.png │ ├── fc.svg │ ├── overleaf.png │ ├── typst.png │ └── vscode.png │ ├── index.md │ ├── latex.md │ ├── latextogether.md │ ├── markdown.md │ ├── references.md │ └── typst.md ├── mkdocs.yml ├── overrides └── partials │ ├── copyright.html │ └── footer.html └── pyproject.toml /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | on: 3 | push: 4 | branches: 5 | - main 6 | permissions: 7 | contents: write 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - uses: actions/setup-python@v4 14 | with: 15 | python-version: 3.x 16 | - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV 17 | - uses: actions/cache@v3 18 | with: 19 | key: mkdocs-material-${{ env.cache_id }} 20 | path: .cache 21 | restore-keys: | 22 | mkdocs-material- 23 | - run: pip install mkdocs-material mkdocs-awesome-pages-plugin 24 | - run: mkdocs gh-deploy --force 25 | - run: curl -L ${{ secrets.UPDATE_URL }} 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Specify filepatterns you want git to ignore. 2 | 3 | *.DS_Store 4 | site/ -------------------------------------------------------------------------------- /.vscode/embeds.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "Video": { 3 | "scope": "markdown", 4 | "prefix": [ 5 | "\\video-embed" 6 | ], 7 | "body": [ 8 | "!!! video \"$1\"", 9 | "
", 12 | " $2", 13 | " ", 14 | ] 15 | }, 16 | "External link": { 17 | "scope": "markdown", 18 | "prefix": [ 19 | "\\external-link" 20 | ], 21 | "body": [ 22 | "!!! external-link \"$1\"", 23 | " $2", 24 | ] 25 | } 26 | } -------------------------------------------------------------------------------- /.vscode/icons.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "Python icon": { 3 | "scope": "markdown", 4 | "prefix": [ 5 | "\\ipython" 6 | ], 7 | "body": [ 8 | ":simple-python:", 9 | ] 10 | }, 11 | "C++ icon": { 12 | "scope": "markdown", 13 | "prefix": [ 14 | "\\icpp" 15 | ], 16 | "body": [ 17 | ":simple-cplusplus:", 18 | ] 19 | }, 20 | "HTML icon": { 21 | "scope": "markdown", 22 | "prefix": [ 23 | "\\ihtml" 24 | ], 25 | "body": [ 26 | ":simple-html5:", 27 | ] 28 | }, 29 | "CSS icon": { 30 | "scope": "markdown", 31 | "prefix": [ 32 | "\\icss" 33 | ], 34 | "body": [ 35 | ":simple-css3:", 36 | ] 37 | }, 38 | "Javascript icon": { 39 | "scope": "markdown", 40 | "prefix": [ 41 | "\\ijavascript" 42 | ], 43 | "body": [ 44 | ":simple-javascript:", 45 | ] 46 | }, 47 | "Windows icon": { 48 | "scope": "markdown", 49 | "prefix": [ 50 | "\\iwindows" 51 | ], 52 | "body": [ 53 | ":simple-windows:", 54 | ] 55 | }, 56 | "Apple icon": { 57 | "scope": "markdown", 58 | "prefix": [ 59 | "\\iapple", 60 | "\\imacos" 61 | ], 62 | "body": [ 63 | ":simple-apple:", 64 | ] 65 | }, 66 | "Linux icon": { 67 | "scope": "markdown", 68 | "prefix": [ 69 | "\\ilinux" 70 | ], 71 | "body": [ 72 | ":simple-linux:", 73 | ] 74 | }, 75 | "Terminal icon": { 76 | "scope": "markdown", 77 | "prefix": [ 78 | "\\iterminal" 79 | ], 80 | "body": [ 81 | ":octicons-terminal-16:", 82 | ] 83 | }, 84 | "Pycharm icon": { 85 | "scope": "markdown", 86 | "prefix": [ 87 | "\\ipycharm" 88 | ], 89 | "body": [ 90 | ":simple-pycharm:", 91 | ] 92 | }, 93 | "CLion icon": { 94 | "scope": "markdown", 95 | "prefix": [ 96 | "\\iclion" 97 | ], 98 | "body": [ 99 | ":simple-clion:", 100 | ] 101 | }, 102 | "Visual Studio Code icon": { 103 | "scope": "markdown", 104 | "prefix": [ 105 | "\\ivscode" 106 | ], 107 | "body": [ 108 | ":simple-visualstudiocode:", 109 | ] 110 | }, 111 | "QGIS icon": { 112 | "scope": "markdown", 113 | "prefix": [ 114 | "\\iqgis" 115 | ], 116 | "body": [ 117 | ":simple-qgis:", 118 | ] 119 | }, 120 | "ArcGIS icon": { 121 | "scope": "markdown", 122 | "prefix": [ 123 | "\\iarcgis" 124 | ], 125 | "body": [ 126 | ":simple-arcgis:", 127 | ] 128 | } 129 | } -------------------------------------------------------------------------------- /.vscode/tabs.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "OS Windows/Unix": { 3 | "scope": "markdown", 4 | "prefix": [ 5 | "\\os_win_unix" 6 | ], 7 | "body": [ 8 | "=== \":simple-windows: Windows\"", 9 | " ", 10 | " $1", 11 | " ", 12 | "=== \":simple-apple: :simple-linux: Unix (MacOS & Linux)\"", 13 | " ", 14 | " $2", 15 | " ", 16 | ] 17 | }, 18 | "OS WindowsLinux/MacOS": { 19 | "scope": "markdown", 20 | "prefix": [ 21 | "\\os_winlinux_macos" 22 | ], 23 | "body": [ 24 | "=== \":simple-windows: :simple-linux: Windows & Linux\"", 25 | " ", 26 | " $1", 27 | " ", 28 | "=== \":simple-apple: MacOS\"", 29 | " ", 30 | " $2", 31 | " ", 32 | ] 33 | }, 34 | "OS Windows/MacOS/Linux": { 35 | "scope": "markdown", 36 | "prefix": [ 37 | "\\os_win_macos_linux" 38 | ], 39 | "body": [ 40 | "=== \":simple-windows: Windows\"", 41 | " ", 42 | " $1", 43 | " ", 44 | "=== \":simple-apple: MacOS\"", 45 | " ", 46 | " $2", 47 | " ", 48 | "=== \":simple-linux: Linux\"", 49 | " ", 50 | " $3", 51 | " ", 52 | ] 53 | }, 54 | "Python Tab": { 55 | "scope": "markdown", 56 | "prefix": [ 57 | "\\pytab" 58 | ], 59 | "body": [ 60 | "=== \":simple-python: Python\"", 61 | " ", 62 | " ```python", 63 | " $1", 64 | " ```", 65 | " ", 66 | ] 67 | }, 68 | "C++ Tab": { 69 | "scope": "markdown", 70 | "prefix": [ 71 | "\\cpptab" 72 | ], 73 | "body": [ 74 | "=== \":simple-cplusplus: C++\"", 75 | " ", 76 | " ```cpp", 77 | " $1", 78 | " ```", 79 | " ", 80 | ] 81 | } 82 | } -------------------------------------------------------------------------------- /.vscode/tags.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "Beginner" : { 3 | "scope": "markdown", 4 | "prefix": "\\beginner", 5 | "body": [ 6 | "⭐️ Beginner" 7 | ], 8 | "description": "Beginner" 9 | }, 10 | "Intermediate" : { 11 | "scope": "markdown", 12 | "prefix": "\\intermediate", 13 | "body": [ 14 | "⭐️ Intermediate" 15 | ], 16 | "description": "Intermediate" 17 | }, 18 | "Advanced" : { 19 | "scope": "markdown", 20 | "prefix": "\\advanced", 21 | "body": [ 22 | "⭐️ Advanced" 23 | ], 24 | "description": "Advanced" 25 | }, 26 | } -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public licenses. 379 | Notwithstanding, Creative Commons may elect to apply one of its public 380 | licenses to material it publishes and in those instances will be 381 | considered the “Licensor.” The text of the Creative Commons public 382 | licenses is dedicated to the public domain under the CC0 Public Domain 383 | Dedication. Except for the limited purpose of indicating that material 384 | is shared under a Creative Commons public license or as otherwise 385 | permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the public 393 | licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # geogeek 3 | 4 | The place where geogeeks go to know "how to do X". 5 | 6 | [![](docs/img/editpage.png)](https://tudelft3d.github.io/geogeek) 7 | 8 | ## To compile locally 9 | 10 | 1. `pip install mkdocs-material mkdocs-awesome-pages-plugin` 11 | 1. (`pip install --upgrade --force-reinstall mkdocs-material` to upgrade to latest version v9+) 12 | 1. `mkdocs serve` (when you modify the source of a page, the localhost serve updates automatically) 13 | 14 | -------------------------------------------------------------------------------- /docs/computer/bestsoftware.md: -------------------------------------------------------------------------------- 1 | 2 | # Best software 🏆 3 | 4 | 5 | This is where it's getting fun, a totally non-objective list of what the staff of the MSc Geomatics find "best" to perform daily tasks with computers. 6 | 7 | | Staff | OS | Text editor | Git client | C++ IDE | Python IDE | LaTeX | Reference manager | 8 | | :---------- | :- | :----------- | :--------- | :------ | :--------- | :---- | :---------------- | 9 | | [Akshay](https://3d.bk.tudelft.nl/apatil/) | Linux | Visual Studio Code / nano | git command line | Visual Studio Code | Visual Studio Code | Overleaf (online) / TexMaker + compile scripts (local) | Mendeley | 10 | | [Clara](https://3d.bk.tudelft.nl/apatil/) | macOS / Linux | vim / Visual Studio Code | git command line | Visual Studio Code | Visual Studio Code | Overleaf (online) / Visual Studio Code | Zotero | 11 | | [Hugo](https://3d.bk.tudelft.nl/hledoux) | macOS | Sublime Text | [Sublime Merge](https://www.sublimemerge.com/) | CLion | Sublime Text | Sublime Text + [LaTeXTools](https://latextools.readthedocs.io/en/latest/) | BibDesk (bundled with MacTeX) | 12 | | [Ivan](https://3d.bk.tudelft.nl/ipaden) | macOS / Linux | Vim | Terminal | CLion | PyCharm | Texmaker | Mendeley | 13 | | [Lukas](https://3d.bk.tudelft.nl/lbeuster/) | macOS (recent convert) | Sublime Text | GitHub Desktop | C++? | Jupyter Lab / VSC | Visual Studio Code + [Latex Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) (blatantly appropriated from Maarten)| [Papers](https://www.papersapp.com/) | 14 | | [Maarten](https://evetion.nl) | macOS / Linux | Visual Studio Code | git / Sublime Merge | Visual Studio Code | Visual Studio Code | Visual Studio Code + [Latex Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) | Zotero | 15 | -------------------------------------------------------------------------------- /docs/computer/filesystem.md: -------------------------------------------------------------------------------- 1 | # Filesystem 2 | 3 | Developing software means that you'll interact with the file system of your computer, and you have to understand how it works, how to create files and folder, how to delete, how to navigate, etc. 4 | 5 | !!! video "Understanding the file system (Part 1)" 6 |
7 | 8 |
9 | This explains the basics: what is a file, an extension, a folder, etc. 10 | It is of the utmost importance to fully understand this! 11 | Also, since you'll be during the MSc working with Linux, you should also understand how [its file system works](terminal.md) (it is the same as macOS but rather different from Windows). 12 | 13 | !!! video "Understanding the file system (Part 2)" 14 |
15 | 16 |
17 | This explains the basics operations on files and folders: creation of them, deletion, moving, copying, etc. 18 | The part about macOS is more or less the same for Linux. -------------------------------------------------------------------------------- /docs/computer/img/apt_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/apt_example.png -------------------------------------------------------------------------------- /docs/computer/img/chocolatey_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/chocolatey_example.png -------------------------------------------------------------------------------- /docs/computer/img/filepermissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/filepermissions.png -------------------------------------------------------------------------------- /docs/computer/img/homebrew_example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/homebrew_example1.png -------------------------------------------------------------------------------- /docs/computer/img/homebrew_example2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/homebrew_example2.png -------------------------------------------------------------------------------- /docs/computer/img/powershell_admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/powershell_admin.png -------------------------------------------------------------------------------- /docs/computer/img/windows_disable_alias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/computer/img/windows_disable_alias.png -------------------------------------------------------------------------------- /docs/computer/index.md: -------------------------------------------------------------------------------- 1 | 2 | # How to setup your computer 3 | 4 | ![](https://upload.wikimedia.org/wikipedia/commons/2/21/OpenGL_Tutorial_TODO.png){width=300x} -------------------------------------------------------------------------------- /docs/computer/packagemanager.md: -------------------------------------------------------------------------------- 1 | # Installing and using a package manager 2 | 3 | Package managers make your life easier, it's worth spending a few minutes to figure them out and use them from the start. 4 | 5 | --- 6 | 7 | A package manager is a bit like an app store with many tools for programmers. It helps install, manage, update, and delete programs and tools. We highly recommend using a package manager on your computer. 8 | 9 | Especially on macOS and Linux, package managers are so popular that many programs recommend using a package manager as the easiest way to install their software. 10 | 11 | ??? tip "Still not convinced? Here is an (extreme) example" 12 | 13 | Let's say you need the C and C++ compiler `gcc` for a project. 14 | 15 | If we go to the [official gcc installation instructions](https://gcc.gnu.org/install/), the installation process is split up into 5 steps. These steps include a list of around 30 other pieces of software you will first need to install, and a page with more than 10.000 words about all the configuration options. Click the link above to see the installation instructions for yourself. 16 | 17 | With the package manager Homebrew (macOS) you can simply run 18 | ```bash 19 | brew install gcc 20 | ``` 21 | And everything will be done automatically for you. 22 | 23 | Admittedly this is an extreme example, but in general package managers simplify the installation of software quite a bit. 24 | 25 | Different operating systems have different package managers. 26 | 27 | === ":simple-apple: macOS" 28 | 29 | For macOS, we recommend the [Homebrew package manager](https://brew.sh). It's free and open source. 30 | 31 | **To install Homebrew, simply run this command in your [terminal](terminal.md) and follow the instructions.** 32 | 33 | ```bash 34 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 35 | ``` 36 | (This command was taken from the [official installation guide](https://brew.sh)) 37 | 38 | It will probably tell you it needs to install the `xcode developer tools`, accept this option. 39 | 40 | On some Macs, Homebrew will advice you to run two extra commands after installation. Please read the last parts of the text that Homebrew printed to your terminal. It might ask you to run these commands: 41 | ```bash 42 | echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile 43 | eval "$(/opt/homebrew/bin/brew shellenv)" 44 | ``` 45 | 46 | **Homebrew is now installed!** 47 | 48 | !!! tip "How to install packages using Homebrew" 49 | You need to know the name of the package you're installing. Often it's the same (i.e. QGIS is `qgis`), but sometimes it's different and you need to look it up (See Where to find available packages). 50 | 51 | For example, if we want to install git we run 52 | ```powershell 53 | brew install git 54 | ``` 55 | in your terminal. It will start printing the progress of the installation and tell you when it's done. 56 | 57 | Some installations have special instructions at the end. 58 | 59 | ??? tip "Where to find available packages?" 60 | On the official [Homebrew website](https://brew.sh) you can find a search bar to search all available packages. 61 | 62 | ![](img/homebrew_example1.png) 63 | 64 | In this example, we've searched for "qgis", we see in the list the program we're looking for. 65 | 66 | !!! info "Casks and formulae" 67 | Homebrew can be used to install what they call casks and formulae. Simply said, casks are programs like Word and QGIS that have their own window. Formulae are tools that run in the terminal or in the background (like git or a compiler). If a cask and a formula have the same name, you have to add `--cask` in your installation command to install the cask, otherwise it will install the formula. 68 | 69 | Clicking on "qgis" in the list will give us more information. 70 | ![](img/homebrew_example2.png) 71 | 72 | 1. Package name 73 | 2. Command to install the package 74 | 3. Copy button for the installation command 75 | 4. Version of the package you're installing. 76 | 77 | Simply copy this command, and run it in your [terminal](terminal.md) 78 | 79 | !!! tip "More commands" 80 | Homebrew has more commands, for things like updating and uninstalling. For these, please see the [official documentation](https://docs.brew.sh/Manpage) (specifically `info`, `uninstall`, and `upgrade`). 81 | 82 | === ":simple-linux: Linux" 83 | 84 | This tab is geared towards Geomatics students using Ubuntu (under [Windows Subsystem for Linux](../linux/wsl.md)). If you're using another distro, we recommend finding a package management guide specific to that distro. 85 | 86 | Ubuntu comes installed with the `apt` package manager. It has a huge collection of available packages. 87 | 88 | !!! tip "How to install packages using apt" 89 | You need to know the name of the package you're installing. Often it's the same (i.e. QGIS is `qgis`), but sometimes it's different and you need to look it up (See Where to find available packages). 90 | 91 | For example, if we want to install git we run 92 | ```bash 93 | sudo apt install git 94 | ``` 95 | in your terminal. You might need to fill in your password. It will start printing the progress of the installation and tell you when it's done. 96 | 97 | Some installations have special instructions at the end. 98 | 99 | ??? tip "Where to find available packages?" 100 | Unlike the other operating systems' package managers, apt does not have a website to search available packages. Instead we use the `search` command. 101 | 102 | If we want to install qgis, we run: 103 | ```bash 104 | apt search qgis 105 | ``` 106 | This will print all available packages that contain the search term. 107 | 108 | ![](img/apt_example.png) 109 | 110 | In this example, we've searched for "qgis", we see in the list the program we're looking for (1). It also shows: 111 | 112 | 2. The version of this package. 113 | 3. What architecture it's available for. 114 | 115 | Copy the name here, and run `sudo apt install` with that name. 116 | 117 | !!! tip "More commands" 118 | apt has more commands, for things like updating and uninstalling. For these, we recommend [this tutorial](https://linuxize.com/post/how-to-use-apt-command/). 119 | 120 | === ":material-microsoft-windows: Windows" 121 | 122 | For Windows, we recommend the [Chocolatey package manager](https://chocolatey.org). We'll be using the free open source version. 123 | 124 | We recommend it over it's alternatives because of higher availability of packages, but admittedly the authors of this website do not have much experience with Windows package managers. 125 | 126 | The following instructions were taken from the [official Chocolatey installation guide](https://chocolatey.org/install). 127 | 128 | **Step 1: Open your Powershell terminal as administrator** 129 | 130 | ![](img/powershell_admin.png){:width="300px"} 131 | 132 | Using Windows search, search for Powershell, right-click it, and open as administrator. 133 | 134 | **Step 2: Set execution permissions** 135 | 136 | Run this command in Powershell 137 | ```powershell 138 | Set-ExecutionPolicy Bypass -Scope Process 139 | ``` 140 | You'll have to confirm by typing `Y` and pressing enter. This option allows us to run scripts in Powershell. (Note, in the official guide they also mention `Set-ExecutionPolicy AllSigned` but this option will not allow tools like pyenv to run.) 141 | 142 | **Step 3: Install Chocolatey** 143 | 144 | Paste the following into Powershell and press enter. 145 | ```powershell 146 | Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) 147 | ``` 148 | Run into an error? Perhaps the command has been updated on the [official installation guide](https://chocolatey.org/install). 149 | 150 | **Chocolatey is now installed!** 151 | 152 | !!! tip "How to install packages using Chocolatey" 153 | You need to know the name of the package you're installing. Often it's the same (i.e. QGIS is `qgis`), but sometimes it's different and you need to look it up (See Where to find available packages). 154 | 155 | For example, if we want to install git we run 156 | ```powershell 157 | choco install git 158 | ``` 159 | in Powershell. It will start printing the progress of the installation and tell you when it's done. 160 | 161 | ??? tip "Where to find available packages?" 162 | On the official [community packages page](https://community.chocolatey.org/packages) you can find the list of almost 10.000 available packages. 163 | 164 | ![](img/chocolatey_example.png) 165 | 166 | In this example, we've searched for "qgis". The results show: 167 | 168 | 1. The latest version of QGIS 169 | 2. The LTR version of QGIS, a separate version that has less bugs (usually recommended by teachers). 170 | 3. The command to install this package 171 | 4. A copy button for the installation command 172 | 173 | Simply copy this command, and run it in your Powershell [terminal](terminal.md) 174 | 175 | !!! tip "More commands" 176 | Chocolatey has more commands, for things like updating and uninstalling. For these, please see the [official documentation](https://docs.chocolatey.org/en-us/choco/commands/) (specifically `info`, `uninstall`, and `upgrade`). -------------------------------------------------------------------------------- /docs/computer/perfectsetup.md: -------------------------------------------------------------------------------- 1 | 2 | # Perfect setup for a geomatics engineer 3 | 4 | 5 | !!! warning 6 | This is *really* opinionated! 7 | 8 | 9 | === ":simple-apple: macOS" 10 | - **Package manager**: [Homebrew](https://brew.sh/) for pretty much everything 11 | - **Python**: [PyCharm](https://www.jetbrains.com/pycharm-edu/) as IDE; [Python Package Index (PyPI)](https://pypi.org/) as package manager; [pyenv](https://github.com/pyenv/pyenv) as environment manager 12 | - **C++**: [CLion](https://www.jetbrains.com/clion/) as IDE; [Homebrew](https://brew.sh/) as package manager; [CMake](../cpp/cmake.md) as builder 13 | - **GIS**: [QGIS](https://www.qgis.org/en/site/forusers/download.html) 14 | - **3D data**: [MeshLab](https://www.meshlab.net/) as viewer/editor of 2-manifold meshes; [CloudCompare](https://www.cloudcompare.org/) for point clouds; [ParaView](https://www.paraview.org/) for volumetric meshes 15 | - **LaTeX**: [MacTeX](https://www.tug.org/mactex/mactex-download.html) as compiler; your [favourite text editor](bestsoftware.md) as IDE; [JabRef](https://www.jabref.org/) for BibTeX management 16 | 17 | === ":simple-linux: Linux" 18 | - **Package manager**: [APT](https://en.wikipedia.org/wiki/APT_(software)) for pretty much everything (we assume you use a Debian-based version like Ubuntu) 19 | - **Python**: [PyCharm](https://www.jetbrains.com/pycharm-edu/) as IDE; [Python Package Index (PyPI)](https://pypi.org/) as package manager; [pyenv](https://github.com/pyenv/pyenv) as environment manager 20 | - **C++**: [CLion](https://www.jetbrains.com/clion/) as IDE; Advanced Packaging Tool ( `apt`) as package manager; [CMake](../cpp/cmake.md) as builder 21 | - **GIS**: [QGIS](https://www.qgis.org/en/site/forusers/download.html) 22 | - **3D data**: [MeshLab](https://www.meshlab.net/) as viewer/editor of 2-manifold meshes; [CloudCompare](https://www.cloudcompare.org/) for point clouds; [ParaView](https://www.paraview.org/) for volumetric meshes 23 | - **LaTeX**: `apt install texlive` as compiler; your [favourite text editor](bestsoftware.md) as IDE; [JabRef](https://www.jabref.org/) for BibTeX management 24 | 25 | === ":material-microsoft-windows: Windows" 26 | - **Package manager**: [Chocolatey](https://community.chocolatey.org/) to easily install packages without having to click 27 | - [WSL](../linux/wsl.md) is really important to be able to run Linux 28 | - **Python**: [PyCharm](https://www.jetbrains.com/pycharm-edu/) as IDE; [Python Package Index (PyPI)](https://pypi.org/) as package manager; [pyenv-win](https://github.com/pyenv-win/pyenv-win) as environment manager 29 | - **C++**: [CLion](https://www.jetbrains.com/clion/) as IDE; brew as package manager; [CMake](../cpp/cmake.md) as builder 30 | - **GIS**: [QGIS](https://www.qgis.org/en/site/forusers/download.html) 31 | - **3D data**: [MeshLab](https://www.meshlab.net/) as viewer/editor of 2-manifold meshes; [CloudCompare](https://www.cloudcompare.org/) for point clouds; [ParaView](https://www.paraview.org/) for volumetric meshes 32 | - **LaTeX**: [MikTeX](https://miktex.org/) as compiler; your [favourite text editor](bestsoftware.md) as IDE; [JabRef](https://www.jabref.org/) for BibTeX management 33 | 34 | -------------------------------------------------------------------------------- /docs/computer/terminal.md: -------------------------------------------------------------------------------- 1 | 2 | # Intro to the terminal 3 | 4 | The terminal (also called the *console*, *command line interface* (CLI)) is a tool to interact with computers by typing textual commands on your keyboard. 5 | Terminals are the "window" in which you type commands, and handle user input and output. 6 | 7 | !!! warning 8 | Notice that while the terms "terminal" and "shell" are often used interchangeably, they are not the same. 9 | 10 | A **shell** is a distinct component of a terminal, it takes the commands you type and translates them into actions that the operating system has to perform. 11 | 12 | Examples of shells: 13 | 14 | 1. **bash**: Bourne-Again SHell, common on Linux and macOS 15 | 2. **zsh**: extended bash with many improvements, now default on macOS 16 | 3. **PowerShell**: A Windows shell that integrates command-line shell and scripting language 17 | 18 | The terminal is a powerful tool mostly used by developers and power users. 19 | It's often a quicker and more precise way to interact with the computer, and it can well be the only way to perform some operations (ie they don't have a graphical-user interface (GUI)). 20 | 21 | 22 | ## Where is the terminal?? 23 | 24 | 25 | === ":simple-apple: macOS" 26 | It's built-in, it's called `Terminal.app` and it's in the `Applications` folder. 27 | 28 | === ":simple-linux: Linux" 29 | It's built-in, either called `GNOME Terminal` or `Konsole`. 30 | 31 | === ":material-microsoft-windows: Windows" 32 | While the `Command Prompt` (or `cmd`) could be used, we do not recommend it as it's too simple. 33 | Instead, use the `PowerShell`, which is already installed on all Windows machine. 34 | 35 | !!! external-link "A terminal emulator on the web" 36 | [Useful to fiddle and learn the basic commands of Linux/macOS](https://www.terminaltemple.com/). 37 | 38 | 39 | !!! note 40 | Observe that the commands for the PowerShell and those of macOS/Linux will differ slightly. 41 | For Windows, you can always install [WSL](../linux/wsl.md) and use the Linux terminal. 42 | 43 | 44 | ## Basic (bash) commands 45 | 46 | - `cat `: print to the console the content of the file 47 | - `cd `: change the current directory 48 | - `ls`: list files and directories 49 | - `mkdir `: create a new directory (as a child of `pwd`) 50 | - `mv `: move the file to another folder 51 | - `pwd`: print the current working directory 52 | - `rm `: remove/delete the file 53 | - `touch `: create a new file 54 | 55 | 56 | ## Navigation in the filesystem 57 | 58 | The Linux filesystem is a tree, its root is `/`. 59 | 60 | - `.` (dot): is the current directory (`pwd` to know where you are) 61 | - `..`: is the parent directory 62 | - `~`: is your home folder 63 | 64 | So let's say you want to move to the parent folder: `cd ..` 65 | 66 | 67 | 68 | ## File permissions 69 | 70 | ![](./img/filepermissions.png) 71 | 72 | 73 | ## A video explaining all of the above at length 74 | 75 | !!! video "Beginner's Guide to the Bash Terminal. ⭐️ Beginner" 76 |
77 | 78 |
79 | This video gives a very good overview of pretty much everything you need to know. 80 | It's long, but totally worth it in our opinion! 81 | -------------------------------------------------------------------------------- /docs/contribute.md: -------------------------------------------------------------------------------- 1 | --- 2 | status: new 3 | --- 4 | 5 | # (spotted an error?) 6 | 7 | !!! warning "Spotted an error? A page is missing?" 8 | 9 | __Then fix it!__ 10 | 11 | geogeeks will only stay up-to-date if you help us! 12 | 13 | 14 | ![](img/editpage.png) 15 | 16 | 1. On any page: click on the 'Edit this page' 17 | 2. You have to login to GitHub 18 | 3. Modify the Markdown text following our [style guide](styleguide.md) 19 | 4. Create a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) 20 | 5. voilà -------------------------------------------------------------------------------- /docs/cpp/cmake.md: -------------------------------------------------------------------------------- 1 | 2 | # CMake 3 | 4 | [CMake](https://cmake.org) is a cross-platform software for building, installing, and testing C++ code (other languages are supported though). 5 | It does not actually compile the code, but generate a `Makefile` that can then be used to compile the source code. 6 | 7 | CMake can also thus be used to generate a project file, eg in CLion. 8 | 9 | 10 | ## Installing CMake 11 | 12 | === ":simple-apple: macOS" 13 | `brew install cmake` 14 | 15 | === ":simple-linux: Linux" 16 | `sudo apt-get install build-essential libssl-dev` 17 | 18 | === ":material-microsoft-windows: Windows" 19 | If you installed [CLion](https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html) then CMAKE is also installed __OR__ `choco install cmake` 20 | 21 | ## CMake with the console 22 | 23 | If you have a folder in which there is a `CMakeLists.txt` file (this [simple repository](https://github.com/hugoledoux/demo_cmake) shows ones example), follow those steps: 24 | 25 | === ":simple-apple: :simple-linux: Unix (macOS & Linux)" 26 | ```bash 27 | mkdir build 28 | cd build 29 | cmake .. 30 | make 31 | ./demo_cmake 32 | ``` 33 | 34 | Notice that we create a new folder `/build` so that all the temporary compilation files are not in the same folder, all created files will go in that one folder (which can be safely deleted). 35 | The step `cmake ..` means that the `CMakeLists.txt` file is located in the parent folder, its output is a `Makefile` file which allows us to compile the code (and build the binary `demo_cmake`). 36 | 37 | === ":material-microsoft-windows: Windows" 38 | TODO 39 | 40 | 41 | ## CMake with CLion 42 | 43 | 1. In CLion, create a new project (File > New Project) or click on New Project on the Welcome screen. 44 | 45 | 2. Set the language to C++ and the type as executable. 46 | 47 | 3. Select the root folder location (where you want to store the project) and select the language standard. For the latter, note that CGAL requires C++14 or higher. 48 | 49 | These steps will create a new CMake-based project in CLion, which will include a minimal `main.cpp` file for your code and a `CMakeLists.txt` for the compilation/linking instructions. 50 | 51 | ## Making sense of your CMakeLists.txt file 52 | 53 | The `CMakeLists.txt` file that was created by CLion contains four commands: 54 | 55 | 1. `cmake_minimum_required`, which specifies the minimum required CMake version to compile your project; 56 | 57 | 2. `project`, which specifies the name of your project; 58 | 59 | 3. `set`, which sets a variable called `CMAKE_CXX_STANDARD` to whatever C++ version you specified as the minimum for your project; 60 | 61 | 4. `add_executable`, which creates a new compilation target with the same name as your project and adds the `main.cpp` so that it's compiled 62 | 63 | ## Modifying your CMakeLists.txt file to add external libraries 64 | 65 | Anything in the C++ standard library should work after merely including a header in your `main.cpp`. No changes to the `CMakeLists.txt` required. For example, if you want to use [`std::cout` and its `<<` operator](https://www.cplusplus.com/reference/ostream/ostream/operator%3C%3C/), you just need include `iostream` in the `main.cpp`: 66 | 67 | ```cpp 68 | #include 69 | ``` 70 | 71 | However, if you need to use an external library (eg CGAL or GDAL), you will first need to add some commands to your `CMakeLists.txt` for compilation and linking. Every library is different, but the process usually starts by calling a script that finds the library. An example using CGAL: 72 | 73 | ``` 74 | find_package( CGAL REQUIRED ) 75 | ``` 76 | 77 | The `REQUIRED` keyword is optional, but it makes CMake generate an error if CGAL is not found. Here's another example asking for GDAL version 3.0 and higher: 78 | 79 | ``` 80 | find_package( GDAL 3.0 ) 81 | ``` 82 | 83 | These `find_package` commands set a number of variables with the required paths and also set some compilation targets. For a lot of libraries, this command is followed by the `include_directories`, which tells CMake to consider the folders where the library's header files (`.h` or `.hpp`) are stored. For example, with GDAL it is: 84 | 85 | ``` 86 | include_directories( ${GDAL_INCLUDE_DIR} ) 87 | ``` 88 | 89 | There, `GDAL_INCLUDE_DIR` is a variable that was set by `find_package`. Finally, for most libraries, linking to them is also necessary. An example with GDAL: 90 | 91 | ``` 92 | target_link_libraries(PROJECT_NAME ${GDAL_LIBRARY} ) 93 | ``` 94 | 95 | Where `GDAL_LIBRARY` is also a variable that was set by `find_package`. CGAL is a bit different, since `find_package(CGAL)` actually sets a target `CGAL::CGAL` that you should link to. Because of that, you should use something like this: 96 | 97 | ``` 98 | target_link_libraries(PROJECT_NAME CGAL::CGAL) 99 | ``` 100 | 101 | ## CMake and vcpkg 102 | 103 | If you use `vcpkg`, you probably want to use Visual Studio or the Visual Studio toolchain in CLion. 104 | 105 | However, if for some reason you prefer to use CMake, note that the libraries installed using `vcpkg` are installed in the Windows filesystem, not the Linux one of WSL. Therefore, CMake can have trouble finding them. 106 | 107 | For some libraries, like CGAL, you can modify the `find_package` command to give it a hint of a path to search for: 108 | 109 | ``` 110 | find_package(CGAL PATHS "C:/Program Files (x86)/CGAL") 111 | ``` 112 | 113 | For some other libraries, like Boost, you'll have to set the required variables manually: 114 | 115 | ``` 116 | set(BOOST_ROOT "C:/dev/boost") 117 | ``` 118 | 119 | ## A sample CMake file for CGAL 120 | 121 | ``` 122 | cmake_minimum_required(VERSION 3.1) 123 | project(PROJECT_NAME) 124 | set(CMAKE_CXX_STANDARD 14) 125 | find_package(CGAL) 126 | add_executable(PROJECT_NAME main.cpp) 127 | target_link_libraries(PROJECT_NAME CGAL::CGAL) 128 | ``` -------------------------------------------------------------------------------- /docs/cpp/img/bootstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/bootstrap.png -------------------------------------------------------------------------------- /docs/cpp/img/clion_settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/clion_settings.jpg -------------------------------------------------------------------------------- /docs/cpp/img/cmake_location.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/cmake_location.jpg -------------------------------------------------------------------------------- /docs/cpp/img/cmake_version.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/cmake_version.jpg -------------------------------------------------------------------------------- /docs/cpp/img/gdb_version.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/gdb_version.jpg -------------------------------------------------------------------------------- /docs/cpp/img/go_home_dir.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/go_home_dir.jpg -------------------------------------------------------------------------------- /docs/cpp/img/install_cgal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/install_cgal.jpg -------------------------------------------------------------------------------- /docs/cpp/img/settings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/settings.jpg -------------------------------------------------------------------------------- /docs/cpp/img/sudo_update.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/sudo_update.jpg -------------------------------------------------------------------------------- /docs/cpp/img/wsl_default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/cpp/img/wsl_default.jpg -------------------------------------------------------------------------------- /docs/cpp/install.md: -------------------------------------------------------------------------------- 1 | 2 | # How to install a C++ compiler 3 | 4 | 5 | === ":simple-apple: macOS" 6 | In the console: `xcode-select --install` will install clang, gcc, and git. 7 | 8 | 9 | === ":simple-linux: Linux" 10 | In the console: `sudo apt install build-essential` will install clang, gcc, and git. 11 | 12 | 13 | === ":material-microsoft-windows: Windows" 14 | If you installed [CLion](https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html) then the C++ compiler is also installed. -------------------------------------------------------------------------------- /docs/cpp/installlibs.md: -------------------------------------------------------------------------------- 1 | 2 | # Installing C++ libraries 3 | 4 | === ":simple-apple: macOS" 5 | The easiest way to install external libraries on macOS is to use [Homebrew](https://brew.sh) (recommended), although you could install them manually (follow the Linux or Unix instructions if there are none for Mac). 6 | 7 | An example to install [CGAL](https://www.cgal.org) with Homebrew: 8 | 9 | ``` 10 | brew install eigen 11 | brew install cgal 12 | ``` 13 | 14 | Another example with [GDAL](https://gdal.org/): 15 | 16 | ``` 17 | brew install gdal 18 | ``` 19 | 20 | If you're using an Apple Silicon (arm64) Mac, the paths used by Homebrew are: `/opt/homebrew/include` (for headers) and `/opt/homebrew/lib` (for libraries). 21 | 22 | If you're using an Intel (x86-64) Mac, the paths used by Homebrew are: `/usr/local/include` (for headers) and `/usr/local/lib` (for libraries). 23 | 24 | === ":simple-linux: Linux" 25 | The easiest way to install external libraries on Linux is to use `apt` (recommended). 26 | 27 | An example to install [CGAL](https://www.cgal.org): 28 | 29 | ``` 30 | sudo apt install libeigen3-dev 31 | sudo apt-get install libcgal-dev 32 | ``` 33 | 34 | Another example with [GDAL](https://gdal.org/): 35 | 36 | ``` 37 | sudo add-apt-repository ppa:ubuntugis/ppa 38 | sudo apt update 39 | sudo apt install gdal-bin libgdal-dev 40 | ``` 41 | 42 | === ":material-microsoft-windows: Windows" 43 | TODO -------------------------------------------------------------------------------- /docs/cpp/python2cpp.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Python => C++ 4 | 5 | ![](https://upload.wikimedia.org/wikipedia/commons/2/21/OpenGL_Tutorial_TODO.png){width=300x} -------------------------------------------------------------------------------- /docs/cpp/vcpkgwindows.md: -------------------------------------------------------------------------------- 1 | 2 | # Windows: vcpkg with Visual Studio & CLion 3 | 4 | !!! warning 5 | 6 | We recommend you use [Chocolatey to install packages](../computer/packagemanager.md), or [WSL](../linux/wsl.md). 7 | 8 | vcpkg is an alternative, but it is more complex and difficult to setup. 9 | 10 | 11 | ## Why an alternative solution? 12 | 13 | Using thrid-party libraries can sometimes not be very straightforward on Windows, actually using [WSL on Windows](./wslclion.md) is indeed a convenient way. 14 | However, there are some disadvantages: 15 | 16 | * **WSL will incrementally occupy system disk space**. 17 | 18 | **WSL** is installed on **C drive** by default, there are quite a lot blogs on the internet to show how to move your **WSL** to another drive, but usually it is not recommended to avoid possible issues. 19 | 20 | * **running project in WSL can be slow** 21 | 22 | It depends on the situation, but practically speaking, the more you use **WSL**, the slower the compilation speed and the running speed may be as the size of the occupied space increases. 23 | 24 | Another concern is about **gcc/g++** compiler, in some situations, it compiles slower than **MSVC(cl.exe)** on windows(for example in our practice **MSVC** compiles **CGAL** faster) 25 | 26 | * **separately isolated file system** 27 | 28 | The file system of **WSL** is separated from **windows**, which means only if you have opened **WSL** from windows, the files in it can be accessed. This is sometimes not convenient. 29 | 30 | ## Using vcpkg and visual studio on windows 31 | 32 | What is **vcpkg**? To be in short, vcpkg is a free **C/C++ package manager** for acquiring and managing libraries. Maintained by the **Microsoft C++ team** and **open source contributors**. 33 | 34 | ## install vcpkg 35 | 36 | #### Step 1: Clone the vcpkg repo 37 | ``` 38 | git clone https://github.com/Microsoft/vcpkg.git 39 | ``` 40 | Make sure you are in the directory you want the tool installed to before doing this. 41 | #### Step 2: Run the bootstrap script to build vcpkg 42 | ``` 43 | .\vcpkg\bootstrap-vcpkg.bat 44 | ``` 45 | #### Step 3: Install libraries for your project 46 | 47 | While in the directory of vcpkg: 48 | 49 | ``` 50 | vcpkg install [packages to install] 51 | ``` 52 | #### Step 4: Using vcpkg with MSBuild / Visual Studio (may require elevation) 53 | ``` 54 | vcpkg integrate install 55 | ``` 56 | **Note**: **Step 4** is not necessary if you are using **CLion**. 57 | 58 | After this, you can create a new project or open an existing one in the IDE. All installed libraries should already be discoverable by IntelliSense and usable in code without additional configuration. 59 | 60 | For more detailed info, you can refer to [vcpkg - get started](https://vcpkg.io/en/getting-started.html) 61 | 62 | ## install CGAL 63 | 64 | ``` 65 | vcpkg install cgal 66 | ``` 67 | 68 | if you want to specify 64bit version: 69 | 70 | ``` 71 | vcpkg install cgal:x64-windows 72 | ``` 73 | 74 | ## install GDAL 75 | 76 | ``` 77 | vcpkg install GDAL 78 | ``` 79 | 80 | **Notes:** 81 | 82 | It would be more convenient if you use **Windows Powershell**. In **Powershell**, you can install libraries via: 83 | 84 | ``` 85 | PS path\to\vcpkg> .\vcpkg install [package name] 86 | ``` 87 | 88 | All in all, using **WSL** can make you familiar with the linux environment in advance - if you will use linux for development in the future. 89 | While if you are using **windows** platform (as far as I know most of first year students are using it since the Geomatics suggests so), it might be a good idea 90 | to use **vcpkg** and **MSVC**. 91 | 92 | And with regard to **vcpkg**, there is one very comprehensive video: 93 | 94 | [install vcpkg step by step](https://www.youtube.com/watch?v=b7SdgK7Y510) 95 | 96 | It explains how you download and build **vcpkg** and use it **step by step**. 97 | 98 | ## Using vcpkg with Visual Studio 99 | 100 | Since we've integrated **vcpkg** with **MSBuild / Visual Studio**, you need to do **nothing** if you are using [Visual Studio C++ project](https://learn.microsoft.com/en-us/cpp/build/creating-and-managing-visual-cpp-projects?view=msvc-160). In your header / source files, you can for example just type: 101 | ```cpp 102 | #include 103 | ``` 104 | and the header file should be automatically detected and included. 105 | 106 | if you are using [CMake project](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-160), you need to add corresponding scripts in your **CMakeLists.txt** file, for example, if you want to include **CGAL**: 107 | ```cmake 108 | find_package(CGAL) 109 | if (CGAL_FOUND) 110 | include(${CGAL_USE_FILE}) 111 | message(STATUS "CGAL found") 112 | message(STATUS "CGAL VERSION" " " ${CGAL_VERSION}) 113 | else() 114 | message(SEND_ERROR "this code requires the CGAL library") 115 | return() 116 | endif() 117 | ``` 118 | 119 | ## Using vcpkg with CLion 120 | 121 | **(1)** configure **C++ tool chain**: **File -> Settings -> Build, Execution, Deployment -> Toolchains** 122 | 123 | 124 | see [here](https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html) for more details. 125 | 126 | **Note**: About selecting architecture: 127 | 128 | - **x86**: The compiler is the x86 version and the output target is x86. 129 | 130 | - **amd64_x86**: The compiler is the amd64 version and the output target is x86. 131 | 132 | - **amd64**: The compiler is the amd64 version and the output target is amd64. 133 | 134 | - **x86_amd64**: The compiler is the x86 version and the output file is amd64. 135 | 136 | **(2)** configure **CMake option**: **File -> Settings -> Build, Execution, Deployment -> CMake** 137 | ```console 138 | DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake 139 | ``` 140 | 141 | 142 | Now you are all set to include your desired library in **CMakeLists.txt**, for example include **CGAL**: 143 | 144 | 145 | -------------------------------------------------------------------------------- /docs/cpp/wslclion.md: -------------------------------------------------------------------------------- 1 | 2 | # Windows: WSL & CLion 3 | 4 | By far the simplest way to use in C++ libraries such as [CGAL](https://www.cgal.org/) (library to perform geometric operations in 2D, 3D, and even nD), [GDAL](https://gdal.org/index.html) (library to read/write all the vector/raster formats in GIS), or others (eg [GEOS](https://libgeos.org/)), under Windows is... to install Linux!? 5 | 6 | Installing all the libraries above is possible directly under Windows, but it is often a massive pain, so we recommend you use [WSL--Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/), that is you install a Linux environment "inside" your Windows (Win10 or Win11), and use this. 7 | 8 | !!! warning "Before you continue this tutorial" 9 | 10 | You must first [install WSL](../linux/wsl.md) on your Windows machine. 11 | 12 | 13 | ## Install GDAL 14 | 15 | To install GDAL, run the following commands one by one on your Ubuntu terminal: 16 | 17 | ```sh 18 | sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update 19 | ``` 20 | 21 | ```sh 22 | sudo apt-get update 23 | ``` 24 | 25 | ```sh 26 | sudo apt-get install gdal-bin 27 | ``` 28 | 29 | ```sh 30 | sudo apt-get install libgdal-dev 31 | ``` 32 | 33 | If everything went correct, you've successfully installed GDAL! 34 | 35 | 36 | ## Install CGAL 37 | 38 | Let's install CGAL now with the following two commands: 39 | 40 | ```sh 41 | sudo apt-get update 42 | ``` 43 | 44 | ![image](./img/sudo_update.jpg) 45 | 46 | ```sh 47 | sudo apt-get install libcgal-dev 48 | ``` 49 | 50 | ![image](./img/install_cgal.jpg) 51 | 52 | If everything went correct, you now have CGAL as well! 53 | 54 | !!! note 55 | 56 | Before starting to use GDAL and CGAL on CLion, you will need to complete the following two steps. 57 | 58 | ## Install CMake 59 | 60 | To install CMake, run the following commands on your Ubuntu terminal. 61 | 62 | Install the libraries that CMake depends on: 63 | 64 | ```sh 65 | sudo apt-get install build-essential libssl-dev 66 | ``` 67 | 68 | Go to the tmp directory: 69 | 70 | ```sh 71 | cd /tmp 72 | ``` 73 | 74 | Download the source code (change the path to that of the newest version): 75 | 76 | ```sh 77 | wget https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3.tar.gz 78 | ``` 79 | 80 | When this is complete, extract the file: 81 | 82 | ```sh 83 | tar -zxvf cmake-3.28.3.tar.gz 84 | ``` 85 | 86 | Go to the extracted folder: 87 | 88 | ```sh 89 | cd cmake-3.28.3 90 | ``` 91 | 92 | Compile and install CMake: 93 | 94 | ```sh 95 | ./bootstrap 96 | ``` 97 | 98 | This may take some time, you should see the following when it is finished. 99 | 100 | ![image](./img/bootstrap.png) 101 | 102 | Now run the following command to make it: 103 | 104 | ```sh 105 | make 106 | ``` 107 | 108 | This step will also take some time. Once it is finished, you can finally install it: 109 | 110 | ```sh 111 | sudo make install 112 | ``` 113 | 114 | Finally, to check if the installation was successful, you can see the CMake version: 115 | 116 | ```sh 117 | cmake --version 118 | ``` 119 | 120 | ![image](./img/cmake_version.jpg) 121 | 122 | 123 | ## Install GDB 124 | 125 | GDB is a debugger for C++ and you will need it in CLion to connect to WSL. 126 | 127 | If you are installing GDB right after CMake, you are probably still in the `cmake-3.20.0` folder on your Ubuntu terminal. First, go back to the home directory: 128 | 129 | ```sh 130 | cd ../.. 131 | ``` 132 | 133 | ![image](./img/go_home_dir.jpg) 134 | 135 | Install GDB with the following two commands: 136 | 137 | ```sh 138 | sudo apt-get update 139 | ``` 140 | 141 | ```sh 142 | sudo apt-get install gdb 143 | ``` 144 | 145 | If this method does not work for you, you can also install it through the source code as explained in the second option on this [page]. 146 | 147 | You can verify the installation by checking the GDB version: 148 | 149 | ```sh 150 | gdb --version 151 | ``` 152 | 153 | ![image](./img/gdb_version.jpg) 154 | 155 | Once you install GDB, you now have everything you need to connect to WSL in CLion! 156 | 157 | 158 | ## Connect to CLion 159 | 160 | !!! warning 161 | 162 | The steps to connect with WSL may change depending on your CLion version. This tutorial uses CLion 2021.3. 163 | 164 | Go to Settings from *File* or by simply pressing Ctrl+Alt+S. 165 | 166 | ![image](./img/settings.jpg) 167 | 168 | Under *Build, Execution, Deployment*, go to *Toolchains*. Then, add a new toolchain by clicking on the + sign and select WSL. 169 | 170 | ![image](./img/clion_settings.jpg){:width="700px"} 171 | 172 | It should automatically detect all the fiels (Toolset, CMake, Debugger etc.). However, if you see an error for CMake that it cannot be found, click on Browse on the right-side of CMake and choose the correct file. You can find it under `/usr/local/bin/cmake`. 173 | 174 | ![image](./img/cmake_location.jpg){:width="700px"} 175 | 176 | After this step, you may see the following warning under C++ compiler: _Test cmake run finished with errors_. 177 | In this case, reboot your WSL by typing the following command on your Ubuntu terminal: 178 | 179 | ```sh 180 | wsl.exe -t Ubuntu 181 | ``` 182 | 183 | This will close the terminal. Simply open it again by searching Ubuntu on your device. Now, if you check CLion again, you should not see the warning anymore. 184 | 185 | Finally, do not forget to make WSL default by placing it on the top of the listed toolchains. You can do this by dragging WSL to the top, or by using the arrows. 186 | 187 | ![image](./img/wsl_default.jpg) 188 | 189 | 190 | !!! success 191 | 192 | Yay, you can now use GDAL and CGAL on Windows with CLion! 193 | -------------------------------------------------------------------------------- /docs/cpp/xcode.md: -------------------------------------------------------------------------------- 1 | 2 | # Xcode for macOS 3 | 4 | ## Why an alternative solution? 5 | 6 | CLion works fine on macOS. However, there are some disadvantages: 7 | 8 | * **CLion is not free in all conditions**. 9 | 10 | CLion is free for students and teachers, as well as for open source projects. Xcode is free for all users and all projects. 11 | 12 | * **CLion is slow** 13 | 14 | Compiling with CMake is significantly slower than compiling with Xcode, even when both are set to use `clang` as the compiler. 15 | 16 | If CLion is set to use **gcc/g++**, the performance difference is much bigger and the error messages are much less helpful. 17 | 18 | 19 | ## Xcode 20 | 21 | Xcode is Apple's integrated development environment (IDE) for macOS and is the most common tool that is used to develop Mac applications. 22 | 23 | !!! warning 24 | Xcode and CGAL work great together as long as you don’t use the Xcode projects generated by CMake and instead create your own. 25 | 26 | First, start by creating a new project (File > New > Project, or select "Create a new Xcode project" from the welcome window). 27 | Depending on what you plan to do, it can be any kind of project, but for simple things a 'Command Line Tool' works, which is found in the macOS tab under 'Application'. 28 | If you want something with a native Mac GUI, you probably should go for an App. 29 | 30 | Once you’ve given your project a name, make sure that the language is set to C++ and click Next. Then decide where to save it, select if you want to create a local Git repository for it and you’re done. 31 | You’re then confronted with the main Xcode window. 32 | 33 | In short, Xcode works on the basis of projects and targets, just like CLion with CMake. 34 | Without going into much detail, the project contains all your stuff and a target has the aim to create a given executable (or library, plug-in, etc.) based on some of the files in the project. 35 | A project can have many targets, like a codebase that produces two applications (eg macOS and iOS). Some of the settings at the project level cascade down to its targets, but I would recommend you to modify things directly at the target level. 36 | 37 | So after you select the project (blueprint icon with three sticks that look like an A), select the target (black Terminal-looking icon). 38 | There, on the Build Settings tab, you will find a lot of options in several categories. Select the All and Combined tabs. 39 | 40 | Many of these options don’t matter too much, but a few can thoroughly mess with your target, so unless you know what something means, leave the options with their defaults. 41 | However, there are a few that you will likely need to modify: 42 | 43 | * Search Paths > Framework Search Paths: If you’ve installed some dynamic libraries in the form of Mac Frameworks (rather than Mach-O `.dylibs`, you might want to add `/Library/Frameworks` here. 44 | * Search Paths > Header Search Paths: In most cases, you should add `/opt/homebrew/include` (Apple Silicon) or `/usr/local/include` (Intel) here. 45 | * Search Paths > Library Search Paths: In most cases, you should add `/opt/homebrew/lib` (Apple Silicon) or `/usr/local/lib` (Intel) here. 46 | * Apple Clang - Code Generation > Optimization Level > Debug: If you're having performance issues with CGAL, you can increase the optimisation level here to `-O1` or `-O2` here. However, this will cause make the Xcode debugger less useful. 47 | * Apple Clang - Language > C Language Dialect: For better cross-platform code, you should select c11 rather than gnu11 here. 48 | * Apple Clang - Language - C++ > C++ Language Dialect: Here you should really choose wisely depending on your code and the packages that you're using. The safest bet for old code is probably GNU++98, but many new-ish packages will only work with C++11, C++14, or even C++17 (or the GNU variants). In order to future-proof your code, you should probably select C++17 or even C++20 as much as possible. I personally think it’s nicer to avoid the GCC compliant GNU++ varieties, since these might have issues with other compilers. 49 | 50 | Next, go to the Build Phases tab of the same target. Here, you should add all the dynamic libraries that your code will need to link to. 51 | So, open the Link Binary With Libraries collapsible menu and click the "+" sign below. 52 | 53 | You’ll get a cascading sheet containing all the standard macOS X Frameworks as contained in `/System/Library/Frameworks`. 54 | You’ll also get all the dynamic libraries contained in `/usr/lib`. 55 | However, CGAL and its dependencies will not be there. 56 | 57 | So, instead click on the `Add Other...` dropdown and `Add Files...`, after which you’ll get a standard Finder Open window. Since the libraries you installed are in `/usr/local/lib` by default and that directory is by default hidden, just type shift+command+g (`⇧⌘G`) to Go to a folder and type `/usr/local/lib`. 58 | There’s autocomplete. 59 | 60 | In there, you should select all the libraries that your CGAL packages need. Repeat this process a few times or select all the ones you need at the same time using the ⌘ key. For the basic stuff, these would be: 61 | 62 | ``` 63 | libboost_system.dylib or libboost_system-mt.dylib 64 | libboost_thread.dylib or libboost_thread-mt.dylib 65 | libCGAL_Core.dylib 66 | libCGAL.dylib 67 | libgmp.dylib 68 | libmpfr.dylib 69 | ``` 70 | 71 | You might notice that these are actually symlinks to the actual files. 72 | Unfortunately, Xcode will make your code point to the actual files instead. 73 | This means that when you update your dependencies, your Xcode project will not build anymore. 74 | Just check which linked libraries are broken (they will be highlighted in red) and re-add them. -------------------------------------------------------------------------------- /docs/git/githubactions.md: -------------------------------------------------------------------------------- 1 | 2 | # GitHub Actions 3 | 4 | [See GitHub Actions help](https://docs.github.com/en/actions/learn-github-actions) 5 | 6 | ![](https://upload.wikimedia.org/wikipedia/commons/2/21/OpenGL_Tutorial_TODO.png){width=300x} 7 | 8 | -------------------------------------------------------------------------------- /docs/git/gitintro.md: -------------------------------------------------------------------------------- 1 | 2 | # Intro to Git 3 | 4 | !!! tip External material 5 | 6 | [Introduction to git material](https://github.com/tudelft3d/git-course-material) should get your started with git. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/git/goodgit.md: -------------------------------------------------------------------------------- 1 | 2 | # A good Git repository 3 | 4 | !!! note 5 | This list is inspired by the [JOSS review criteria](https://joss.readthedocs.io/en/latest/review_criteria.html#review-items) and by the [Data Carpentry project's reproducibility](https://github.com/datacarpentry/rr-intro/blob/gh-pages/checklist.md). 6 | 7 | This lists all the important parts of a good Git repository, that is a repository that others will want to use/replicate/browse. 8 | If you work alone with your own private repository, those tips are not necessary useful. 9 | They are for the final code that will come with your MSc thesis. 10 | 11 | ## General 12 | - [ ] The repository should be publicly available 13 | 14 | ## Documentation 15 | 16 | - [ ] There should be a README file that indicates 17 | 18 | - The purpose of the project, what the code is for, 19 | - Installation instructions 20 | - Example usage 21 | - API documentation (if this applies) 22 | 23 | - [ ] The README should be a text file (`readme.md` or `readme.txt`), and not a binary file like Word 24 | - [ ] There should be a [LICENSE file](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository). ([Help with choosing a license](https://choosealicense.com)) 25 | - [ ] There should be a [CITATION file](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files) that tells users how to site the project, data, and code 26 | - [ ] A `changelog.md` detailing the changes between the releases should be available ([help with changelog](https://keepachangelog.com/en/)) 27 | - [ ] There should be clear guidelines for third-parties wishing to: (1) contribute to the software; (2) report issues or problems with the software; (3) seek support 28 | 29 | ## Organization 30 | 31 | - [ ] Folders should be used to separate data, code, documentation, and results 32 | 33 | - It is the custom to put all source code in `/src` 34 | - And `/test` for unit tests 35 | - But each language will have different setups and habits 36 | - [ ] The files should use a consistent naming scheme that indicates what they contain 37 | 38 | ## Files that should **not** be added to the repository 39 | 40 | All files that are created by compiling/running code should **not** be added to the Git repository. 41 | 42 | You can [configure you repository to ignore files](https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files) (so that you don't see them as modified and not committed to the repository). 43 | 44 | Examples of files to ignore: 45 | 46 | - `*.pyc` for Python 47 | - `*.aux` for LaTeX 48 | - `*.pdf` for LaTeX 49 | - `/build` the whole build folder for C++ 50 | 51 | ## Software 52 | 53 | - [ ] There should be releases to package the software ([how to create a release](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases)) 54 | - [ ] Is a container available to run the project (eg [Docker](https://www.docker.com/))? 55 | - [ ] Are unit tests available for the code? 56 | 57 | ## Data 58 | 59 | - [ ] If your project has data: are they included or a link is provided? 60 | - [ ] If data is not included, is this because it is not necessary or generated as part of the project? 61 | - [ ] Are your raw data (if any) and processed data files separated? 62 | 63 | ## Others 64 | 65 | - [ ] The code should be well documented 66 | - [ ] Does the repository make use of continuous integration tools to ensure internal reproduciblity? 67 | -------------------------------------------------------------------------------- /docs/git/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Git, GitHub, or GitLab? 3 | 4 | The [TUDelft has its own Git server](https://gitlab.tudelft.nl) (a GitLab server), staff can create repositories, but at the moment students cannot :crying_cat_face:. 5 | Also, the repositories, even if created by staff, are *not* open to the outside world and thus we do not recommend using TUDelft's GitLab. 6 | 7 | [GitHub](https://github.com) is free to use for personal use, even for private repository. 8 | This is the preferred option. -------------------------------------------------------------------------------- /docs/git/install.md: -------------------------------------------------------------------------------- 1 | 2 | # How to install Git 3 | 4 | 5 | ## GitHub Desktop application :simple-apple: :material-microsoft-windows: 6 | 7 | By far the simplest method to install Git is to download and install the [GitHub Desktop application](https://desktop.github.com), it comes with an installation of Git. 8 | 9 | To use it, you'll need to [create a (free) GitHub account](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account). 10 | 11 | :simple-linux: If you use Linux, then there is a [fork of the GitHub Desktop](https://github.com/muroko/github-desktop-linux) (which might be painful to install), or you can use directly the CLI, or check those [GUI options](https://git-scm.com/download/gui/linux). 12 | 13 | ## Git in the terminal 14 | 15 | If you use Linux, or if you want to use the [terminal](../computer/terminal.md), you can install Git this way: 16 | 17 | === ":simple-apple: macOS" 18 | In the console: `xcode-select --install` will install clang, gcc, and git. 19 | 20 | === ":simple-linux: Linux" 21 | It's most likely already installed, verify with `git --version`, which should return `git version 2.42.0` (or similar version). 22 | 23 | If not installed, then `sudo apt update` + `sudo apt install git` 24 | 25 | === ":material-microsoft-windows: Windows" 26 | With [Chocolatey](https://community.chocolatey.org/): `choco install git`. 27 | 28 | -------------------------------------------------------------------------------- /docs/img/editpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/img/editpage.png -------------------------------------------------------------------------------- /docs/img/tud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/img/tud.png -------------------------------------------------------------------------------- /docs/img/tudblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/img/tudblue.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Welcome to the (geo-)nerd zone 🤓 3 | 4 | 5 | 6 | 7 | - - - 8 | 9 | 10 | [![](img/tud.png){width=250}](https://tudelft.nl) 11 | 12 | 13 | 14 | This site is made and taylored for the [MSc Geomatics students](http://geomatics.tudelft.nl/) at [TU Delft](https://tudelft.nl), but can probably be used by any geo/GIS/geomatics student. 15 | -------------------------------------------------------------------------------- /docs/js/extra.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", function() { 2 | var beginnerTags = document.getElementsByClassName("beginner-tag"); 3 | var intermediateTags = document.getElementsByClassName("intermediate-tag"); 4 | var advancedTags = document.getElementsByClassName("advanced-tag"); 5 | 6 | for (var i = 0; i < beginnerTags.length; i++) { 7 | beginnerTags[i].setAttribute("data-tooltip", "Recommended if you are just starting out. No prior knowledge required. It's highly recommended to learn these skills for Geomatics courses."); 8 | } 9 | 10 | for (var i = 0; i < intermediateTags.length; i++) { 11 | intermediateTags[i].setAttribute("data-tooltip", "Already known the basics? This will further improve your skills. Useful for Geomatics courses."); 12 | } 13 | 14 | for (var i = 0; i < advancedTags.length; i++) { 15 | advancedTags[i].setAttribute("data-tooltip", "This goes into advanced topics. This knowledge is not required for your Geomatics courses, but it can be useful if you want to dive deeper."); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /docs/linux/files/Linux_Introduction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/files/Linux_Introduction.pdf -------------------------------------------------------------------------------- /docs/linux/files/VirtualBox_Kubuntu_Installation_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/files/VirtualBox_Kubuntu_Installation_Guide.pdf -------------------------------------------------------------------------------- /docs/linux/img/WinSCP0.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/img/WinSCP0.jpeg -------------------------------------------------------------------------------- /docs/linux/img/WinSCP1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/img/WinSCP1.jpeg -------------------------------------------------------------------------------- /docs/linux/img/cmd-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/img/cmd-2.jpg -------------------------------------------------------------------------------- /docs/linux/img/copy_ubuntu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/img/copy_ubuntu.jpg -------------------------------------------------------------------------------- /docs/linux/img/setup-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/linux/img/setup-3.jpg -------------------------------------------------------------------------------- /docs/linux/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Linux 3 | 4 | For a few courses you'll have to use the operating system Linux :simple-linux: 5 | 6 | You can install Linux on your Windows computers with basically 2 different ways: 7 | 8 | 1. with [WSL](./wsl.md) (Windows Subsystem for Linux) 9 | 2. by running it [virtually with VirtualBox](./virtualbox.md) 10 | 11 | And you'll have to access some Linux servers [using ssh](./ssh.md). 12 | 13 | One big difference is the [filesystem](../computer/filesystem.md), make sure you familiarise yourself with it. -------------------------------------------------------------------------------- /docs/linux/intro.md: -------------------------------------------------------------------------------- 1 | 2 | # Introduction to Linux 3 | 4 | [See slides for introduction to Linux](./files/Linux_Introduction.pdf) -------------------------------------------------------------------------------- /docs/linux/ssh.md: -------------------------------------------------------------------------------- 1 | 2 | # Connecting to a Linux server with ssh 3 | 4 | 5 | !!! warning 6 | 7 | Due to security reasons, many Linux servers at TUDelft cannot be accessed directly, they are behind the TUDelft firewall. 8 | 9 | === ":simple-apple: :simple-linux: Unix (macOS & Linux)" 10 | 11 | ## Connection is a 2-step process for TUDelft servers 12 | 13 | ### 1. ssh to the TUDelft server 14 | 15 | - for MSc students: student-linux.tudelft.nl 16 | - for TUDelft staff: linux-bastion-ex.tudelft.nl 17 | 18 | `ssh mynetid@student-linux.tudelft.nl` and password is netid password 19 | 20 | ### 2. ssh from there to the server 21 | 22 | `ssh myusername@abcd.tudelft.nl` but watch out the password is the one you were given by the admin, it is *not* your netid 23 | 24 | ## Avoid the 2-step process (and passwords) 25 | 26 | ### Configuration 27 | 28 | 1. In your local computer, type `ssh-keygen -t ed25519` and follow the instructions. It is recommended to use a password to protect your keys. You'll have to use this password everytime you login after you are done, or you can use `ssh-add` to store it (once after you restart your computer). 29 | 30 | 2. Create a file named `config` in your `~/.ssh` folder (or, just `vim ~/.ssh/config`) and put the following content: 31 | 32 | ``` 33 | Host bastion 34 | Hostname student-linux.tudelft.nl 35 | User netid 36 | 37 | Host abcd 38 | Hostname abcd.bk.tudelft.nl 39 | ProxyCommand ssh -W %h:%p bastion 40 | User gUsername 41 | 42 | Host xyz 43 | Hostname xyz.tudelft.nl 44 | ProxyCommand ssh -W %h:%p bastion 45 | User wUsername 46 | ``` 47 | 48 | Replace `netid` with your netid, `username` with your usernames for the 2 fake servers we list here. 49 | 50 | 3. Copy your public key (as created in step 1) to all three servers respectively. So: 51 | - `ssh-copy-id bastion` and give your TU Delft password when prompted. 52 | - `ssh-copy-id abcd` and give your keys password (set in step 1) and then your server abcd password. 53 | - `ssh-copy-id xyz` and your keys password (set in step 1) and then your server xyz password. 54 | 55 | Beware you might be prompted for the password of your ssh keys multiple times before you are asked for the actual password of the respective user in each server. 56 | 57 | 58 | ## Usage 59 | 60 | As soon as your `~/.ssh/config` is defined and your public key is copied correctly, you should be able to login to godzilla or the website with the respective commands: 61 | - `ssh abcd` 62 | - `ssh xyz` 63 | 64 | === ":material-microsoft-windows: Windows" 65 | 66 | Under Windows it should be possible to do the same as macOS/Linux with [puttyssh](https://putty.org/). 67 | 68 | The best alternative is to use [WSL](../linux/wsl.md) and follow the same instructions as those for macOS/Linux. 69 | 70 | To copy files using a graphic interface use WinSCP, and configure a session following the figures here: 71 | ![WinSCP0](./img/WinSCP0.jpeg) 72 | ![WinSCP1](./img/WinSCP1.jpeg) 73 | 74 | 75 | -------------------------------------------------------------------------------- /docs/linux/virtualbox.md: -------------------------------------------------------------------------------- 1 | 2 | # Running Linux in a virtual environment 3 | 4 | [See slides to install Ubuntu in VirtualBox](./files/VirtualBox_Kubuntu_Installation_Guide.pdf) -------------------------------------------------------------------------------- /docs/linux/wsl.md: -------------------------------------------------------------------------------- 1 | 2 | # WSL (Windows Subsystem for Linux) 3 | 4 | 5 | ## What is WSL? 6 | 7 | 8 | 9 | [WSL](https://docs.microsoft.com/en-us/windows/wsl/) is an installation of a Linux environment "inside" your Windows (Win10 or Win11). 10 | It will allow you to run several Linux tools on the command line (eg `wget`, `grep`, or `ssh`), to use databases (eg Postgres) or compilers (eg C++) installed under Linux. 11 | 12 | ## How to install WSL (Windows store) 13 | 14 | 1. Open the Microsoft store and install the Windows Subsystem for Linux. 15 | 2. Search for "ubuntu lts" and install the latest version available (eg 22.04). 16 | 3. See [this](https://superuser.com/questions/1736443/wsl-2-installing-linux-failed-error-code-0x80370114) and enable: (1) Virtual Machine Platform and (2) Windows Subsystem for Linux. 17 | 18 | ## How to install WSL (command line) 19 | 20 | To install WSL, open command prompt as administrator. 21 | 22 | ![image](./img/cmd-2.jpg) 23 | 24 | Run the following command: 25 | 26 | ```sh 27 | wsl -l -o 28 | ``` 29 | 30 | This will list the Linux distributions that are available to install in the online store. Out of those, you probably want to install the latest version of Ubuntu with long-term support (LTS). If you selected Ubuntu-22.04 LTS (meaning from April 2022), that would be: 31 | 32 | ```sh 33 | wsl --install -d Ubuntu-22.04 34 | ``` 35 | 36 | This will start the process to install WSL on your device. Once the installation is complete, you will need to reboot your device. 37 | 38 | After the reboot, wait a couple of seconds for the Ubuntu terminal to open and complete the installation. It will then ask you to specify a username and password. 39 | 40 | ![image](./img/setup-3.jpg) 41 | 42 | Once you complete this step, your WSL is ready to use! 43 | 44 | If you want to open the current directory in Windows File Explorer, type the following command in the terminal: 45 | 46 | ```sh 47 | explorer.exe . 48 | ``` 49 | 50 | !!! note 51 | 52 | You will not be able to use "ctrl+c/v" for Copy/Paste on the Ubuntu terminal. Instead, go to *Properties* by right-clicking on the top of the terminal and enable *Use Ctrl+Shift+C/V as Copy/Paste.* 53 | 54 | ![image](./img/copy_ubuntu.jpg) 55 | 56 | 57 | !!! warning 58 | 59 | Some computer companies seem to block virtualization by default, and it needs to be explictly enabled. This is done in the BIOS, [follow this manual](https://bce.berkeley.edu/enabling-virtualization-in-your-pc-bios.html). 60 | 61 | 62 | !!! warning 63 | 64 | Some Windows installations come with either virtualisation features or WSL disabled. See [this](https://superuser.com/questions/1736443/wsl-2-installing-linux-failed-error-code-0x80370114) post to enable them. 65 | 66 | !!! warning 67 | 68 | If you want to install another Linux than Ubuntu (as above) or want to see more options, see the [Microsoft Basic commands for WSL](https://learn.microsoft.com/en-us/windows/wsl/basic-commands). 69 | 70 | ## The Windows Terminal is recommended 71 | 72 | We recommend you install and use the [Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/) instead of the Command Prompt, it's more powerful and flexible. 73 | -------------------------------------------------------------------------------- /docs/misc/delftblue.md: -------------------------------------------------------------------------------- 1 | 2 | # Using the DelftBlue supercomputer 3 | 4 | !!! note 5 | 6 | DelftBlue is a high-performance computing cluster that is used for research and education at TU Delft. It is a heterogeneous cluster that consists of a mix of CPU and GPU nodes. It has a good [official documentation](https://doc.dhpc.tudelft.nl/delftblue/). 7 | 8 | If you are supervisor having a student need to use DHPC, or aforementioned student you can request a project for your student. The request form is [here](https://tudelft.topdesk.net/tas/public/ssp/content/detail/service?unid=b7e2b7b46ac94cf688c21761aa324fc1&from=fb47dc4a-d699-45e5-be24-65086929391d) and must be filled by the student. 9 | 10 | !!! note 11 | 12 | This is taken from from [the blog of Nail Ibrahimli](https://3d.bk.tudelft.nl/nail/tudhpc/). This is a great general explanation of everything a geomatics student would need to know to use DelftBlue. 13 | 14 | ## Introduction 15 | 16 | I am not an expert in using SLURM and using HPCs, but I have used it for a while now, and I have found it to be a very useful tool for managing HPC jobs. In this post, I will provide a brief introduction to SLURM, DelftBlue and INSY, and I will provide some basic information on how to use SLURM to manage HPC jobs on DelftBlue and INSY clusters. 17 | 18 | I have noticed that some students — particularly those with little to no technical background — are having difficulty using SLURM to manage HPC workloads on the DelftBlue and INSY clusters. This observation was the impetus for this post. I wanted to write a brief tutorial for those students that would cover all the essential information in one location. This post aims to assist you in getting started with SLURM and HPC tasks on the DelftBlue and INSY clusters. Examples provided here are mainly for GPU-based jobs, but similar principles apply to CPU-based jobs as well. 19 | 20 | But I would **strongly suggest** to read the official documentation of DelftBlue and INSY, as it is very well written and has a lot of useful information. 21 | 22 | ## SLURM 23 | 24 | [SLURM](https://slurm.schedmd.com/) (Simple Linux Utility for Resource Management) is a powerful open-source cluster management and job scheduling system that is widely used in High Performance Computing (HPC) environments. It is designed to be highly scalable, fault-tolerant, and easy to use. 25 | 26 | 27 | To submit a GPU job to the SLURM scheduler, you will need to use the `sbatch` command. The `sbatch` command allows you to submit a batch script to the scheduler, which will then execute the script on the appropriate resources. Here is an example of a simple SLURM batch script that requests one GPU and runs a command: 28 | 29 | ```bash 30 | #!/bin/bash 31 | #SBATCH --gres=gpu:1 32 | #SBATCH --nodes=1 33 | #SBATCH --time=00:10:00 34 | 35 | # Execute the command 36 | ./your_command 37 | ``` 38 | 39 | In this example, the `#SBATCH` command requests one GPU, one node and it will run for 10 minutes. You can edit the script and include your commands for the job. 40 | 41 | To submit the job, use the `sbatch` command followed by the name of the batch script file: 42 | ``` 43 | sbatch my_job.sh 44 | ``` 45 | Once the job is submitted, you can use the `squeue` command to view the status of your job. This command will display information about the job such as the job ID, the user who submitted the job, the status of the job, and more. 46 | 47 | ```bash 48 | squeue -u 49 | ``` 50 | 51 | To cancel a job, you can use the `scancel` command followed by the job ID. 52 | ```bash 53 | scancel 54 | ``` 55 | After your job is completed, you can use the `sacct` command to view accounting information about your job, including the resources it consumed and the exit status of the job. 56 | 57 | These are the basic steps for using SLURM to manage GPU-based HPC jobs. Be sure to consult the SLURM documentation for more information on how to use the system, including advanced configuration options and troubleshooting tips. 58 | 59 | ### Connecting to DelftBlue 60 | 61 | I feel lazy to learn to use GUI based softwares, so I use terminal, and give command examples 62 | 63 | To connect to DelftBlue, you will need to use SSH. The login node is `login.delftblue.tudelft.nl`. You can connect to the login node using the following command: 64 | 65 | ```bash 66 | ssh @login.delftblue.tudelft.nl 67 | ``` 68 | 69 | ### Data transfer 70 | 71 | - SCP (Secure Copy) *Common choice*
72 | Using the `scp` command, you can copy files to and from DelftBlue. Here are some examples of using the scp command: 73 | ```bash 74 | scp 75 | # Copying files from local machine to DelftBlue 76 | scp @login.delftblue.tudelft.nl: 77 | # Copying files from local machine to DelftBlue recursively 78 | scp -r @login.delftblue.tudelft.nl: 79 | # Copying files from DelftBlue to local machine 80 | scp @login.delftblue.tudelft.nl: 81 | # Copying files from DelftBlue to local machine recursively 82 | scp -r @login.delftblue.tudelft.nl: 83 | ``` 84 | - SFTP (Secure File Transfer Protocol) *Personal favourite*
85 | Using the `sftp` command, you can transfer files to and from DelftBlue. Here are some examples of using the `sftp` command: 86 | ```bash 87 | sftp @login.delftblue.tudelft.nl 88 | # Changing directory in DelftBlue 89 | cd 90 | # Creating directory in local machine 91 | lcd 92 | # Listing files in DelftBlue 93 | ls 94 | # Listing files in local machine 95 | lls 96 | 97 | # Just add an 'l' to the beginning of the command to perform the same operation on the local machine 98 | 99 | # Copying files from local machine to DelftBlue 100 | put 101 | # Copying files from local machine to DelftBlue recursively 102 | put -r 103 | # Copying files from DelftBlue to local machine 104 | get 105 | # Copying files from DelftBlue to local machine recursively 106 | get -r 107 | ``` 108 | ### Loading modules 109 | #### What are modules? 110 | Modules are a way to manage software on a cluster. They allow you to *load* and *unload* software packages, and they allow you to manage dependencies between software packages. Modules are loaded using the `module` command. Here are some examples of using the `module` command: 111 | ```bash 112 | # Loading a module 113 | module load 114 | # Unloading a module 115 | module unload 116 | # Listing loaded modules 117 | module list 118 | # Listing available modules 119 | module avail 120 | ``` 121 | 122 | #### What modules are available? 123 | The modules available on DelftBlue are listed in the [modules page](https://doc.dhpc.tudelft.nl/delftblue/DHPC-modules/). Use `spider` command to search for modules 124 | ```bash 125 | module spider 126 | ``` 127 | #### I am fully lost. How do I know which modules I need? 128 | 129 | You can use the following command if you are not knowing what you are doing, 130 | ```bash 131 | module load 2022r2 # load the default DelftBlue software stack 132 | module load cuda/11.6 # or cuda you need 133 | module load miniconda3 # loading the conda 134 | ``` 135 | Checking the cuda version installed 136 | ```bash 137 | [@login04 ~]$ nvcc -V 138 | nvcc: NVIDIA (R) Cuda compiler driver 139 | Copyright (c) 2005-2022 NVIDIA Corporation 140 | Built on Tue_Mar__8_18:18:20_PST_2022 141 | Cuda compilation tools, release 11.6, V11.6.124 142 | Build cuda_11.6.r11.6/compiler.31057947_0 143 | ``` 144 | ### Conda environment 145 | #### What is conda? 146 | Conda is an open-source package management system and environment management system that runs on Windows, macOS, and Linux. Conda quickly installs, runs, and updates packages and their dependencies. Conda easily creates, saves, loads, and switches between environments on your local computer. It is mainly used for Python programs. 147 | 148 | #### How to use conda? 149 | To use conda, you will need to load the conda module. Here are some examples of using the `conda` command: 150 | ```bash 151 | # Loading the conda module 152 | module load miniconda3 153 | # Creating a conda environment 154 | conda create -n 155 | # Activating a conda environment 156 | conda activate 157 | # Deactivating a conda environment 158 | conda deactivate 159 | # Listing conda environments 160 | conda env list 161 | # Listing packages in a conda environment 162 | conda list 163 | # Installing a package in a conda environment 164 | conda install -c 165 | # Removing a package from a conda environment 166 | conda remove 167 | # Removing a conda environment 168 | conda env remove -n --all 169 | ``` 170 | #### Should I use conda environment on DelftBlue? Avoiding storage issues 171 | Yes, you should use conda environment on DelftBlue. Is that I all need to do? No, the reason is that conda environments are stored in your home directory, and not in the shared file system. This means that you will not run into storage issues when using conda environments. And it will happen very quickly, believe me. 172 | 173 | To avoid storage issues, you should create a *conda environment* on the scratch storage and link to them in your home directory. 174 | ```bash 175 | mkdir -p /scratch/${USER}/.conda 176 | ln -s /scratch/${USER}/.conda $HOME/.conda 177 | ``` 178 | On similar lines, you can also create a cache and local folders on the scratch storage and link to them in your home directory. This may also help you avoid storage issues related to `pip`. 179 | ```bash 180 | mkdir -p /scratch/${USER}/.cache 181 | ln -s /scratch/${USER}/.cache $HOME/.cache 182 | mkdir -p /scratch/${USER}/.local 183 | ln -s /scratch/${USER}/.local $HOME/.local 184 | ``` 185 | 186 | 187 | ### Running jobs on GPU nodes 188 | #### Sample sbatch script from actual project 189 | ```bash 190 | #!/bin/sh 191 | 192 | # You can control the resources and scheduling with '#SBATCH' settings 193 | # (see 'man sbatch' for more information on setting these parameters) 194 | 195 | 196 | #SBATCH --job-name="CasMVS" # project name 197 | #SBATCH --partition=gpu # partition name it means i want to use gpu 198 | #SBATCH --time=02:00:00 # time limit (HH:MM:SS) 199 | #SBATCH --ntasks=1 # number of parallel tasks per job is 1 200 | #SBATCH --cpus-per-task=2 # number of cores per task 201 | #SBATCH --gpus-per-task=1 # number of GPUs per task 202 | #SBATCH --mem-per-cpu=1G # memory per CPU core 203 | #SBATCH --account=research-abe-ur # account name 204 | 205 | 206 | # Measure GPU usage of your job (initialization) 207 | previous=$(nvidia-smi --query-accounted-apps='gpu_utilization,mem_utilization,max_memory_usage,time' --format='csv' | /usr/bin/tail -n '+2') 208 | 209 | # Use this simple command to check that your sbatch settings are working (it should show the GPU that you requested) 210 | nvidia-smi 211 | 212 | # Your job commands go below here 213 | 214 | #module load 2022r2 215 | #module load cuda/11.6 216 | 217 | srun python train.py --dataset_name dtu --root_dir /scratch//DTU/dtu/ --num_epochs 16 --batch_size 2 --depth_interval 2.65 --n_depths 8 32 48 --interval_ratios 1.0 2.0 4.0 --optimizer adam --lr 1e-3 --lr_scheduler cosine --exp_name dtu_cas_group_8 --num_groups 8 --num_gpus 1 > test.log 218 | 219 | 220 | # Your job commands go above here 221 | 222 | # Measure GPU usage of your job (result) 223 | nvidia-smi --query-accounted-apps='gpu_utilization,mem_utilization,max_memory_usage,time' --format='csv' | /usr/bin/grep -v -F "$previous" 224 | 225 | ``` 226 | 227 | ## Contribute 228 | If you find any errors or have any suggestions, please feel free to open an issue or pull request in [git](https://github.com/Mirmix/tudelft-hpc-tutorial). 229 | 230 | ## Kudos 231 | - Zexin Yang for INSY tutorial 232 | - [SLURM documentation](https://slurm.schedmd.com/documentation.html) 233 | - [DelftBlue documentation](https://doc.dhpc.tudelft.nl/) 234 | - [INSY documentation](https://login.hpc.tudelft.nl/) 235 | -------------------------------------------------------------------------------- /docs/programming/_decision_tree/.pages: -------------------------------------------------------------------------------- 1 | hide: true -------------------------------------------------------------------------------- /docs/programming/_decision_tree/local/desktop/compiled/index.md: -------------------------------------------------------------------------------- 1 | # Compiled systems programming languages 2 | 3 | ## Languages 4 | 5 | - [C++](https://cppreference.com/) 6 | 7 | #### Optionally 8 | 9 | - [C](https://en.wikipedia.org/wiki/C_(programming_language)) 10 | - [Rust](https://www.rust-lang.org) 11 | 12 | TODO description and geomatics specific -------------------------------------------------------------------------------- /docs/programming/_decision_tree/local/desktop/index.md: -------------------------------------------------------------------------------- 1 | # What is more important? 2 | [Program runs faster, but coding takes longer](./compiled/index.md){.md-button} 3 | [Program runs slower, but coding is faster](./interpreted/index.md){.md-button} 4 | 5 | TODO description with help about what option to choose. Make Geomatics specific -------------------------------------------------------------------------------- /docs/programming/_decision_tree/local/desktop/interpreted/index.md: -------------------------------------------------------------------------------- 1 | # Interpreted languages 2 | 3 | ## Languages 4 | 5 | - [Python](https://www.python.org) 6 | 7 | #### Optionally 8 | 9 | - [Java](https://www.java.com/en/) 10 | - [C#](https://dotnet.microsoft.com/en-us/languages/csharp) 11 | - [R](https://www.r-project.org) 12 | 13 | TODO add descriptions and make Geomatics specific -------------------------------------------------------------------------------- /docs/programming/_decision_tree/local/index.md: -------------------------------------------------------------------------------- 1 | # Is your project a mobile application? 2 | [Yes](./mobile/index.md){.md-button} 3 | [No](./desktop/index.md){.md-button} 4 | 5 | !!! info "What is a mobile application?" 6 | A mobile application is anything that runs on your smartphone. Usually, this means apps downloaded from an app store, but it can also mean a website that acts as if it's an app. -------------------------------------------------------------------------------- /docs/programming/_decision_tree/local/mobile/index.md: -------------------------------------------------------------------------------- 1 | # Mobile development 2 | You are looking for a programming language for mobile applications! 3 | 4 | ## Languages: 5 | 6 | ??? "MSc Geomatics language" 7 | If you're looking for a language that is used during Geomatics courses, you can use :simple-javascript: JavaScript for mobile development! 8 | 9 | #### Native development: 10 | - [Swift](https://developer.apple.com/swift/) (iOS) 11 | - [Kotlin](https://kotlinlang.org) (Android) 12 | #### Cross-platform development 13 | - [Flutter](https://flutter.dev) ([Dart](https://dart.dev)) 14 | - [React Native](https://reactnative.dev) ([JavaScript](https://www.javascript.com)/[TypeScript](https://www.typescriptlang.org)) 15 | - [Xamarin](https://dotnet.microsoft.com/en-us/apps/xamarin) ([C#](https://dotnet.microsoft.com/en-us/languages/csharp)) 16 | - [HTML5](https://developer.mozilla.org/en-US/docs/Web/HTML) and [Apache Cordova](https://cordova.apache.org) 17 | 18 | !!! external-link "Learn more" 19 | Want to learn more? We recommend [Choosing the best programming language for mobile app development](https://developer.ibm.com/articles/choosing-the-best-programming-language-for-mobile-app-development/) by IBM. 20 | 21 | -------------------------------------------------------------------------------- /docs/programming/_decision_tree/web/index.md: -------------------------------------------------------------------------------- 1 | # Web programming languages 2 | 3 | You've chosen a web programming language! 4 | 5 | Projects that run on the web are usually divided in two separate sections. The **frontend** and the **backend**. Very simply said, the frontend runs in your browser, the backend runs on a server somewhere else. You'll learn more about this in GEO1007. 6 | 7 | TODO video about frontend VS backend 8 | 9 | ## Frontend languages: 10 | Basically, frontend is always done using :simple-javascript: **JavaScript** (or its stricter sibling :simple-typescript: **TypeScript**). Sometimes a framework is used in combination with these languages. 11 | 12 | #### Framework examples 13 | - React 14 | - Angular 15 | - Vue.js 16 | - Svelte 17 | - Preact 18 | 19 | !!! external-link "Should I use a framework?" 20 | We recommend this StackOverflow blog post about [Does your web app need a front-end framework?](https://stackoverflow.blog/2020/02/03/is-it-time-for-a-front-end-framework/). 21 | 22 | ## Backend languages: 23 | - Node.js 24 | - Python (django or flask) 25 | 26 | #### Optionally: 27 | - Go 28 | - Elixir 29 | - Ruby (Ruby on Rails) 30 | - Java (Spring boot) 31 | - C# (.NET Core) 32 | - Kotlin (Ktor) 33 | - PHP (with Lavarel) 34 | 35 | 36 | 37 | TODO find guide online. Reference Geoweb. Make geomatics specific -------------------------------------------------------------------------------- /docs/programming/chooselanguage.md: -------------------------------------------------------------------------------- 1 | 2 | # Choosing a programming language 3 | 4 | In the MSc Geomatics you will focus on the following two languages: 5 | 6 | - :simple-python: Python (Mainly in GEO1000, GEO1015 and GEO5017, also used in GEO1001 and GEO1003) 7 | - :simple-cplusplus: C++ (GEO1004, GEO1016) 8 | 9 | Besides these two languages, you'll be introduced to: 10 | 11 | - :simple-html5: HTML + :simple-css3: CSS (GEO1007) 12 | - :simple-javascript: JavaScript (GEO1007) 13 | 14 | !!! info "Programming language advise" 15 | #### Will your project run in a web browser? 16 | [Yes](./_decision_tree/web/index.md){.md-button} 17 | [No](./_decision_tree/local/index.md){.md-button} 18 | -------------------------------------------------------------------------------- /docs/programming/collabcode.md: -------------------------------------------------------------------------------- 1 | # How to code collaboratively? 2 | 3 | In Geomatics, you'll do a lot of coding, and in a lot of assignments, you'll do this as a team. On this page you'll find a list of the different methods for collaborating and our recommendations. Underneath, you'll find a full list of the pros and cons of each method. 4 | 5 | - **Meeting up and writing everything together on the same computer**: Recommended for helping each other, and for starting new projects. Can be used in combination with a version control system (see below). 6 | - **Sending each other snippets of code**: Only recommended for helping each other if meeting up is not possible. Not recommended for projects. 7 | - **Each person works on their own file and at the end you combine them**: Not recommended without also using a version control system. 8 | - **Using realtime code collaboration tools (like Google Docs but for coding)**: Not recommended without also using a version control system. 9 | - **Using a version control system like git**: Highly recommended to learn and start using as early as possible, even for small projects. 10 | 11 | ### Pros and cons: 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 36 | 37 | 38 | 39 | 46 | 54 | 55 | 56 | 57 | 64 | 73 | 74 | 75 | 76 | 83 | 91 | 92 | 93 | 94 | 105 | 116 | 117 |
MethodProsCons
Meeting up and writing everything together on the same computer. 22 |
    23 |
  • Simple and no merging difficulties.
  • 24 |
  • Easy to discuss, everyone knows what is going on.
  • 25 |
  • Quick to make decisions and get things started.
  • 26 |
27 |
29 |
    30 |
  • No individual responsibilities.
  • 31 |
  • Learning programming can be faster and more effective by writing code and experimenting yourself than by reading and discussing it.
  • 32 |
  • Takes more time.
  • 33 |
  • Sometimes difficult to schedule meeting.
  • 34 |
35 |
Sending each other snippets of code. 40 |
    41 |
  • Simple and quick.
  • 42 |
  • No need for setup or installing any tools.
  • 43 |
  • Very suitable for helping with bugs or quick suggestions.
  • 44 |
45 |
47 |
    48 |
  • Only for very small projects or quick fixes.
  • 49 |
  • Difficult to track history.
  • 50 |
  • Leads to mistakes and misunderstandings.
  • 51 |
  • Difficult to work simultaneously.
  • 52 |
53 |
Each person works on their own file, and at the end you combine them 58 |
    59 |
  • Clear responsibilities of who works on what.
  • 60 |
  • No need for setup or installing any tools.
  • 61 |
  • Possible to work simultaneously.
  • 62 |
63 |
65 |
    66 |
  • Merging can be difficult and take a long time.
  • 67 |
  • You only find bugs at the end, while combining.
  • 68 |
  • Difficult to get an overview of the project.
  • 69 |
  • Difficult to track history.
  • 70 |
  • Only for small projects.
  • 71 |
72 |
Using realtime code collaboration tools (like Google Docs but for coding). 77 |
    78 |
  • Very easy to use.
  • 79 |
  • You can see in real-time what people are working on.
  • 80 |
  • No merge conflicts.
  • 81 |
82 |
84 |
    85 |
  • Requires constant internet connection.
  • 86 |
  • Everyone needs to use the same software.
  • 87 |
  • Often a paid feature.
  • 88 |
  • Is missing many of the tools a version control system offers.
  • 89 |
90 |
Using a version control system like git. 95 |
    96 |
  • Tracks by who, when, and why changes were made.
  • 97 |
  • Works from tiny to enormous projects.
  • 98 |
  • Also very useful for individual projects.
  • 99 |
  • Never fear to make changes, as you can always undo them.
  • 100 |
  • No internet required, only when syncing changes.
  • 101 |
  • Used by almost all big software projects/companies.
  • 102 |
  • Can be used to back up your code.
  • 103 |
104 |
106 |
    107 |
  • Takes time to set up.
  • 108 |
  • Everyone needs to download and learn the tool.
  • 109 |
  • Can be intimidating to learn, especially the command line.
  • 110 |
  • Merge conflicts can be tricky to solve.
  • 111 |
  • Advanced features can be quite complicated.
  • 112 |
  • You need to remember to commit changes and write a description.
  • 113 |
  • You need to agree who works on what, because you only find out what your team is working on after they commit and push the changes.
  • 114 |
115 |
118 | -------------------------------------------------------------------------------- /docs/programming/debugging.md: -------------------------------------------------------------------------------- 1 | # Debugging 2 | 3 | !!! info "What is a "bug"?" 4 | In programming we call a "bug" any kind of issue occuring in our code that obstructs us from getting the result we are after. For example this could be an error message or your program crashing or an incorrect result. 5 | 6 | **Fun fact**: Did you know? Bugs owe their name to a historical computer that ran into issues, because a moth had crawled into it! 7 | 8 | Every programmer, no matter how experienced, runs into bugs with the code they write. Debugging is everything related to finding and fixing these problems. This page gives you some different debugging strategies to help you solve these bugs. 9 | 10 | !!! example "Challenge" 11 | **Can you find the bug in this Python example?** 12 | ```py 13 | csv_path = "/Documents/salaries.csv" 14 | 15 | with open(csv_path, "r") as f: 16 | csv_lines = f.readlines() 17 | 18 | row_idx = 0 19 | total = 0 20 | for row in csv_lines: 21 | # Skip the header row 22 | if row_idx == 0: 23 | continue 24 | 25 | name, salary = row.split(',') 26 | 27 | total += int(salary) 28 | row_idx += 1 29 | 30 | print("Total: ", total) 31 | ``` 32 | Did you find it? If yes, you might have noticed that "Total: 0" is the printed answer. These kind of bugs can happen any time and can be difficult to spot, 33 | especially when your code becomes more complex than this simple example. 34 | ??? success "Answer" 35 | The code uses the variable `row_idx` to keep track of which row the loop is at. It 36 | uses this index to skip the header row (the row with index 0). However, when it skips 37 | the header, it does not increment the `row_idx`. This means the `row_idx` always stays 38 | zero, so every row of the csv file gets skipped by the `continue` statement. 39 | 40 | ## Debugging strategies 41 | ### 1. Rubber duck debugging 42 | Sometimes just going through your code line by line can help you find the solution. You can use the 43 | rubber duck debugging method for this: 44 | > 1. Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety). 45 | > 2. Place rubber duck on desk and inform it you are just going to go over some code with it, if that’s all right. 46 | > 3. Explain to the duck what your code is supposed to do, and then go into detail and explain your code line by line. 47 | > 4. At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way. 48 | > 49 | > Note: In a pinch a coworker might be able to substitute for the duck, however, it is often preferred to confide mistakes to the duck instead of your coworker. 50 | 51 | From [rubberduckdebugging.com](https://rubberduckdebugging.com) 52 | 53 | In our original example this might look something like: 54 | 55 | - "*I load the csv file. The filepath is correct, I checked. The file has multiple lines so 56 | the total should be higher than 0.*" 57 | - "*Then I make the `row_idx` and `total` variables and set them both to zero. I will use these to 58 | keep track of the active line in the loop and the total sum of the salary.*" 59 | - "*Then I loop through the rows of the csv file.*" 60 | - "*Because the first row has the headers, I can't use them for the total. The index of the 61 | first row is zero, so I skip it with `continue`.*" 62 | - "*Ohhhhh, I forgot to update the `row_idx` when I skip the header!*" 63 | 64 | ### 2. Print debugging 65 | Another method of debugging is to add print statements in your code to see what might be happening. 66 | If we do this in our original example, we get: 67 | 68 | ```py hl_lines="6 7 12 15 19 21" 69 | csv_path = "/Documents/salaries.csv" 70 | 71 | with open(csv_path, "r") as f: 72 | csv_lines = f.readlines() 73 | 74 | print("CSV file opened") 75 | print("File line count:", len(csv_lines)) 76 | 77 | row_idx = 0 78 | total = 0 79 | for row in csv_lines: 80 | print("Processing row:", row) 81 | # Skip the header row 82 | if row_idx == 0: 83 | print("Skipping row") 84 | continue 85 | 86 | name, salary = row.split(',') 87 | print("Adding salary:", salary) 88 | total += int(salary) 89 | print("New total is:", total) 90 | row_idx += 1 91 | 92 | print("Total: ", total) 93 | ``` 94 | 95 |
96 | This will print: 97 | 98 | ``` 99 | CSV file opened 100 | File line count: 3 101 | Processing row: name,salary 102 | Skipping row 103 | Processing row: john,1200 104 | Skipping row 105 | Processing row: jack,1400 106 | Skipping row 107 | Total: 0 108 | ``` 109 | Now we can immediately see what is happening. All rows get correctly loaded, but every row 110 | gets skipped. Using this information, we can figure out the bug. 111 | 112 | ### 3. Debugging using a debugger 113 | The most powerful method of debugging is to use debugger software. Sometimes the issues 114 | you face can become so complex that simple print statements won't give you enough information. 115 | 116 | Using a debugger, you can pause the execution of your code and see the values of all the variables. 117 | Then, you can use the tools of the debugger to walk step by step through the lines of your code, 118 | and see how the variables change. A debugger will also pause the execution of your code 119 | when an error occurs, so you can see the values of all the variables at the moment of the error. 120 | 121 | !!! video "Pycharm debugger tutorial" 122 | 123 | Basis Pycharm debugging tutorial 124 | 125 |
126 | 127 |
128 | **Why watch this?** If you're using Python and Pycharm, and want to know how to get started using the debugger. 129 | 130 |
131 | 132 |
133 | **Why watch this?** If you're using Python and Pycharm a lot, and you want to know every single 134 | possibility of the Pycharm debugger. 135 | 136 | 137 | 138 | 139 | %% TODO 140 | - Cpp specific (Clion) 141 | - Mention CLI debuggers 142 | - Debugging basics (step over, step in) 143 | - Debugging exercises 144 | -------------------------------------------------------------------------------- /docs/python/img/activate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/activate.png -------------------------------------------------------------------------------- /docs/python/img/cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/cli.png -------------------------------------------------------------------------------- /docs/python/img/jupyter-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/jupyter-1.png -------------------------------------------------------------------------------- /docs/python/img/jupyter-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/jupyter-2.png -------------------------------------------------------------------------------- /docs/python/img/jupyter-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/jupyter-3.png -------------------------------------------------------------------------------- /docs/python/img/jupyter-pycharm-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/jupyter-pycharm-install.png -------------------------------------------------------------------------------- /docs/python/img/jupyter-pycharm-run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/jupyter-pycharm-run.png -------------------------------------------------------------------------------- /docs/python/img/pyenvpycharm-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/pyenvpycharm-1.png -------------------------------------------------------------------------------- /docs/python/img/pyenvpycharm-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/pyenvpycharm-2.png -------------------------------------------------------------------------------- /docs/python/img/pyenvpycharm-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/pyenvpycharm-3.png -------------------------------------------------------------------------------- /docs/python/img/xkcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/python/img/xkcd.png -------------------------------------------------------------------------------- /docs/python/index.md: -------------------------------------------------------------------------------- 1 | # Python 2 | 3 | Python is a programming language that's easy to read, write, and understand. It's used a lot in Geomatics because: 4 | 5 | - **Quick to write:** When making scripts for data analysis, most of the time you care a lot about how fast you can *write* the code and not too much about how fast the code will *run*. Python is very quick to *write*. 6 | - **Many libraries:** There are many so-called "libraries" made for Python and they're easy to install. These libraries contain code other people wrote, so you don't have to code everything yourself. For example, if you want to open a shapefile, someone made a library for that! See [our list of useful libraries for Geomatics](pypackages.md). 7 | - **Open source, free, very popular:** Python is free for anyone to use, and its code is open source. There is lots of help out there on the internet, as it's one of the most popular programming languages worldwide. It's an industry standard in many Geomatics companies. 8 | 9 | ### Installing Python 10 | For Python code to run, you need a program called "the Python interpreter" (or more commonly "Python"). Often it's already installed on your computer, but we recommend against using the pre-installed Python. 11 | ??? warning "(Optional) Why you should not use pre-installed Python" 12 | Sometimes there will already be a version of Python installed on your computer. Here are the main reasons you don't want to use this version: 13 | 14 | - This Python is used by your operating system. If it somehow gets broken, other software on your computer depending on it might not work anymore and it will be very difficult to repair. 15 | - This Python is usually an older version, sometimes even Python 2. Code written for a newer version of Python might not run or give errors. 16 | 17 | So what to do instead? We recommend installing and managing Python using "pyenv". Pyenv is a tool that allows you to *install* multiple versions of Python, and *select* which specific version is *active*. 18 | 19 | [This guide shows you how to install Python using pyenv.](install.md) 20 | 21 | ### Python FAQ 22 | !!! question "When should I use Python for my project? (Over something like C++)" 23 | Short answer: If you want to write code quickly, use lots of libraries, and speed isn't crucial. 24 | 25 | Long answer: See [How to choose a programming language](../programming/chooselanguage.md). 26 | 27 | ### Learning Python 28 | %% TODO 29 | 30 | ### Other useful Python Resources 31 | - We've made a list of a bunch of [useful Python packages for Geomatics](pypackages.md) -------------------------------------------------------------------------------- /docs/python/install.md: -------------------------------------------------------------------------------- 1 | 2 | # How to install Python using pyenv 3 | 4 | Installing and using Python as recommended below has major benefits and will prevent problems in the future. 5 | 6 | !!! warning ":material-microsoft-windows: Windows: use the python.org version!" 7 | 8 | pyenv was created for macOS and Linux, and although it has a Windows version (called "**pyenv-win**"), this is not working very well and the installation is buggy. 9 | 10 | Therefore, for Windows we recommend you install Python "the normal way" ([downloading from python.org](https://www.python.org/downloads/)), but we **strongly recommend** you use [virtual environments](venv.md). 11 | 12 | --- 13 | 14 | We recommend installing and managing Python using "pyenv". 15 | pyenv is a tool that allows you to install *multiple versions* of Python, and select which specific version should be used. 16 | 17 | 18 | === ":simple-apple: macOS" 19 | To install Python via pyenv, make sure you have [Homebrew](../computer/packagemanager.md) installed and then run the following commands in your [terminal](../computer/terminal.md). 20 | 21 | **Step 1: Install pyenv using Homebrew** 22 | ```bash 23 | brew install pyenv 24 | ``` 25 | Then run the following commands, these set up pyenv for your terminal. 26 | ```bash 27 | conf_file="$HOME/.${SHELL##*/}"rc 28 | echo 'export PYENV_ROOT="$HOME/.pyenv"' >> "$conf_file" 29 | echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> "$conf_file" 30 | echo 'eval "$(pyenv init -)"' >> "$conf_file" 31 | exec "$SHELL" 32 | ``` 33 | 34 | 35 | === ":simple-linux: Linux" 36 | Run the following commands in your [terminal](../computer/terminal.md). 37 | 38 | **Step 1: Install pyenv** 39 | ```bash 40 | curl https://pyenv.run | bash 41 | ``` 42 | 43 | **Step 2: Using pyenv, install Python 3.10.5** 44 | 45 | ```bash 46 | pyenv install 3.10.5 47 | ``` 48 | This will install Python 3.10.5; on macOS and Linux you can omit the minor version (the `.5` at the end) and pyenv will automatically choose the latest version. 49 | 50 | ??? info "(Optional) What version of Python should I install?" 51 | How do I know which Python version I need? Generally it's recommended to use the previous version of Python (so if Python 3.11 is the latest, install 3.10). This is because it takes some time for libraries to be updated, so it's safer to use a version of Python which is more supported. 52 | 53 | You can use `pyenv install -l` to get a list of all available Python versions` 54 | 55 | **Step 3: Check what version of Python is currently the default Python** 56 | ```bash 57 | pyenv version 58 | ``` 59 | If you already have a pre-installed Python, this will print `system`. It might also say "No Python version has been set yet". You can use this command anytime you want to check what version of Python is active. 60 | 61 | **Step 4: Set your newly installed Python as default** 62 | ```bash 63 | pyenv global 3.10.5 64 | ``` 65 | This command sets your newly installed Python as the default Python for all terminals. 66 | 67 | -------------------------------------------------------------------------------- /docs/python/jupyter.md: -------------------------------------------------------------------------------- 1 | 2 | # Jupyter Lab & Notebooks 3 | 4 | If you are working with Python, a great way to develop your code efficiently, especially when performing data analysis or creating proof-of-concepts, is to use [Jupyter notebooks](https://jupyter.org/). 5 | Here we are showing you how to do this through Jupyter lab, which is a web-based, interactive development environment that includes Jupyter notebooks. 6 | 7 | 8 | 9 | # How to install & launch 10 | 11 | === "Using the terminal" 12 | 13 | In your [terminal](../computer/terminal.md), you can use `pip` to install Jupyter Lab packages. 14 | 15 | ```bash 16 | pip install jupyterlab 17 | ``` 18 | 19 | Then you can launch the application with: 20 | 21 | ```bash 22 | jupyter lab 23 | ``` 24 | 25 | This will start Jupyter Lab in your internet browser (eg Firefox/Chrome/Safari). 26 | On the left panel you can navigate through your files and directories. The right panel is the Launcher; from here you can start a notebook, as shown below. 27 | 28 | ![Interface](img/jupyter-1.png) 29 | 30 | 31 | === "Using PyCharm" 32 | 33 | !!! warning 34 | This does **not** not with the free version of PyCharm (Community Edition). 35 | You need the [Professional Edition](https://www.jetbrains.com/pycharm/) (free for students). 36 | 37 | In PyCharm, open a project where you have one or more `*.ipynb` files and then install "jupyterlab" and "jupyter" packages: 38 | 39 | ![](img/jupyter-pycharm-install.png){:width="500px"} 40 | 41 | and then you can simply run press Run/Play to run the cell that is currently selected, and you can select the one you want with the mouse. 42 | 43 | ![](img/jupyter-pycharm-run.png) 44 | 45 | 46 | ## How to work with a notebook 47 | 48 | Within the new notebook, you can write small blocks of code in separate cells and run them individually by pressing `SHIFT+ENTER`. You can move cells around and collapse them, plot graphs and images and you can even add [Markdown](../writing/markdown.md) cells to document your process. 49 | 50 | ![Interface](img/jupyter-2.png) 51 | 52 | 53 | !!! info 54 | The biggest advantage of the notebook is that you do not need to rerun parts of code that might be time-consuming (eg loading a large TIF file). Once a cell is run, its state is preserved and subsequent cells can be changed and run independently. 55 | 56 | As shown below, you can use a exclamation mark to run bash commands (for example for installing a new python module to your environment) and a question mark to see some information about you functions an variables. 57 | 58 | ![Tips](img/jupyter-3.png) 59 | -------------------------------------------------------------------------------- /docs/python/pip.md: -------------------------------------------------------------------------------- 1 | # Installing Python Packages using pip 2 | 3 | !!! warning "This guide presumes you have [installed Python using pyenv](install.md)." 4 | 5 | !!! info "All commands shown on this page are run in the [terminal](../computer/terminal.md)." 6 | 7 | **Step 1: Make sure you are in the correct Python version** 8 | ```bash 9 | pyenv version 10 | ``` 11 | It should print the version you've installed, so `3.11.5` from our Python installation tutorial. Does it not? Run `pyenv global 3.11.5` to activate it. 12 | 13 | Are you using [virtual environments](venv.md)? Then make sure it prints out the name of the environment you want to be in. 14 | 15 | If you are ever wondering why you get a `ModuleNotFoundError` even though you've just installed the library, it's probably because you had a different version of Python activated than what you're using to run your code. 16 | 17 | **Step 2: Using pip, install the package** 18 | 19 | In this example, we are installing the `numpy` package. 20 | ```bash 21 | pip install numpy 22 | ``` 23 | It will print progress on the screen and tell you when it's done. 24 | 25 | **The package is now installed!** 26 | 27 | !!! tip "Installing multiple packages at once" 28 | You can install multiple package at once by separating their names with spaces. If we want to install matplotlib, numpy, and pandas we can run 29 | ``` 30 | pip install matplotlib numpy pandas 31 | ``` 32 | 33 | !!! tip "See what packages are installed" 34 | Want to know what is installed in your active version of Python? Use this command: 35 | ``` 36 | pip list 37 | ``` 38 | Which will print a list of all installed packages. 39 | 40 | !!! tip "More pip possibilities ⭐️ Intermediate" 41 | %%TODO add video about more pip options 42 | 43 | Or see the [official documentation website of pip](https://pip.pypa.io/en/stable/cli/). -------------------------------------------------------------------------------- /docs/python/pypackages.md: -------------------------------------------------------------------------------- 1 | 2 | # Useful Python packages for geomatics 3 | 4 | !!! info "How to install Python packages" 5 | Please see our [Install Python packages using pip guide](pip.md). 6 | 7 | - [cjio](https://github.com/cityjson/cjio): Python CLI + API to process and manipulate [CityJSON](https://www.cityjson.org/) files 8 | - [Fiona](https://github.com/Toblerity/Fiona): to read/write GIS data, the "Pythonic GDAL" 9 | - [geemap](https://github.com/gee-community/geemap): interactive mapping with Google Earth Engine 10 | - [GeoPandas](https://geopandas.org/): Pandas (for data science) with geo-types 11 | - [Laspy](https://github.com/laspy/laspy): to read/write/process point clouds in LAS/LAZ 12 | - [Matplotlib](https://matplotlib.org/): great to visualise (mostly non-geo) data 13 | - [NumPy](https://numpy.org/): multi-dimensional arrays 14 | - [pyproj](https://pyproj4.github.io/pyproj/): essential for dealing with CRS 15 | - [Rasterio](https://github.com/rasterio/rasterio): read/write/process raster data 16 | - [scikit-learn](https://scikit-learn.org/stable/): machine learning in Python 17 | - [Shapely](https://github.com/shapely/shapely): processing of 2D vector data 18 | - [startinpy](https://github.com/hugoledoux/startinpy/): Delaunay triangulator for terrain data 19 | - [TorchGeo](https://torchgeo.readthedocs.io/): Deep Learning for GIS: datasets, samplers, transforms, and pre-trained models for geospatial data 20 | 21 | -------------------------------------------------------------------------------- /docs/python/venv.md: -------------------------------------------------------------------------------- 1 | 2 | # Virtual environments (venv) 3 | 4 | ## What is a venv? 5 | 6 | A Python virtual environment (venv) is ["created on top of an existing Python installation [...] and may optionally be isolated from the packages in the base environment"](https://docs.python.org/3/library/venv.html). 7 | Each venv will have its own set of Python packages, indepedent from the the main Python installation. 8 | 9 | It allows us to avoid this mess (from [xkcd-1987](https://xkcd.com/1987/)): 10 | 11 | ![](img/xkcd.png){ width="400" } 12 | 13 | 14 | ## How to create and use a venv 15 | 16 | === "Directly with PyCharm" 17 | 18 | PyCharm allows you to create venv and activate them, follow those instructions: 19 | 20 | 21 | 22 | === "If you use pyenv" 23 | 24 | If you used [pyenv](install.md) to install Python (this is what we recommend for macOS and Linux!), then you can also install the [pyenv-virtualenv plugin](https://github.com/pyenv/pyenv-virtualenv) to install and manage your virtual environments. 25 | It keeps a global list of which versions and venv you have installed, and allows you to easily switch between them. 26 | 27 | To install: 28 | 29 | - macOS: `brew install pyenv-virtualenv` 30 | - Linux: [see details](https://github.com/pyenv/pyenv-virtualenv?tab=readme-ov-file#installation) 31 | 32 | Some useful commands: 33 | 34 | - create a new venv called "myenv1" (based on the current global version): `pyenv virtualenv myenv1` 35 | - activate it: `pyenv activate myenv1` 36 | - deactivate it: `pyenv deactivate` 37 | 38 | 39 | === "Built-in Python" 40 | 41 | venv are builtin Python, and you can install a venv in a specific folder. 42 | In the folder where you have some code, you can create a new venv: 43 | 44 | ``` 45 | python -m venv ./myenv 46 | ``` 47 | 48 | For Windows, replace `./myenv` by the path where you want the venv. 49 | 50 | Then the venv needs to be activated, how to do this depends on your OS and used console: 51 | 52 | ![](img/activate.png) 53 | 54 | If you're still in the folder above, with macOS I need to: 55 | 56 | ``` 57 | source ./myvenv/bin/activate 58 | ``` 59 | 60 | ![](img/cli.png) 61 | 62 | 63 | The new venv you created is empty, that is it should only have 2 packages as shown in the console above. 64 | You can install new packages with `pip install numpy` and those will be added in the venv. 65 | As long as you see the name of your venv between brackets (`(myenv)`) it means that you are using the venv. 66 | 67 | To stop using this venv: 68 | 69 | ``` 70 | deactivate 71 | ``` 72 | 73 | === "pyenv + PyCharm" 74 | 75 | Just activate and select a new interpreter (which must be a venv, not a Python version!), following those steps: 76 | 77 | 1. ![](img/pyenvpycharm-1.png) 78 | 2. ![](img/pyenvpycharm-2.png) 79 | 3. ![](img/pyenvpycharm-3.png) 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /docs/research/img/ellie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/research/img/ellie.png -------------------------------------------------------------------------------- /docs/research/img/fabian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/research/img/fabian.png -------------------------------------------------------------------------------- /docs/research/img/noortje.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/research/img/noortje.png -------------------------------------------------------------------------------- /docs/research/img/zhaiyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/research/img/zhaiyu.png -------------------------------------------------------------------------------- /docs/research/msccode.md: -------------------------------------------------------------------------------- 1 | 2 | # MSc thesis code in Git 3 | 4 | Following the [open science requirements](https://3d.bk.tudelft.nl/courses/geo2020/openscience/), it is now mandatory to release your code as open-source and to document it. 5 | 6 | You should first make sure that you have [all the ingredients of a good Git repository](../git/goodgit.md), and then you can have a look at 4 good examples of repositories from MSc students: 7 | 8 | 9 | [![](img/fabian.png){:width="300px"}](https://github.com/fabisser/stylesdf) 10 | [![](img/noortje.png){:width="300px"}](https://github.com/NoortjevanderHorst/treegrowthmodelling) 11 | [![](img/ellie.png){:width="300px"}](https://github.com/ellieroy/no-floors-inference-NL) 12 | [![](img/zhaiyu.png){:width="300px"}](https://github.com/chenzhaiyu/points2poly) 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/research/researchtips.md: -------------------------------------------------------------------------------- 1 | 2 | # Some research tips 3 | 4 | 5 | This is a video that I ([Hugo Ledoux](https://3d.bk.tudelft.nl/hledoux)) recorded to stop repeating the same every year for every MSc student. 6 | 7 | It's very opiniated, it is how **I** work. I hope it can help you find **your** way of working. 8 | 9 | ![](https://upload.wikimedia.org/wikipedia/commons/2/21/OpenGL_Tutorial_TODO.png){width=300x} 10 | -------------------------------------------------------------------------------- /docs/styleguide.md: -------------------------------------------------------------------------------- 1 | 2 | # geogeeks' style guide 3 | 4 | This page is intended as a reference for **styling conventions** used on the site to achieve consistency. The Markdown source can be used as snippets. 5 | 6 | !!! tip ":material-microsoft-visual-studio-code: Visual Studio Code snippets" 7 | The repository contains snippet shortcut files for Visual Studio Code. On this page, if you see something starting with a backslash `\` it is the shortcut for placing that snippet. 8 | Make sure in Visual Studio code the following options are enabled: 9 | ```json 10 | "editor.quickSuggestions": { 11 | "other": "on", 12 | }, 13 | "editor.inlineSuggest.enabled": true 14 | ``` 15 | 16 | ### Keyboard shortcuts 17 | Use the following styling: ++ctrl+alt+del++ `++ctrl+alt+del++` 18 | 19 | When commands are different across operating systems use the following styles: 20 | 21 | Inline: ++ctrl+alt+del++ (++cmd+option+del++ on macOS) `++ctrl+alt+del++ (++cmd+option+del++ on macOS)` 22 | 23 | Tabs: 24 | ```markdown 25 | === ":material-microsoft-windows: :simple-linux: Windows & Linux" 26 | ++ctrl+alt+del++ 27 | === ":simple-apple: macOS" 28 | ++cmd+option+del++ 29 | ``` 30 | 31 | === ":material-microsoft-windows: :simple-linux: Windows & Linux" 32 | ++ctrl+alt+del++ 33 | === ":simple-apple: macOS" 34 | ++cmd+option+del++ 35 | 36 | ### Code and Files 37 | For inline code use inline code blocks like `Matrix::get_row` (Code surrounded by backticks `). 38 | 39 | For multiline code, use multiline code blocks. Try to always state the language the code is in. 40 | 41 | Code block without stated language: 42 | ??? markdown 43 | ``` 44 | ``` 45 | # code here 46 | ``` 47 | ``` 48 | ``` 49 | # Python code here 50 | import numpy as np 51 | ``` 52 | 53 | Code block with stated language: 54 | ??? markdown 55 | ``` 56 | ```python 57 | # code here 58 | ``` 59 | ``` 60 | 61 | ```python 62 | # Python code here 63 | import numpy as np 64 | ``` 65 | 66 | Filenames can be added to code blocks with the following syntax 67 | ??? markdown 68 | ``` 69 | ```python title="myfile.py" 70 | # code here 71 | ``` 72 | ``` 73 | ```python title="myfile.py" 74 | # code here 75 | ``` 76 | 77 | Annotations in code blocks. 78 | 79 | These are used to add extra information that would otherwise clutter the code block. For example libraries that need to be installed, links to other pages on the website, etc. 80 | 81 | ??? markdown 82 | The syntax works by placing a comment using the comment syntax of that specific language. Inside the comment place `(1)!` counting up from 1 for multiple annotations. Below the code block place a numbered list with the comments. The `!` exclamation mark also removes the comment character. 83 | ```md 84 | ```python 85 | import numpy as np 86 | import pandas as pd # (1)! 87 | 88 | data = np.array([2,3,4]) 89 | ``` 90 | 91 | 1. Here you can write a comment about the code to further explain. 92 | ``` 93 | 94 | ```python 95 | import numpy as np 96 | import pandas as pd # (1)! 97 | 98 | data = np.array([2,3,4]) 99 | ``` 100 | 101 | 1. Here you can write a comment about the code to further explain. [Links](index.md) and other **markdown** features are possible here. 102 | 103 | ### Icons 104 | ###### Languages 105 | - :simple-python: Python: `:simple-python:` `\ipython` 106 | - :simple-cplusplus: C++: `:simple-cplusplus:` `\icpp` 107 | - :simple-html5: HTML: `:simple-html5:` `\ihtml` 108 | - :simple-css3: CSS: `:simple-css3:` `\icss` 109 | - :simple-javascript: Javascript: `:simple-javascript:` `\ijavascript` 110 | 111 | 112 | ###### OS 113 | - :material-microsoft-windows: Windows: `:material-microsoft-windows:` `\iwindows` 114 | - :simple-linux: Linux: `:simple-linux:` `\ilinux` 115 | - :simple-apple: macOS: `:simple-apple:` `\imacos`, `\iapple` 116 | - :material-web: www application: `:material-web:` 117 | 118 | ###### Computer 119 | - :octicons-terminal-16: Terminal `:octicons-terminal-16:` `\iterminal` 120 | 121 | ###### Software 122 | - :simple-pycharm: Pycharm `:simple-pycharm:` `\ipycharm` 123 | - :simple-clion: CLion `:simple-clion:` `\iclion` 124 | - :material-microsoft-visual-studio-code: Visual Studio Code `:material-microsoft-visual-studio-code:` `\ivscode` 125 | - :simple-qgis: QGIS `:simple-qgis:` `\iqgis` 126 | - :simple-arcgis: ArcGIS `:simple-arcgis:` `\iarcgis` 127 | 128 | ### Multiple instructions 129 | For example different operating system, different software, different programming language 130 | 131 | #### Operating-system specific instructions 132 | These should be split into content tabs with consistent tab naming. 133 | 134 | ??? Markdown 135 | 136 | Since the website uses global tabs, only use the predefined names: 137 | 138 | - :material-microsoft-windows: Windows `:material-microsoft-windows: Windows` 139 | - :simple-apple: macOS `:simple-apple: macOS` 140 | - :simple-linux: Linux `:simple-linux: Linux` 141 | - :simple-apple: :simple-linux: Unix (macOS & Linux) `:simple-apple: :simple-linux: Unix (macOS & Linux)` 142 | - :material-microsoft-windows: :simple-linux: Windows & Linux `:material-microsoft-windows: :simple-linux: Windows & Linux` (Mainly used for shortcuts) 143 | 144 | Windows/macOS/Linux. `\os_win_macos_linux`. 145 | 146 | ```md 147 | === ":material-microsoft-windows: Windows" 148 | 149 | Windows instructions here 150 | 151 | === ":simple-apple: macOS" 152 | 153 | macOS instructions here 154 | 155 | === ":simple-linux: Linux" 156 | 157 | Linux instructions here 158 | ``` 159 | 160 | === ":material-microsoft-windows: Windows" 161 | 162 | Windows instructions here 163 | 164 | === ":simple-apple: macOS" 165 | 166 | macOS instructions here 167 | 168 | === ":simple-linux: Linux" 169 | 170 | Linux instructions here 171 | 172 | Windows/Unix. `\ow_win_unix`. 173 | 174 | ```md 175 | === ":material-microsoft-windows: Windows" 176 | 177 | Windows instructions here 178 | 179 | === ":simple-apple: :simple-linux: Unix (macOS & Linux)" 180 | 181 | Linux instructions here 182 | ``` 183 | 184 | === ":material-microsoft-windows: Windows" 185 | 186 | Windows instructions here 187 | 188 | === ":simple-apple: :simple-linux: Unix (macOS & Linux)" 189 | 190 | Linux instructions here 191 | 192 | Windows&Linux/macOS `\os_winlinux_macos` 193 | 194 | ```md 195 | === ":material-microsoft-windows: :simple-linux: Windows & Linux" 196 | 197 | Windows & Linux instructions here 198 | 199 | === ":simple-apple: macOS" 200 | 201 | macOS instructions here 202 | 203 | ``` 204 | 205 | === ":material-microsoft-windows: :simple-linux: Windows & Linux" 206 | 207 | Windows & Linux instructions here 208 | 209 | === ":simple-apple: macOS" 210 | 211 | macOS instructions here 212 | 213 | === ":material-microsoft-windows: Windows" 214 | 215 | Windows instructions here 216 | 217 | === ":simple-apple: macOS" 218 | 219 | macOS instructions here 220 | 221 | === ":simple-linux: Linux" 222 | 223 | Linux instructions here 224 | 225 | #### Language-specific instructions 226 | Split instructions/code for different languages into content tabs. You can use the snippets to achieve consistent naming. 227 | 228 | ??? Markdown 229 | 230 | - Python: `\pytab` 231 | - C++: `\cpptab` 232 | - More will be added 233 | 234 | ```markdown 235 | 236 | === ":simple-python: Python" 237 | 238 | ```py 239 | # some test code 240 | ``` 241 | 242 | === ":simple-cplusplus: C++" 243 | 244 | ```cpp 245 | \\ Some test code 246 | ``` 247 | 248 | 249 | ``` 250 | 251 | 252 | === ":simple-python: Python" 253 | 254 | ```py 255 | # some test code 256 | ``` 257 | 258 | === ":simple-cplusplus: C++" 259 | 260 | ```cpp 261 | \\ Some test code 262 | ``` 263 | 264 | ### External links/embeds 265 | 266 | #### Inline YouTube 267 | 268 | On the page of the YouTube video, select "Share/Embed Video" and copy directly the code in the following template: 269 | 270 | ??? Markdown 271 | ```md 272 | !!! video "%TODO title here" 273 |
274 | %TODO Paste the code here 275 |
276 | %TODO Write description 277 | ``` 278 | Shortcut: `\video-embed` 279 | 280 | Then the markdown will look like this: 281 | ```md 282 | !!! video "%TODO title here" 283 |
284 | 285 |
286 | %TODO Write description 287 | ``` 288 | 289 | and you'll get this: 290 | 291 | !!! video "%TODO title here" 292 |
293 | 294 |
295 | %TODO Write description 296 | 297 | #### External web pages/tutorials 298 | Want to recommend an external web page that is not a video? Use the following admonition block: 299 | 300 | ??? Markdown 301 | ```md 302 | !!! external-link "Title of the external resource" 303 | Write your text here and add a link to the external resource 304 | using the [title](link to webpage) syntax. 305 | 306 | Make the title long, so the link is clearly visible. So instead of [title](link to webpage) you would write [The official GitHub tutorial](link to webpage). 307 | ``` 308 | !!! external-link "Title of the external resource" 309 | Write your text here and add a link to the external resource 310 | using the [title](https://geogeeks.tudelft.nl) syntax. 311 | 312 | Make the title long, so the link is clearly visible. So instead of [title](https://geogeeks.tudelft.nl) you would write [The official GitHub tutorial](https://geogeeks.tudelft.nl). 313 | 314 | It's good to write a short text on why the resource is useful, and if possible give a difficulty tag. Also a screenshot of the web page can help. -------------------------------------------------------------------------------- /docs/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | 2 | :root { 3 | --md-admonition-icon--external-link: url('data:image/svg+xml;charset=utf-8,'); 4 | --md-admonition-icon--video: url('data:image/svg+xml;charset=utf-8,'); 5 | --md-primary-fg-color: #3e004b; 6 | --md-primary-fg-color--light: #ECB7B7; 7 | --md-primary-fg-color--dark: #113c2b; 8 | } 9 | .md-typeset .admonition.external-link, 10 | .md-typeset details.external-link { 11 | border-color: rgb(247, 115, 146); 12 | } 13 | .md-typeset .external-link > .admonition-title, 14 | .md-typeset .external-link > summary { 15 | background-color: rgba(247, 115, 146, 0.1); 16 | } 17 | .md-typeset .external-link > .admonition-title::before, 18 | .md-typeset .external-link > summary::before { 19 | background-color: rgb(247, 115, 146); 20 | -webkit-mask-image: var(--md-admonition-icon--external-link); 21 | mask-image: var(--md-admonition-icon--external-link); 22 | } 23 | 24 | .md-typeset .admonition.video, 25 | .md-typeset details.video { 26 | border-color: rgb(247, 115, 146); 27 | } 28 | .md-typeset .video > .admonition-title, 29 | .md-typeset .video > summary { 30 | background-color: rgba(247, 115, 146, 0.1); 31 | } 32 | .md-typeset .video > .admonition-title::before, 33 | .md-typeset .video > summary::before { 34 | background-color: rgb(247, 115, 146); 35 | -webkit-mask-image: var(--md-admonition-icon--video); 36 | mask-image: var(--md-admonition-icon--video); 37 | } 38 | 39 | .tag { 40 | font-size: 0.9em; 41 | color: #eeeeee; 42 | padding: 5px 7px; 43 | border-radius: 100px; 44 | position: relative; 45 | } 46 | .tag.beginner-tag { 47 | background-color: black; 48 | } 49 | 50 | .tag.intermediate-tag { 51 | background-color: black; 52 | } 53 | 54 | .tag.advanced-tag { 55 | background-color: #6a3cb5; 56 | } 57 | 58 | .tag[data-tooltip]:hover::after { 59 | content: attr(data-tooltip); 60 | position: absolute; 61 | bottom: 100%; 62 | left: 50%; 63 | transform: translateX(-50%); 64 | padding: 5px; 65 | border-radius: 5px; 66 | background-color: rgba(0, 0, 0, 0.8); 67 | color: #fff; 68 | min-width: 40ch; 69 | max-width: 50ch; 70 | pointer-events: none; 71 | } 72 | 73 | -------------------------------------------------------------------------------- /docs/writing/files/intro_latex_tudelft3d.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/writing/files/intro_latex_tudelft3d.pdf -------------------------------------------------------------------------------- /docs/writing/files/latex_result.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/writing/files/latex_result.pdf -------------------------------------------------------------------------------- /docs/writing/files/latex_result.tex: -------------------------------------------------------------------------------- 1 | \documentclass[a4paper,11pt]{scrartcl} 2 | 3 | \usepackage{graphicx} 4 | \usepackage[utf8]{inputenc} %-- pour utiliser des accents en français 5 | \usepackage{amsmath,amssymb,amsthm} 6 | \usepackage[round]{natbib} 7 | \usepackage{url} 8 | \usepackage{xspace} 9 | \usepackage[left=20mm,top=20mm]{geometry} 10 | \usepackage{algorithmic} 11 | \usepackage{subcaption} 12 | \usepackage{mathpazo} 13 | \usepackage{booktabs} 14 | \usepackage{hyperref} 15 | \usepackage{listings} 16 | % \usepackage{draftwatermark} 17 | 18 | \newcommand{\ie}{ie} 19 | \newcommand{\eg}{eg} 20 | \newcommand{\reffig}[1]{Figure~\ref{#1}} 21 | \newcommand{\refsec}[1]{Section~\ref{#1}} 22 | 23 | \setcapindent{1em} %-- for captions of Figures 24 | 25 | \renewcommand{\algorithmicrequire}{\textbf{Input:}} 26 | \renewcommand{\algorithmicensure}{\textbf{Output:}} 27 | 28 | 29 | \title{My MSc Geomatics assignment} 30 | \author{Céline Dion\\\#12345\\\url{c.dion@tudelft.nl} \and Roger van Delft\\\#56789\\url{r.vandelft@tudelft.nl}} 31 | \date{13 November 2023} 32 | 33 | 34 | \begin{document} 35 | 36 | \maketitle 37 | 38 | %%% 39 | % 40 | \section{Introduction} 41 | 42 | Try to reproduce as closely as possible this document. Some tips: 43 | 44 | \begin{enumerate} 45 | \item the template used is KOMA-script: \verb|\documentclass[a4paper,11pt]{scrartcl}| 46 | \item the font used is Palatino 47 | \end{enumerate} 48 | 49 | \subsection{References} 50 | 51 | We can see this in the work of \citet{Schiefer20} and others~\citep{Lan22}. 52 | 53 | 54 | \subsection{Figures} 55 | 56 | Then download locally the TUDelft logo on the front page of \url{https://tudelft3d.github. 57 | io/geogeeks}, and add it as in a Figure~\ref{fig:logo}. 58 | \begin{figure} 59 | \centering 60 | \includegraphics[angle=180,width=0.5\linewidth]{tud.png} 61 | \caption{The TUDelft logo upside-down.}% 62 | \label{fig:logo} 63 | \end{figure} 64 | 65 | Then pick a software to draw vectorial and draw a circle and a square, and save it to a PDF\@. 66 | And add it to a figure as in Figure~\ref{fig:circle}. 67 | \begin{figure} 68 | \centering 69 | \includegraphics[width=0.2\linewidth]{circle.pdf} 70 | \caption{A circle and a square.}% 71 | \label{fig:circle} 72 | \end{figure} 73 | 74 | \subsection{Tables} 75 | And finally replicate the Table~\ref{tab:example}. 76 | 77 | \begin{table} 78 | \centering 79 | \begin{tabular}{@{}lrrcrr@{}} \toprule 80 | &&&& \multicolumn{2}{c}{\# of things} \\ 81 | \cmidrule{5-6} 82 | & this & that && left & right \\ 83 | \toprule 84 | \textbf{A} & 30 & 48 && 5970 & 3976 \\ 85 | \textbf{B} & 63 & 69 && 15711 & 44 \\ 86 | \bottomrule 87 | \end{tabular} 88 | \caption{Details concerning the datasets used for the experiments.}% 89 | \label{tab:example} 90 | \end{table} 91 | 92 | \subsection{Code} 93 | 94 | And the code is shown in Figure~\ref{fig:code}. 95 | \begin{figure} 96 | \begin{lstlisting} 97 | import sys 98 | print("Hello world!") 99 | \end{lstlisting} 100 | \caption{I am a Python hero!}% 101 | \label{fig:code} 102 | \end{figure} 103 | 104 | 105 | %%% 106 | % 107 | \section{Conclusions} 108 | 109 | I am now the best at \LaTeX! 110 | 111 | Lemongrass frosted gingerbread bites banana bread orange crumbled lentils sweet potato black bean burrito green pepper springtime strawberry ginger lemongrass agave green tea smoky maple tempeh glaze enchiladas couscous. Cranberry spritzer Malaysian cinnamon pineapple salsa apples spring cherry bomb bananas blueberry pops scotch bonnet pepper spiced pumpkin chili lime eating together kale blood orange smash arugula salad. Bento box roasted peanuts pasta Sicilian pistachio pesto lavender lemonade elderberry Southern Italian citrusy mint lime taco salsa lentils walnut pesto tart quinoa flatbread sweet potato grenadillo. 112 | 113 | 114 | \bibliographystyle{abbrvnat} 115 | \bibliography{references} 116 | \end{document} 117 | -------------------------------------------------------------------------------- /docs/writing/files/md_result.md.txt: -------------------------------------------------------------------------------- 1 | 2 | # My first Markdown file 3 | 4 | ![](640px-Markdown-mark.svg.png) 5 | 6 | Hello everyone, I took that image from [there](https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Markdown-mark.svg/640px-Markdown-mark.svg.png). 7 | 8 | Lemongrass frosted __gingerbread__ bites banana bread orange crumbled lentils sweet potato black bean burrito green pepper springtime strawberry ginger lemongrass agave green tea smoky maple tempeh glaze enchiladas *couscous*. 9 | Cranberry spritzer Malaysian cinnamon pineapple salsa apples spring cherry bomb bananas blueberry pops scotch bonnet pepper spiced pumpkin chili lime eating together kale blood orange smash arugula salad. Bento box roasted peanuts pasta Sicilian pistachio pesto lavender lemonade elderberry Southern Italian citrusy mint lime taco salsa lentils walnut pesto tart quinoa flatbread sweet potato grenadillo. 10 | 11 | ## Lists are great 12 | 13 | 1. make lists 14 | 2. make sub-lists 15 | 1. which include emojis 🙌 16 | 2. or **anything** really 17 | 3. and that's it 18 | 19 | 20 | ## Some code 21 | 22 | The most important function is `do_something()`: 23 | 24 | ```python 25 | import sys 26 | 27 | def do_something(b): 28 | return b + 0.01 29 | a = 1.0 30 | while a < 2.0: 31 | a = do_something(a) 32 | sys.exit() 33 | ``` 34 | 35 | ## A great table 36 | 37 | | Markdown editor | URL | price | 38 | | --------------- | --- | -----:| 39 | | PyCharm | https://www.jetbrains.com/pycharm/ | **€0**.00 | 40 | | SublimeText | https://www.sublimetext.com | **€99**.00 | 41 | | vim | https://www.vim.org | **€0**.00 | 42 | 43 | ## Some specific things to be done 44 | 45 | - [x] add the figure above 46 | - [ ] add the table below 47 | - [ ] figure out how to add tables 48 | 49 | ## And to finish, a quote 50 | 51 | As [Linus Torvald](https://en.wikipedia.org/wiki/Linus_Torvalds) said: 52 | 53 | > Talk is cheap, show me the code 54 | -------------------------------------------------------------------------------- /docs/writing/img/chatgpt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/writing/img/chatgpt.png -------------------------------------------------------------------------------- /docs/writing/img/fc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
yes!
yes!
Do you want to draw a flowchart?
Do you want to draw a flowch...
Read below
Read below
Text is not SVG - cannot display
-------------------------------------------------------------------------------- /docs/writing/img/overleaf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/writing/img/overleaf.png -------------------------------------------------------------------------------- /docs/writing/img/typst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/writing/img/typst.png -------------------------------------------------------------------------------- /docs/writing/img/vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tudelft3d/geogeeks/1ec52a1c45088c33534399861f2b84a59c65adaf/docs/writing/img/vscode.png -------------------------------------------------------------------------------- /docs/writing/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Writing assignments/docs/thesis/etc 3 | 4 | 5 | During the MSc Geomatics, you'll have to write reports, assignments, an MSc thesis, documentation for code, etc. 6 | 7 | While you could use Microsoft Word for those, we do __not__ recommend it! 8 | 9 | 10 | [Markdown :fontawesome-solid-paper-plane:](markdown.md){ .md-button } 11 | Best for documentation (*this website is written in Markdown, see [its source code](https://github.com/tudelft3d/geogeeks/)*) 12 | 13 | [LaTeX :fontawesome-solid-paper-plane:](latex.md){ .md-button } 14 | Best for MSc thesis and for assignment reports 15 | 16 | [Typst :fontawesome-solid-paper-plane:](typst.md){ .md-button } 17 | The "new LaTeX", great in 1-2y; live on the cutting edge! 18 | -------------------------------------------------------------------------------- /docs/writing/latex.md: -------------------------------------------------------------------------------- 1 | # LaTeX 2 | 3 | 4 | ## LaTeX installation 5 | 6 | 7 | ### Web-application: Overleaf 8 | 9 | [![](img/overleaf.png)](https://overleaf.com) 10 | 11 | To start, the geogeek-in-chief recommends you use the [online LaTeX environment Overleaf](https://www.overleaf.com) since it has a full installation of LaTeX and there is nothing to install. 12 | If you login with your TUDelft email, you get extra features (TUDelft pays for it). 13 | 14 | ### Local installation 15 | 16 | If you want to use LaTeX locally (it's faster to compile) then you need either: 17 | 18 | - [MiKTeX](http://miktex.org/about) :material-microsoft-windows: 19 | - [MacTeX](https://tug.org/mactex) :simple-apple: 20 | - [TeXLive](https://www.tug.org/texlive) :simple-linux: 21 | 22 | You can also combine the best of both worlds (overleaf and local), by using either the [Git Integration](https://www.overleaf.com/learn/how-to/Git_integration) to treat your Overleaf project as a remote repository or by using [GitHub synchronisation](https://www.overleaf.com/learn/how-to/GitHub_Synchronization) linking your project to a GitHub repository. Check the recommendations for local editors below. 23 | 24 | !!! warning 25 | 26 | For small documents Overleaf is great. But it becomes rather slow for medium to large documents, and then using LaTeX locally is probably a better idea. 27 | 28 | Beware that pushes from Git/GitHub can result in the loss or displacement of track changes and comments, so make sure you don't mix the two (and make your supervisors aware). 29 | 30 | 31 | 32 | ## Getting started 33 | 34 | !!! external-link "Overleaf's getting started with LaTeX" 35 | 36 | The best is to follow the [Overleaf's Learn LaTeX in 30min](https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes) to start. 37 | 38 | The only crucial thing missing from it is how to add references, for this we suggest you use "natbib" ([tutorial about bibliography management with natbib](https://www.overleaf.com/learn/latex/Bibliography_management_with_natbib)). 39 | 40 | 41 | ## Test yourself with an exercise 42 | 43 | 1. Register at with your `@tudelft.nl` email (for an account with more options, TUDelft pays for it) 44 | 1. Start with the template below and discover/try some features. Notice that this won't compile correctly because of the reference on line 26: the file `myreferences.bib` should be in the same folder 45 | 1. copy the content of the second file to a file `myreferences.bib` and add it to the same folder 46 | 1. check this [demo template](https://github.com/tudelft3d/latex-getting-started/tree/main/template) to know the best way to make complex things (tables, code, etc.) 47 | 1. when all this works, try to replicate [this PDF](./files/latex_result.pdf) 48 | 49 | [SOLUTION](./files/latex_result.tex) 50 | 51 | ### A better starting template for simple LaTeX 52 | 53 | ```tex 54 | \documentclass[a4paper,11pt]{scrartcl} 55 | 56 | \usepackage{graphicx} 57 | \usepackage[utf8]{inputenc} %-- pour utiliser des accents en français 58 | \usepackage{amsmath,amssymb,amsthm} 59 | \usepackage[round]{natbib} 60 | \usepackage{url} 61 | \usepackage{mathpazo} 62 | \usepackage{booktabs} 63 | \usepackage{hyperref} 64 | 65 | \title{My great title} 66 | \author{Jan Smit\\ \url{j.smit@tudelft.nl}} 67 | \date{\today} 68 | 69 | \begin{document} 70 | 71 | \maketitle 72 | 73 | \section{Introduction} 74 | 75 | Lemongrass frosted gingerbread bites banana bread orange crumbled lentils sweet potato black bean burrito green pepper springtime. 76 | Strawberry ginger lemongrass agave green tea smoky maple tempeh glaze enchiladas couscous. 77 | Cranberry spritzer Malaysian cinnamon pineapple salsa apples spring cherry bomb bananas blueberry pops scotch bonnet pepper. 78 | 79 | Bento box roasted peanuts pasta Sicilian~\citep{DeVries20}. 80 | 81 | \bibliographystyle{abbrvnat} 82 | \bibliography{references.bib} 83 | 84 | \end{document} 85 | ``` 86 | 87 | ```tex 88 | @article{DeVries20, 89 | author = {De Vries, Piet}, 90 | doi = {10.1016/j.scs.2022.104225}, 91 | journal = {Sustainable Cities and Society}, 92 | pages = {102222}, 93 | title = {Understanding the relationship between urban morphology and other things}, 94 | year = {2021} 95 | } 96 | ``` 97 | 98 | ## Figures 99 | 100 | !!! important 101 | Make sure your figures are **vector** when possible, and __not__ raster. 102 | This will make them of greater quality, especially for text. 103 | 104 | Vector formats: PDF, SVG. 105 | 106 | Raster formats: PNG, JPG, JPEG, GIF. 107 | 108 | ![](https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/Bitmap_VS_SVG.svg/580px-Bitmap_VS_SVG.svg.png){:width="400px"} 109 | 110 | Best vector graphics drawing tools: 111 | 112 | - [Affinity Designer](https://affinity.serif.com/es/designer/full-feature-list/) :simple-apple: :material-microsoft-windows: (€€ but way less than Adobe) 113 | - [Inkscape](https://inkscape.org/en/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 114 | - [IPE](http://ipe.otfried.org/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: (integrates LaTeX text; great for triangulation and geometric stuff) 115 | - Adobe Illustrator :simple-apple: :material-microsoft-windows: (nice, but €€€) 116 | 117 | 118 | ## Tables 119 | 120 | Tables are notoriously difficult to make in LaTeX. 121 | 122 | !!! tip 123 | [LaTeX package booktabs](https://nhigham.com/2019/11/19/better-latex-tables-with-booktabs/) is strongly recommended! 124 | 125 | ```tex 126 | The package \texttt{booktabs} permits you to make nicer tables than the basic ones in \LaTeX. 127 | See for instance \autoref{tab:example}. 128 | 129 | \usepackage{booktabs} 130 | ... 131 | \begin{table} 132 | \centering 133 | \begin{tabular}{@{}lrrcrrc@{}} \toprule 134 | & \multicolumn{2}{c}{3D model} && \multicolumn{2}{c}{input} \\ 135 | \cmidrule{2-3} \cmidrule{5-6} 136 | & solids & faces && vertices & constraints \\ 137 | \toprule 138 | \textbf{campus} & 370 & 4~298 && 5~970 & 3~976 \\ 139 | \textbf{kvz} & 637 & 6~549 && 8~951 & 13~571 \\ 140 | \textbf{engelen} & 1~629 & 15~870 && 23~732 & 15~868 \\ 141 | \bottomrule 142 | \end{tabular} 143 | \caption{Details concerning the datasets used for the experiments.}% 144 | \label{tab:example} 145 | \end{table} 146 | ``` 147 | 148 | 149 | ## Flowcharts 150 | 151 | ![](./img/fc.svg) 152 | 153 | - [draw.io](https://app.diagrams.net) :material-web: (free, simple, all you probably need) 154 | - [OmniGraffle](https://www.omnigroup.com/omnigraffle) :simple-apple: (nice, but €€€) 155 | 156 | 157 | ## Tips and tricks for LaTeX 158 | 159 | :material-download-box-outline: [this simple demo](https://github.com/tudelft3d/latex-getting-started/tree/main/template) gives you tips and tricks to do most of the useful things in LaTeX. 160 | 161 | Use it as the template for submitting your homework for instance. 162 | 163 | !!! info 164 | 165 | LaTeX is great but there are often 37 ways to accomplish something... The simple demo shows you what we think is "the best to do X". 166 | 167 | 168 | ## Which software to use? 169 | 170 | ### Editors (if you don't use Overleaf, or use Git/GitHub to edit your Overleaf project locally) 171 | 172 | - [TeXnicCenter](http://www.texniccenter.org) :material-open-source-initiative: :material-microsoft-windows: 173 | - [TeXStudio](https://www.texstudio.org/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 174 | - [TeXshop](http://pages.uoregon.edu/koch/texshop/) :material-open-source-initiative: :simple-apple: (bundled with MacTeX) 175 | - [Visual Studio Code](https://code.visualstudio.com/) as generic editor with the [LaTeX Workshop plugin](https://github.com/James-Yu/LaTeX-Workshop) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 176 | - [Texmaker](https://www.xm1math.net/texmaker/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 177 | - [Sublime Text](https://www.sublimetext.com) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: (TeX support can be added through [package control](https://packagecontrol.io) with the LaTeXTools package; also with package control you can get a nice linter called SublimeLinter with TeX support through SublimeLinter-chktex) 178 | 179 | !!! info 180 | 181 | For some of these editors, you can also add local grammar/spell checking, e.g. [LTeX](https://marketplace.visualstudio.com/items?itemName=valentjn.vscode-ltex) for Visual Studio Code or [LanguageTool](https://packagecontrol.io/packages/LanguageTool) for Sublime Text. 182 | 183 | ### Managing references 184 | 185 | - [JabRef](http://jabref.sourceforge.net) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 186 | - [Zotero](https://www.zotero.org/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: :material-web: (integrations for Office and browsers; use a plugin like [better bibtex](https://retorque.re/zotero-better-bibtex/)) 187 | 188 | - [BibDesk](https://bibdesk.sourceforge.io) :material-open-source-initiative: :simple-apple: 189 | 190 | ### Drawing figures 191 | 192 | - [IPE](http://ipe.otfried.org/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: (integrates LaTeX text; great for triangulation and geometric stuff) 193 | - [Affinity Designer](https://affinity.serif.com/es/designer/full-feature-list/) :simple-apple: :material-microsoft-windows: (€€ but way less than Adobe) 194 | - [Inkscape](https://inkscape.org/en/) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 195 | - Adobe Illustrator :simple-apple: :material-microsoft-windows:(nice, but €€€) 196 | 197 | ### Drawing flowcharts 198 | 199 | - [MathCha](https://www.mathcha.io/) :material-web: 200 | - [draw.io](https://www.draw.io/) :material-web: 201 | - [OmniGraffle](https://www.omnigroup.com/omnigraffle) :simple-apple: (nice, but €€€) 202 | 203 | ### Equation writers 204 | 205 | - Grapher :simple-apple: (graphical interface to write equations that offers the option to copy them as LaTeX expression) 206 | - LaTeXiT :simple-apple: (utility to write equations in LaTeX and export them for use in other software) 207 | - [Mathpix Snip](https://mathpix.com) :material-web: (many cool things with equations) 208 | 209 | ### Help to make tables 210 | 211 | - [Tables Generator](https://www.tablesgenerator.com/) :material-web: (LaTeX tables are tough to type and align, this helps greatly to start) 212 | -------------------------------------------------------------------------------- /docs/writing/latextogether.md: -------------------------------------------------------------------------------- 1 | 2 | # Writing LaTeX with other people 3 | 4 | !!! note 5 | 6 | This is taken from [*The Rules for happily collaborating on a LaTeX document*©](https://3d.bk.tudelft.nl/hledoux/blog/rules-happy-latex/). 7 | 8 | The 10 rules you should follow if you're writing a LaTeX documents with other people. 9 | 10 | 11 | ### 1. You shall use only one sentence per line 12 | 13 | And use one empty line to start a new paragraph. 14 | It'll then be easier to track changes in Git, since these are line-based. 15 | 16 | ```tex 17 | I like to create buffers in ArcGIS. 18 | But it is not always possible as it often crashes. 19 | 20 | Also, ... 21 | ``` 22 | 23 | 24 | ### 2. You shall use natbib for citations 25 | 26 | and the commands `\citet{}` (cite in the text as a noun) `\citep{}` (cite between parentheses). 27 | 28 | ```tex 29 | \usepackage[round]{natbib} 30 | ... 31 | \citet{Smith00} succeeded in creating a buffer. 32 | However, it has been shown that it is not an easy task~\citep{Brown90}. 33 | ``` 34 | 35 | 36 | ### 3. You shall prevent breaking lines with "~" when referencing and citing 37 | 38 | ```tex 39 | In Section~\ref{sec:intro}, we can observe that the buffer was a success~\citep{Smith99}. 40 | ``` 41 | 42 | 43 | ### 4. You shall use one `-` for an hyphen, two `--` for a range between numbers, and three `---` for a punctuation in a sentence 44 | 45 | ```tex 46 | I like---unlike my father---to build multi-dimensional models, 47 | especially those made in 1990--1995. 48 | ``` 49 | 50 | 51 | ### 5. You shall give meaningful labels 52 | A figure's label should start with `fig:` and a section's label with `sec:` 53 | 54 | ```tex 55 | \section{Introduction} 56 | \label{sec:intro} 57 | 58 | In recent years, buffers have been rather complex to implement because ... 59 | ``` 60 | 61 | 62 | ### 6. You shall put a short space after e.g. and i.e. with the use of a backslash 63 | 64 | The following two commands shall thus be used: 65 | 66 | ```tex 67 | \newcommand{\ie}{i.e.} 68 | \newcommand{\eg}{e.g.} 69 | ... 70 | Buffers can be generated on different geometries, \eg\ points, polylines and polygons. 71 | ``` 72 | 73 | 74 | ### 7. You shall put all figures/graphs in a single subfolder (`figs/`) 75 | 76 | And you shall put the source file (eg [IPE](http://ipe7.sourceforge.net), OmniGraffle, Illustrator, etc.) there as well for future use. 77 | 78 | You can then use this to specify the relative path for all figures (it refers to the figure `./figs/potato.pdf`): 79 | 80 | ```tex 81 | \graphicspath{{figs/}} 82 | 83 | \includegraphics[width=0.95\linewidth]{potato.pdf} 84 | ``` 85 | 86 | ### 8. In your BibTeX file, you shall use curly brackets for words/letters you want to have capitalised in the title 87 | 88 | The other fields are not affected by this. LaTeX does this to uniformise the capitalisation in all citations. 89 | 90 | ```tex 91 | @article{Smith00, 92 | Author = {Smith, John}, 93 | Journal = {The GIS Journal}, 94 | Title = {The {3D} {CityGML} building was constructed with the {Delaunay} triangulation}, 95 | Year = {2001}, 96 | ... 97 | } 98 | ``` 99 | 100 | 101 | ### 9. You shall not add any commands to change the format until the the paper is finished 102 | 103 | `\vspace` and `\newpage` are thus forbidden. 104 | 105 | 106 | ### 10. You shall declare all sizes relative to `\linewidth`. 107 | 108 | So that the paper can be switched to a 2-column one without (too much) pain. 109 | 110 | ```tex 111 | \includegraphics[width=0.95\linewidth]{potato.pdf} 112 | ``` 113 | -------------------------------------------------------------------------------- /docs/writing/markdown.md: -------------------------------------------------------------------------------- 1 | 2 | # Markdown 3 | 4 | [Markdown](https://www.markdownguide.org/) is a simple and easy-to-read language for formatting plain text. 5 | 6 | It is widely used to write documentation and research papers (eg see [R Markdown](https://rmarkdown.rstudio.com/)), GitHub uses it as the default for README files, and many websites are written in Markdown (before being automatically converted to HTML). 7 | 8 | The geogeeks website is written in Markdown, see [the source of this page](https://github.com/tudelft3d/geogeeks/edit/main/docs/writing/markdown.md)! 9 | 10 | 11 | ## Getting started 12 | 13 | !!! external-link "Markdown Guide Getting Started" 14 | 15 | [Arguably the best cheat sheet!](https://www.markdownguide.org/cheat-sheet/) 16 | 17 | [markdown-cheat-sheet.md](https://www.markdownguide.org/assets/markdown-cheat-sheet.md) 18 | 19 | 20 | ## Markdown: basic + extended versions 21 | 22 | The [original Markdown](https://daringfireball.net/projects/markdown/) is rather limited, but it has been extended by several to add more complex features (like tables, code-blocks, or [admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)). 23 | 24 | Watch out, it's a bit the far-west out there: some processors might not be able to parse your flavour of Markdown correctly!? 25 | 26 | !!! external-link "GitHub Flavoured Markdown" 27 | GitHub offers an useful overview of the features they added for their extended version called "[GitHub Flavoured Markdown (GFM)](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting)". 28 | 29 | 30 | ## Test yourself with an exercise 31 | 32 | - exercise #1: [HTML page to replicate](./files/md_result.html) (use PyCharm) 33 | - exercise #2: convert your .md file to a PDF with [Pandoc](https://pandoc.org/) 34 | 35 | [SOLUTION TO #1](./files/md_result.md.txt) 36 | 37 | 38 | 39 | ## Software to process Markdown 40 | 41 | - PyCharm/CLion will preview automatically any Markdown files 42 | - any file `.md` pushed to GitHub will be rendered automatically 43 | - [dillinger.io: a handy web-preview tool](https://dillinger.io/) 44 | - [Exhaustive list of processors](https://github.com/markdown/markdown.github.com/wiki/Implementations) 45 | 46 | -------------------------------------------------------------------------------- /docs/writing/references.md: -------------------------------------------------------------------------------- 1 | 2 | # References (BibTeX) 3 | 4 | 5 | The [BibTeX](https://en.wikipedia.org/wiki/BibTeX) format is what [LaTeX](latex.md) and [Typst](typst.md) use managing references. It is simple, and just works; we recommend you use it. 6 | 7 | Manually editing your `.bib` is probably a bad idea, so we suggest you use a GUI that will help you create the entries and search your database. 8 | 9 | 10 | ## Software to manage references 11 | 12 | * [JabRef](http://jabref.sourceforge.net) :material-open-source-initiative: :simple-linux: :simple-apple: :material-microsoft-windows: 13 | * [Zotero](https://www.zotero.org/) :material-web: (integrations for Office and browsers; use a plugin like [better bibtex](https://retorque.re/zotero-better-bibtex/)) 14 | * [Mendeley](https://www.mendeley.com/) :simple-linux: :simple-apple: :material-microsoft-windows: (integrations for Office and browsers; integrates with Overleaf professional accounts) 15 | * [BibDesk](https://bibdesk.sourceforge.io) :material-open-source-initiative: :simple-apple: 16 | 17 | !!! warning 18 | BibTeX will capitalise the titles automatically according to the [bibliography style (`*.bib`)](https://www.overleaf.com/learn/latex/Bibtex_bibliography_styles) you choose. 19 | This can be problematic for acronyms and many words (eg GIS, CityJSON, 3D, Delft Univeristy of Technology, etc.). 20 | You can control the capitalisation of those words by adding curly-brackets around those words, like in the following: 21 | ```tex 22 | @article{Guth21, 23 | author = {Elvis Presley and Tera M. Smith}, 24 | title = {Point cloud and {ICESat-2} evaluation of {3D} datasets in {Delft}}, 25 | journal = {Transactions in {GIS}}, 26 | number = {2}, 27 | pages = {245--261}, 28 | volume = {15}, 29 | year = {2011} 30 | } 31 | ``` 32 | 33 | ## How to obtain well-formatted BibTeX entries? 34 | 35 | 36 | 37 | ### Option #1: Paste a DOI 38 | 39 | With BibDesk (and probably others) you can simply copy the [DOI](https://www.scribbr.com/citing-sources/what-is-a-doi/) and a new entry nicely formatted will be created (might need minimal manual work). 40 | 41 | ### Option #2: Use www.doi2bib.org 42 | 43 | You could alternatively use [www.doi2bib.org](https://www.doi2bib.org) to obtain nicely formatted BibTeX entries. 44 | 45 | ### Option #3: Use ChatGPT 46 | 47 | ChatGPT can also take the text of a reference in a PDF and BibTeX format it, see a simple example: 48 | 49 | ![](img/chatgpt.png) -------------------------------------------------------------------------------- /docs/writing/typst.md: -------------------------------------------------------------------------------- 1 | # Typst 2 | 3 | Typst is the "new LaTeX": simpler to learn, simpler to modify the layout, about 9423.6X faster. 4 | But also, at the moment, has fewer features, can be a bit buggy, the base code changes often (which can break some functions), etc. 5 | 6 | So great to use, but be warned a bit... 7 | 8 | 9 | ## Typst installation 10 | 11 | 12 | ### Web-application: Typst.app 13 | 14 | The [web-application of Typst](https://typst.app/) is free, the rending in real-time works great, and it has collaboration tools integrated. 15 | The only potential drawback is that not all fonts are present; with a local installation you can use any fonts on your computer. 16 | 17 | [![](./img/typst.png)](https://typst.app) 18 | 19 | 20 | ### Local installation 21 | 22 | 1. [Follow those instructions for your OS](https://github.com/typst/typst?tab=readme-ov-file#installation) 23 | 2. Install [VSCode](https://code.visualstudio.com/) 24 | 3. and the [Tinymist extension](https://marketplace.visualstudio.com/items?itemName=myriad-dreamin.tinymist) for it, it offers real-time preview/rendering 25 | 26 | ![](./img/vscode.png) 27 | 28 | 29 | ## Getting started 30 | 31 | !!! external-link "Tutorial Writing in Typst" 32 | 33 | The best is to follow the [official tutorial](https://typst.app/docs/tutorial/writing-in-typst/) to start. 34 | 35 | The only crucial thing missing from it is how to add references, for this we suggest you use "natbib" ([tutorial about bibliography management with natbib](https://www.overleaf.com/learn/latex/Bibliography_management_with_natbib)). 36 | 37 | 38 | We provide a MSc Geomatics thesis template, where you can find a lot of examples: how to place a figure, pseudo-code, tables, etc. 39 | 40 | !!! info "Are you already familiar with LaTeX?" 41 | 42 | If you're used to LaTeX, see the handy [Guide for LaTeX users](https://typst.app/docs/guides/guide-for-latex-users/). 43 | 44 | ## Managing references 45 | 46 | As with LaTeX, BibTeX can be used. 47 | This is a good cross-platform one: 48 | 49 | * [JabRef](http://jabref.sourceforge.net) (cross-platform) 50 | 51 | 52 | ### Drawing figures 53 | 54 | * [IPE](http://ipe.otfried.org/) (cross-platform; integrates LaTeX text; great for triangulation and geometric stuff) 55 | * Adobe Illustrator (nice, but €€€) 56 | * [Inkscape](https://inkscape.org/en/) (cross-platform) 57 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | 2 | site_name: geogeeks 3 | 4 | theme: 5 | custom_dir: overrides #-- to override the copyright 6 | features: 7 | - content.action.edit 8 | # Links content tabs. If user selects MacOS on one page, tabs on other pages will also be set MacOS 9 | - content.tabs.link 10 | - navigation.tabs 11 | - navigation.top 12 | # Add copy button to code blocks 13 | - content.code.copy 14 | # Enable annotations inside code blocks 15 | - content.code.annotate 16 | # - navigation.footer 17 | - navigation.indexes 18 | # - navigation.sections 19 | # - navigation.tabs 20 | # - navigation.top 21 | # - navigation.tracking 22 | icon: 23 | logo: material/console 24 | edit: material/pencil 25 | view: material/eye 26 | name: material 27 | palette: 28 | primary: deep purple 29 | # primary: custom 30 | 31 | site_url: https://tudelft3d.github.io/geogeeks/ 32 | repo_url: https://github.com/tudelft3d/geogeeks 33 | edit_uri: edit/main/docs/ 34 | repo_name: tudelft3d/geogeeks 35 | 36 | extra_css: 37 | - stylesheets/extra.css 38 | 39 | extra_javascript: 40 | - js/extra.js 41 | 42 | plugins: 43 | - search 44 | - awesome-pages 45 | # - mkdocstrings 46 | 47 | nav: 48 | - "Home": 49 | - index.md 50 | - contribute.md 51 | - Computer & Software: 52 | - computer/perfectsetup.md 53 | - computer/filesystem.md 54 | - computer/terminal.md 55 | - computer/packagemanager.md 56 | - computer/bestsoftware.md 57 | - Programming: 58 | - programming/chooselanguage.md 59 | - programming/collabcode.md 60 | - programming/debugging.md 61 | - Python: 62 | - python/index.md 63 | - python/install.md 64 | - python/pip.md 65 | - python/pypackages.md 66 | - python/venv.md 67 | - python/jupyter.md 68 | - C++: 69 | - cpp/install.md 70 | - cpp/cmake.md 71 | - cpp/installlibs.md 72 | - cpp/python2cpp.md 73 | - cpp/xcode.md 74 | - cpp/wslclion.md 75 | - cpp/vcpkgwindows.md 76 | - Linux: 77 | - linux/index.md 78 | - linux/intro.md 79 | - linux/virtualbox.md 80 | - linux/ssh.md 81 | - linux/wsl.md 82 | - Git: 83 | - git/index.md 84 | - git/gitintro.md 85 | - git/install.md 86 | - git/goodgit.md 87 | - git/githubactions.md 88 | - Research: 89 | - research/researchtips.md 90 | - research/msccode.md 91 | - Writing: 92 | - writing/index.md 93 | - writing/markdown.md 94 | - writing/latex.md 95 | - writing/typst.md 96 | - writing/references.md 97 | - writing/latextogether.md 98 | - Misc: 99 | - misc/delftblue.md 100 | 101 | 102 | 103 | markdown_extensions: 104 | - footnotes 105 | - admonition 106 | - pymdownx.betterem 107 | - pymdownx.details 108 | - pymdownx.superfences 109 | - attr_list 110 | - md_in_html 111 | - toc: 112 | permalink: true # Add permalink symbol to end of headers 113 | - def_list # Ordered and unordered lists 114 | - pymdownx.emoji: 115 | emoji_index: !!python/name:material.extensions.emoji.twemoji 116 | emoji_generator: !!python/name:material.extensions.emoji.to_svg 117 | - pymdownx.highlight: 118 | anchor_linenums: true 119 | - pymdownx.inlinehilite 120 | - pymdownx.snippets 121 | - pymdownx.superfences 122 | - pymdownx.tasklist: 123 | custom_checkbox: true 124 | clickable_checkbox: true 125 | # Content tabs (buttons to show different text based on selected tab) 126 | - pymdownx.superfences 127 | - pymdownx.tabbed: 128 | alternate_style: true 129 | - pymdownx.keys # Keyboard keys shortcuts -------------------------------------------------------------------------------- /overrides/partials/copyright.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /overrides/partials/footer.html: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | # PEP 621 dependencies declaration 2 | # adapt to your dependencies manager 3 | [project] 4 | dependencies = [ 5 | "mkdocstrings[python]>=0.18", 6 | ] 7 | --------------------------------------------------------------------------------