Using Django
Using Django Create a project: django-admin startproject myproject cd myproject python manage.py startapp myapp Run development server: cd myproject python manage.py runserver
Using Django Create a project: django-admin startproject myproject cd myproject python manage.py startapp myapp Run development server: cd myproject python manage.py runserver
Calculating p-values Use an independent t-test where x and y are the same measures but the subjects are different. Use a paired t-test where x and y are the same measures and the subjects are the ...
Installing pipenv pip install pipenv Ref. Creating a virtual environment Using the current Python version: pipenv install --dev Using a specific Python version: pipenv install --python "C:\Pro...
When running scripts, PYTHONPATH is set to the parent directory of the executed script. Import statements that include the full path from the project root (absolute imports - e.g. import mypackage...
Magic commands are flagged as errors in VSCode by Pylance as they are not Python. Setting "jupyter.interactiveWindow.textEditor.magicCommandsAsComments": true and prefacing commands with # ! means...
A simple query can be constructed as follows: import os from sqlalchemy import MetaData, select, Table import ds_utils.database_operations as dbo # CONNECT TO DATABASE engine = dbo.connect_sql_...
pandas pd.read_sql()/pd.read_sql_query() Parameters are supplied in a different format depending on the database driver being used. pyodbc doesn’t support named parameters - parameters instead hav...
If using st.navigation to manage creation of the navigation, as of version 1.44.0 there is no way of hiding individual pages from the navigation. This can be done by including code such as the fol...
At the time of writing, the version of the ODBC Driver for SQL Server available in Streamlit Community Cloud is version 17. This is pre-installed in Streamlit Community Cloud so it isn’t necessary...
Hyperlinks can be added to columns in AG Grid as in the following script: class UrlCellRenderer { init(params) { this.eGui = document.createElement("a"); this.eGui.innerText = "...