Skip to content

Commit 44e6528

Browse files
authored
Merge pull request #1 from awebb-nz/main
Made some small changes to the README etc. for setup
2 parents cde28cf + 3eabd4e commit 44e6528

File tree

3 files changed

+236
-5
lines changed

3 files changed

+236
-5
lines changed

.gitignore

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
## PYTHON IGNORES (from github/gitignore/python.gitignore)
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
share/python-wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
*.py,cover
52+
.hypothesis/
53+
.pytest_cache/
54+
cover/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# poetry
100+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101+
# This is especially recommended for binary packages to ensure reproducibility, and is more
102+
# commonly ignored for libraries.
103+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104+
#poetry.lock
105+
106+
# pdm
107+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108+
#pdm.lock
109+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110+
# in version control.
111+
# https://pdm.fming.dev/#use-with-ide
112+
.pdm.toml
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
.venv
127+
env/
128+
venv/
129+
ENV/
130+
env.bak/
131+
venv.bak/
132+
133+
# Spyder project settings
134+
.spyderproject
135+
.spyproject
136+
137+
# Rope project settings
138+
.ropeproject
139+
140+
# mkdocs documentation
141+
/site
142+
143+
# mypy
144+
.mypy_cache/
145+
.dmypy.json
146+
dmypy.json
147+
148+
# Pyre type checker
149+
.pyre/
150+
151+
# pytype static type analyzer
152+
.pytype/
153+
154+
# Cython debug symbols
155+
cython_debug/
156+
157+
# PyCharm
158+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160+
# and can be added to the global gitignore or merged into this file. For a more nuclear
161+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162+
#.idea/
163+
164+
## R IGNORES (from github/gitignore/R.gitignore)
165+
166+
# History files
167+
.Rhistory
168+
.Rapp.history
169+
170+
# Session Data files
171+
.RData
172+
.RDataTmp
173+
174+
# User-specific files
175+
.Ruserdata
176+
177+
# Example code in package build process
178+
*-Ex.R
179+
180+
# Output files from R CMD build
181+
/*.tar.gz
182+
183+
# Output files from R CMD check
184+
/*.Rcheck/
185+
186+
# RStudio files
187+
.Rproj.user/
188+
189+
# produced vignettes
190+
vignettes/*.html
191+
vignettes/*.pdf
192+
193+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
194+
.httr-oauth
195+
196+
# knitr and R markdown default cache directories
197+
*_cache/
198+
/cache/
199+
200+
# Temporary files created by R markdown
201+
*.utf8.md
202+
*.knit.md
203+
204+
# R Environment Variables
205+
.Renviron
206+
207+
# pkgdown site
208+
docs/
209+
210+
# translation temp files
211+
po/*~
212+
213+
# RStudio Connect folder
214+
rsconnect/

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,31 @@ We recommend setting up a python virtual environment and installing all the requ
3131
git clone https://github.com/surabhisnath/Relating_ObjectiveComplexity_SubjectiveComplexity_Beauty_BinaryPixelPatterns.git
3232
cd Relating_ObjectiveComplexity_SubjectiveComplexity_Beauty_BinaryPixelPatterns
3333

34-
python3 -m venv ./env
34+
python3 -m venv .env
35+
36+
# On macOS/Linux
3537
source env/bin/activate
38+
# On Windows
39+
.env\Scripts\activate
3640

37-
pip install -r requirements.txt`
41+
pip install -r requirements.txt
3842
```
3943

40-
To reproduce the plots and results from the paper, simply run `DescriptiveAnalysis.ipynb` and `MixedEffectsModelling.R`.
44+
To reproduce the plots from the paper, run
45+
```bash
46+
jupyter-lab
47+
```
48+
and open the file `scripts/DescriptiveAnalysis.ipynb`.
49+
50+
To reproduce the model fits from the paper
51+
- Ensure you have a working R installation
52+
- Install the required libraries
53+
- *E.g.*, `install.packages(c("lme4", "ggplot2", "interactions", "dplyr", "mediation"))` from an R console
54+
- Run `MixedEffectsModelling.R`
55+
```R
56+
setwd('/path/to/Relating_ObjectiveComplexity_SubjectiveComplexity_Beauty_BinaryPixelPatterns/scripts')
57+
source("MixedEffectsModelling.R")
58+
```
4159

4260
## Citation
4361

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ imageio==2.19.3
22
matplotlib==3.5.2
33
numpy==1.21.5
44
pybdm==0.1.0
5-
re
65
pandas
76
statsmodels
87
seaborn
98
scipy
10-
pickle
9+
jupyterlab

0 commit comments

Comments
 (0)