DS 2001
Programming with Data
Sections 1 and 2
Social Science Practicum
Syllabus
The online syllabus can be found here. A printer-friendly PDF version is here.Assignments
Week 1
(mccabe slides | mattsson slides | handout | code | solution)Week 2
(slides | handout | code | solution)Week 3
(handout | code | solution)Week 4
(handout | code | solution)Week 5
(handout | code | solution)Week 6
(handout | code | solution)Week 7
(handout | code | solution)Week 8
(handout | code | solution)Week 9
(handout | code | solution)Week 10
(notebook | solution)Week 11
(notebook | solution)Week 12
(notebook | solution)Resources
Common locations in the file system
Folders | Windows | macOS | Linux |
---|---|---|---|
Root | C:\ (or similar) | / | / |
Home | C:\Users\Username |
/Users/Username | /home/Username |
(alias) | %HOMEPATH% | ~ |
~ |
Desktop | C:\Users\Username\Desktop | /Users/Username/Desktop | /home/Username/Desktop |
Downloads | C:\Users\Username\Downloads | /Users/Username/Downloads | /home/Username/Downloads |
Documents | C:\Users\Username\Documents | /Users/Username/Documents |
/home/Username/Documents |
C:\Users\Username\OneDrive\Documents |
Basic CLI navigation
Task | Windows | macOS + Linux |
---|---|---|
go to home folder | cd %HOMEPATH% | cd |
get current location | cd |
pwd |
list contents of current folder | dir | ls |
list contents of subfolder | dir subfolder\ | ls subfolder/ |
go to subfolder "a" |
cd a | cd a |
go up one folder | cd .. | cd .. |
copy file to subfolder "a" | copy file a\ | cp file a/ |
move file to subfolder "a" | move file a\ | mv file a/ |
copy file from subfolder to folder | copy file .. | cp file .. |
move file from subfolder to folder | move file .. | mv file .. |
view contents of file | type file | cat file |
peek at a few lines of file | — | head file |
make new subfolder | mkdir subfolder | mkdir subfolder |
run python interactively | python | python |
run python script | python hello.py | python hello.py |