| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| other:python:misc_by_jyp [2024/11/04 15:01] – [Extra tutorials] Added links to ruff and flake8 jypeter | other:python:misc_by_jyp [2025/10/31 11:28] (current) – [Using a decorator to log function calls] jypeter |
|---|
| Only **when you have already read all the content of this page several times**, and you are looking for new ideas | Only **when you have already read all the content of this page several times**, and you are looking for new ideas |
| |
| | * [[https://medium.com/data-science/calculating-distance-between-two-geolocations-in-python-26ad3afe287b|Calculating distance between two geo-locations in Python]]: |
| | * ''[[https://github.com/mapado/haversine|haversine]]'', ''[[https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.haversine_distances.html|haversine_distances]] @ scikit-learn'' and [[https://en.wikipedia.org/wiki/Haversine_formula|Haversine formula]] |
| | * Looking at table data with ''pandas'' |
| | * [[https://blog.devgenius.io/data-profiling-in-python-common-ways-to-explore-your-data-part-1-0efd0dedff75|Summary information]] |
| | * [[https://blog.devgenius.io/data-profiling-in-python-common-ways-to-explore-your-data-part-2-396384522e91|More detailed information]] |
| | * [[https://blog.devgenius.io/data-cleansing-in-python-common-ways-to-clean-your-data-3459a256dd85|Table data cleaning]] |
| | * Stats stuff |
| | * [[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://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]] |
| </code> | </code> |
| |
| | ===== Debugging... ===== |
| | |
| | Some resources that you can use in the unlikely case that <del>you</del> some AI has introduced <del>features</del> bugs in your code |
| | |
| | ==== Built-in tools ==== |
| | |
| | Read the documentation of: |
| | * [[https://docs.python.org/3/library/pdb.html|pdb, The Python Debugger]] |
| | * and the other built-in [[https://docs.python.org/3/library/debug.html|Debugging and Profiling tools]] |
| | |
| | ==== Using a decorator to log function calls ==== |
| | |
| | Check the example in [[https://blog.devgenius.io/my-lazy-secret-to-cleaner-code-python-decorators-d43d673a1ba2|My Lazy Secret to Cleaner Code: Python Decorators]] |
| | |
| | Note: more about [[#using_log_files_aka_logging|using log files]] |
| |
| /* | /* |