- Orientation
- Course setup and Python basics
- Beyond the basics
- Find your inner hacker
- External libraries
- Collecting data
- Interrogating your data
- Models
- Natural language processing
- Timeseries analysis
- Advanced topics
Start here! The materials for each module below are organized sequentially. Work your way from module to module (and from top to bottom within each module). The recorded lectures (in bold) typically cover preceding material (after the previous lecture, within the same module). Take notes on questions, comments, concerns, etc. so that you can bring them up for discussion during our synchronous class meetings or in the Discord workspace. Several items are marked as optional; they may be skipped if desired, but they are included for students who wish to gain additional exposure to the material.
- Welcome message
- Lecture 1 recording (W21): orientation, overview, and "the sandwich exercise"
- Fostering a programming mindset
- Introduction and Overview
- Introduction to Jupyter Notebooks and Python
- Lecture 2 recording (W21): variables, operators, datatypes, functions, if/elif/else statements, for and while loops
- Lecture 3 recording (W21): libraries, practice "string manipulation" problems
- Assignment 1: Hello, world! [Accept assignment]
- Interactive programs
- Control flow and order of operations
- Lecture 4 recording (W21): interactive programs, control flow, exceptions and warnings
- Dictionaries and classes
- Writing Pythonic code: list comprehensions, generators, and iterators
- Lecture 5 recording (W21): assert statements, dictionaries, sets, classes, and list comprehensions
- Lecture 6 recording (W21): dictionary and set comprehensions, generators, and iterators
- Variable scope and passing by value versus by reference
- Lecture 7 recording (W21): variable scope, passing by value versus by reference
- Assignment 2: Chess puzzle solver [Accept assignment]
- Recursion (Source: Hany Farid's Learn to Code in Python course):
- Whirlwind tour of searching, sorting, and data structures (Source: Hany Farid's Learn to Code in Python course):
- Linear and binary search
- Sorting (optional):
- Data structures (optional):
- Linked lists (note: you may find it useful to view this video first)
- Doubly linked lists
- Hashing (note: you may find it useful to view this video first)
- Graphs:
- Queues and stacks
- Lecture 8 recording (W21): coding exercise on recursion, sorting, and linked lists
- Lecture 9 recording (W21): applications of data structures and algorithms, building an English to Pig Latin translator
- Lambda functions (Source: realpython.com)
- Map, filter, reduce (Source: learnpython.org)
- Decorators (Source: realpython.com)
- Debugging in Google Colaboratory (Source: Python Data Science Handbook by Jake VanderPlas)
- Unit tests (Source: realpython.com)
- Optimizing your code (Source: towardsdatascience)
- Writing maintainable and shareable code (Source: towardsdatascience)
- Lecture 10 recording (W21): assignment 3 Q&A (part 1), lambda functions
- Lecture 11 recording (W21): assignment 3 Q&A (part 2), advanced applications of lambda functions, decorators
- Assignment 3: ELIZA [Accept assignment]
- Modules and Packages (from Whirlwind Tour of Python by Jake VanderPlas)
- Numpy and Pandas (from Python Data Science Handbook by Jake VanderPlas)
- Data visualization overview
- More details on plotting libraries: Matplotlib and Seaborn (from Python Data Science Handbook by Jake VanderPlas)
- Visualizing high-dimensional data with Hypertools (Source: hypertools.readthedocs.io)
- Lecture 12 recording (W21): numpy, pandas, matplotlib, seaborn, and hypertools
- Lecture 13 recording (W21): Bob Ross dataset brainstorm and hackathon (part 1)
- Lecture 14 recording (W21): Bob Ross hackathon (part 2)
- Lecture 15 recording (W21): Bob Ross hackathon (part 3)
- Scikit-learn (from Python Data Science Handbook by Jake VanderPlas)
- Mission "Impossible": more practice with pandas and scikit-learn
- Lecture 16 recording (W21): hacking with pandas (part 1)
- Lecture 17 recording (W21): hacking with pandas (part 2)
- Lecture 18 recording (W21): hacking with pandas (part 3)
- Lecture 19 recording (W21): hacking with scikit-learn
- A (shallow) introduction to deep learning with Tensorflow (Source: tensorflow.org) and PyTorch (Source: pytorch.org)
- PyTest (Source: CDL tutorials)
- Assignment 4: Library tour! [Accept assignment]
- Note: this module was not covered during the W21 offering of PSYC 132
- jsPsych (note: this is a JavaScript library, not a Python library. As such, you may find it useful to go through a quick(ish) JavaScript tutorial like this one before going through the jsPsych tutorials below.)
- Basics (Source: jspsych.org)
- Simple reaction time task (Source: jspsych.org)
- Sample experiments from Experiment Factory
- Optional: PsychoPy (Source: psychopy.org) and OpenSesame (Source: osdoc.cogsci.nl)
- Basic statistical tests using Pingouin (Source: pingouin-stats.org)
- Permutation tests (Source: towardsdatascience)
- Lecture 20 recording (W21): permutation testing hackathon (part 1)
- Lecture 21 recording (W21): permutation testing hackathon (part 2)
- Monte Carlo simulation (Source: Practical Business Python)
- Regression (Source: towardsdatascience)
- Dimensionality reduction (Source: Analytics Vidhya)
- What is a model? (Source: Daniel Lawson)
- Ten simple rules for the computational modeling of behavioral data (Source: eLife article by Robert Wilson and Anne Collins)
- Ten (more) rules for building computational models (Source: PLoS Computational Biology article by Korryn Bodner et al.)
- Theory construction methodology: a practical framework for building theories in psychology (Source: Perspectives on Psychological Science article by Denny Borsboom et al.)
- Lecture 22 recording (W21): introduction to computational models [Slides, added post hoc]
- Model fitting:
- Evaluating and comparing models
- Optional: Build, compute, critique, repeat: data analysis with latent variable models (Source: Annual Review of Statistics and its Application article by David Blei)
- Optional: this repository contains materials and assignments for NYU's excellent Computational Cognitive Modeling course (Source: Brenden Lake and Todd Gureckis). Pick and choose whatever seems interesting to you!
- Lecture 23 recording (W21): model building brainstorm and discussion
- Assignment 5: MAGELLAN [Accept assignment]
- Tokenization (Source: DataCamp's Introduction to Natural Language Processing in Python)
- Stemming, and lemmatization (Source: DataCamp Community Tutorials)
- Parsing (Source: Edward Loper's Natural Language Processing Toolkit tutorials)
- Word embedding models:
- Latent Dirichlet Allocation (Source: towardsdatascience)
- word2vec (Source: machinelearningmastery.com)
- Context-sensitive text models:
- Demo: Natural language processing of movie reviews
- Lecture 24 recording (W21): overview of text embedding models [Slides from Spring, 2023 offering]
- Lecture 25 recording (W21): natural language processing hackathon
- Text embedding demo notebook
- Introduction to time-frequency analysis
- Working with brain data:
- Analyzing neural responses to naturalistic data (Source: Organization for Human Brain Mapping tutorial)
- DartBrains (Source: Luke Chang)
- BrainIAK Aperture Tutorials (Source: Brain Imaging Analysis Kit)
- MNE Tutorials (Source: MNE Python)
- SkTime User Guide (Source: The Alan Turing Institute)
- Fun with forecasting using Darts!
- High-order correlations with TimeCorr (Source: timecorr.readthedocs.io)
- Demo: Exploring brain network dynamics during story listening (Source: BrainIAK Aperture Demos; companion to Kumar et al. (2020))
- Lecture 26 recording (W21): network dynamics, course wrap-up
- Note: this module was not covered during the W21 offering of PSYC 132
- Graphs and networks:
- NetworkX (Source: networkx.org)
- Brain Connectivity Toolbox
- Writing your own library (Source: CDL-tutorials)