Many projects in the lab are heavily code-based.
Might there be a dataset or a tool out there that does what you need? Check out this list of lists.
Learning resources
General resources and instructions to getting started
- Download and install Anaconda
- Download and install git. See here for an excellent instroduction.
- Download and install VSCode, including the AutoPilot and Remote extensions (the latter for working on the ALICE cluster)
- Continue to setup your environment for analyzing IBL data (and select
iblenvas your interpreter in VSCode)
Python and data analysis references
- Know your way around the command line
- Understand what a virtual environment is
- Understand Git and GitHub
- GitLectures
- Git primer by Brad Voytek
- Even better Git intro
- Further practice: pull this wiki repo, add something in the Markdown language, and submit a pull request (see Home for instructions on how to contribute to the wiki).
- Learn the basics of Python
- DataCamp has very good adaptive programming courses. Sign up with your @umail.leidenuniv.nl address using the link for free access.
- Lab in cognition & perception, both by Todd Gureckis.
- Students at Leiden University can follow the Introduction to Python course, offered by LIACS.
- You can also access DataCamp learning resources with your Leiden Uni account.
- Think about the structure of data
- The structure of data, by Todd Gureckis
- Learn to work with the pandas and seaborn packages for data handling and visualization.
- Pandas tutor with helpful dataviz.
- Once your code runs, make it better!
- The Good Research Code Handbook is a fantastic guide to write elegant, organized code that doesn’t make you want to tear your hair out. Highly recommended.
- Dan Larremore’s lab guides to clean code
- Consider code review
SSH setup (locally)
- Pin the Anaconda Prompt to the Start bar, right-click on Properties, and change
%HOMEPATHto the path where your code lives (e.g.C:\Users\username\Documents\code\). - Connect your GitHub repo with SSH. Note: the university’s Dell machines have a habit of looking for ssh keys in the P-Drive
/p//.ssh/, whereas you probably want to keep your keys in/c//Users//username//.ssh. To change where SSH looks for keys, add an environment variable calledHOME, and set it toC:\Users\username. Runningssh-keygenas a test, it should then prompt you to save your keys on the C-drive. If you’ve already created your ssh keys and they are on the P-drive, simply move them. - MobaXTerm is your best bet for using ssh on Windows (for transferring data).
Computing resources
For most projects (especially those using behavioral data), your laptop will be more than sufficient to run Python. If you need more heavy lifting, we use the ALICE supercomputer @ Leiden Uni.
- Get an account (see special form for FSW users) and include a request to be added to the
data_pi-uraiaeproject space (for IBL data).
ALICE setup
- See here to connect using ssh, and here for Windows-specific instructions with custom keynames.
- Warning: your home directory only has 15GB of space. This fills up quickly if you install your conda environments there (just
iblenvis 2.5GB!). So before you create your first conda env, runmkdir ~/data1/.conda; ln -fs data1/.conda. Keep only code in your home directory, and everything else (data, figures) in the lab’s shared project space or your own data folder. - It’s helpful to use the VSCode Remote Mode for development and debugging (to avoid a Git commit history full of 1-typo fixes as you’re getting your local code to now run on ALICE). See here for instructions.