https://github.com/murraylab/alienartifactslearningtask
Django code for the alien artificats task
https://github.com/murraylab/alienartifactslearningtask
Last synced: 3 days ago
JSON representation
Django code for the alien artificats task
- Host: GitHub
- URL: https://github.com/murraylab/alienartifactslearningtask
- Owner: murraylab
- License: mit
- Created: 2022-07-18T21:12:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-09T13:35:39.000Z (over 3 years ago)
- Last Synced: 2025-10-28T10:27:57.142Z (8 months ago)
- Language: Python
- Size: 3.7 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Alien Artifacts Learning Task
By Warren Woodrich Pettine, July 2022
This code runs the tasks used in "Pettine, W. W., Raman, D. V., Redish, A. D., Murray, J. D.
“Human generalization of internal representations through prototype learning with goal-directed attention,” March 2023, Nature Human Behavior.
https://www.nature.com/articles/s41562-023-01543-7
When collecting data for that paper, the task webapp and associated database were hosted on Microsoft Azure. If you prefer to host on another service, the structure of several components will likely need to be modified.
Provided everything is installed correctly, the app should be able to run locally. When you are considering hosting it remote, make sure to update the Google recaptcha variables `GOOGLE_RECAPTCHA_SITE_KEY` and `GOOGLE_RECAPTCHA_SECRET_KEY`.
If you have questions about the implementation, please contact Warren at warren.pettine@gmail.com.
## Django and PostgreSQL sample for Azure App Service
The code is based on a is a sample application available via the tutorial at:
[Build a Python and PostgreSQL web app in Azure App Service](https://docs.microsoft.com/azure/app-service/containers/tutorial-python-postgresql-app).
The sample is a simple Python Django application that connects to a PostgreSQL database.
The database connection information is specified via environment variables `DBHOST`, `DBPASS`, `DBUSER`, and `DBNAME`. This app always uses the default PostgreSQL port.
The `DBHOST` environment variable is expected to contain *only* the server name, not the full URL, which is constructed at run time (see azuresite/production.py). Similarly, `DBUSER` is expected to contain only the user name, not username@servername as before, because using the simpler `DBHOST` the code can also construct the correct login form at run time (again in azuresite/production.py), avoiding failures that arise when `DBUSER` lacks the @servername portion.
The storage container keys are specified in backend/custom_azure.py.
# Contributing
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.