User Tools

Site Tools


other:python:misc_by_jyp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
other:python:misc_by_jyp [2026/02/11 10:26] – [String formatting] Added link to 7 f-string tricks jypeterother:python:misc_by_jyp [2026/11/05 16:59] (current) – Added the "web forms" section jypeter
Line 18: Line 18:
     * [[https://medium.com/@tubelwj/python-outlier-detection-iqr-method-and-z-score-implementation-8e825edf4b32|Python Outlier Detection: IQR Method and Z-score Implementation]]     * [[https://medium.com/@tubelwj/python-outlier-detection-iqr-method-and-z-score-implementation-8e825edf4b32|Python Outlier Detection: IQR Method and Z-score Implementation]]
   * [[https://medium.com/pythons-gurus/clean-code-in-python-good-vs-bad-practices-examples-2df344bddacc|Clean Code in Python: Good vs. Bad Practices Examples]]   * [[https://medium.com/pythons-gurus/clean-code-in-python-good-vs-bad-practices-examples-2df344bddacc|Clean Code in Python: Good vs. Bad Practices Examples]]
 +  * [[https://medium.com/javarevisited/10-popular-clean-code-practices-that-do-more-harm-than-good-5ddcf7db90f8|10 Popular Clean Code Practices That Do More Harm Than Good]]
   * [[https://peps.python.org/pep-0008/|PEP 8 – Style Guide for Python Code]]   * [[https://peps.python.org/pep-0008/|PEP 8 – Style Guide for Python Code]]
     * [[https://realpython.com/python-pep8/|How to Write Beautiful Python Code With PEP 8]]     * [[https://realpython.com/python-pep8/|How to Write Beautiful Python Code With PEP 8]]
Line 24: Line 25:
   * [[https://medium.com/@yaduvanshineelam09/ultimate-python-cheat-sheet-practical-python-for-everyday-tasks-8a33abc0892f|Ultimate Python Cheat Sheet: Practical Python For Everyday Tasks]]   * [[https://medium.com/@yaduvanshineelam09/ultimate-python-cheat-sheet-practical-python-for-everyday-tasks-8a33abc0892f|Ultimate Python Cheat Sheet: Practical Python For Everyday Tasks]]
   * [[https://medium.com/pythoneers/16-hacks-that-will-take-your-python-skills-to-the-next-level-12e7a9b97421|16 Hacks That Will Take Your Python Skills to the Next Level]]   * [[https://medium.com/pythoneers/16-hacks-that-will-take-your-python-skills-to-the-next-level-12e7a9b97421|16 Hacks That Will Take Your Python Skills to the Next Level]]
 +  * [[https://python.plainenglish.io/a-practical-guide-to-python-enum-for-developers-5b6440e90da7|A Practical Guide to Python Enum for Developers]]
   * [[https://levelup.gitconnected.com/modular-coding-in-python-finally-solve-your-import-errors-af2fd172fcf7|Modular Coding in Python: Finally Solve your Import Errors]] (understanding and fixing ModuleNotFoundError and ImportError)   * [[https://levelup.gitconnected.com/modular-coding-in-python-finally-solve-your-import-errors-af2fd172fcf7|Modular Coding in Python: Finally Solve your Import Errors]] (understanding and fixing ModuleNotFoundError and ImportError)
   * [[https://medium.com/@moraneus/understanding-multithreading-and-multiprocessing-in-python-1ed39bb078d5|Understanding Multithreading and Multiprocessing in Python]]   * [[https://medium.com/@moraneus/understanding-multithreading-and-multiprocessing-in-python-1ed39bb078d5|Understanding Multithreading and Multiprocessing in Python]]
Line 182: Line 184:
     * [[https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module|Matching pathlib, and os or os.path functions]]     * [[https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module|Matching pathlib, and os or os.path functions]]
   * [[https://docs.python.org/3/library/shutil.html|shutil]]: High-level file operations, e.g copy/move a file or directory tree   * [[https://docs.python.org/3/library/shutil.html|shutil]]: High-level file operations, e.g copy/move a file or directory tree
 +  * [[https://platformdirs.readthedocs.io/|platformdirs]]: a Python library for determining platform-specific system directories (resolves the correct location for macOS, Windows, Linux/Unix, and Android)
  
  
Line 644: Line 647:
   * [[https://matplotlib.org/stable/gallery/text_labels_and_annotations/date.html|Date tick labels example]]   * [[https://matplotlib.org/stable/gallery/text_labels_and_annotations/date.html|Date tick labels example]]
  
 +===== Raster data and GIS stuff =====
  
 +Check the [[other:python:python:grid_proj|Dealing with grids and projections in Python]] page
 ===== Data representation ===== ===== Data representation =====
  
 A few notes for a future section or page about about //data representation// (bits and bytes) on disk and in memory, vs //data format// A few notes for a future section or page about about //data representation// (bits and bytes) on disk and in memory, vs //data format//
  
-FIXME Add parts (pages 28 to 37) of this [[http://www.lsce.ipsl.fr/Phocea/file.php?class=page&file=5/pythonCDAT_jyp_2sur2_070306.pdf|old tutorial]] to this section+FIXME Add parts (pages 28 to 37) of this {{:other:python:pythoncdat_jyp_2sur2_070306.pdf|old tutorial}} to this section
  
 ==== Base notions ==== ==== Base notions ====
Line 810: Line 815:
  
   * Getting the binary representation of a string   * Getting the binary representation of a string
-    * <code>>>> test_string = 'A B 0 1 à µ'+    * <code python>>>> test_string = 'A B 0 1 à µ'
 >>> type(test_string) >>> type(test_string)
 <class 'str'> <class 'str'>
Line 841: Line 846:
  
 Note: more about [[#using_log_files_aka_logging|using log files]] Note: more about [[#using_log_files_aka_logging|using log files]]
 +
 +
 +===== web stuff =====
 +
 +==== Filling forms with python ====
 +
 +  * [[https://www.scaler.com/topics/cyber-security/attack-webforms-beautifulsoup-requests-python/|Attack Webforms with Beautifulsoup and Requests in Python]]
 +  * [[https://scrapeops.io/python-web-scraping-playbook/python-requests-how-to-submit-forms/|How To Submit Forms With Python Requests]]
  
 /* /*
other/python/misc_by_jyp.1770801974.txt.gz · Last modified: by jypeter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki