Setting .gitignore exceptions
Putting an exclamation mark before a filename excludes that file from being ignored. !file1.py But where an entire directory is being ignored, this exclusion won’t work. I.e. for: my-app/ └──...
Putting an exclamation mark before a filename excludes that file from being ignored. !file1.py But where an entire directory is being ignored, this exclusion won’t work. I.e. for: my-app/ └──...
Create virtual environment named env inside current directory: python -m venv env Create virtual environment named env inside current directory using a specific version of Python: python -3.13 -m ...
distutils requires Microsoft C++ Build Tools. When installing this, only the first option needs to be selected (desktop development, C++ developement tools (or similar naming)).
Converting warnings of a particular category from a particular module can be done using: import warnings warnings.filterwarnings("error", category=UserWarning, module="seaborn") (Ref.)
When doing memory-intensive operations in VSCode - e.g. working with large pandas dataframes - the kernel can crash with the following error: The kernel crashed while executing code in the current...
Attempting to upload large dataframes can result in the following error: PendingRollbackError: Can't reconnect until invalid transaction is rolled back. Please rollback() fully before proceeding ...
Images can be inserted using:  Ref. Spaces need to be URL-encoded in GitHub Markdown. Spaces are encoded as %20%.
Both when developing locally and when an app is deployed on a non-Azure service (e.g. on Streamlit), authenticating an app using an application service principal is an option. In fact, this is the ...
Run the code snippet from this page in a bash terminal. NB: GitHub Codespaces using Ubuntu by default NB: In VS Code this should be pasted in as 24 lines of code, rather than a single line
Installing pre-commit: pip install pre-commit Initialising pre-commit (needs to be run within a directory containing a .git folder): pre-commit install Running pre-commit hooks on a specific file...